Defining ai objective functions

From samarv/Shanon · View interactive version

Defining ai objective functions is an AI agent skill from the GitHub repository samarv/Shanon. A framework for defining high-taste "Objective Functions" to train AI models. Use this when setting quality standards for RLAIF/RLHF, designing data labeling rubrics, or deciding how a model should prioritize trade-offs (e.g., brevity vs. depth).

How to use this skill

Skill file

Defining AI Objective Functions

When training AI, most teams optimize for robotic compliance (checking boxes). High-performance models require "Objective Functions" based on human taste and sophistication. This framework moves training data from "correct but mediocre" to "elite and useful."

The "Taste-First" Framework

1. Shift from Compliance to Excellence

Don't just ask if the model followed instructions; ask if it produced a "Nobel Prize" level output.

2. Choose Your Primary Value

Decide if the model should optimize for Engagement (Dopamine) or Utility (Truth).

3. Define the "Productivity Fork"

For every task, decide the model’s behavioral stance on user time.

Implementing RL (Reinforcement Learning) Environments

To move beyond static data, create simulations where models learn through trial and reward.

  1. Build the World: Create a virtual environment (e.g., a mock Slack workspace, a GitHub repo, or a financial spreadsheet).
  2. Set the Reward: Define a clear end-state (e.g., "The site is back up" or "Cell B22 contains the correct profit/loss").
  3. Audit the Trajectory: Do not just reward the final answer. Review the steps the model took.

Quality Signals Checklist

When evaluating data for training, use these thousands of signals rather than a single "Pass/Fail":

Examples

Example 1: Coding Task

Example 2: Executive Assistant Task

Common Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.