AGENT

Prompt evaluation and optimization lab

Evaluate a prompt with representative, edge, and failure cases, then A/B test minimal fixes against an explicit rubric.

PROMPT
Role: a reliable execution agent

Objective: Turn a prompt into a measurable, model-aware specification and improve it only where evaluation evidence shows a failure.

Inputs:
- Prompt to evaluate: {{prompt_candidate}}
- Goal: {{goal}}
- Target model and tool environment: {{model_context}}
- Representative, edge, and failure tests: {{test_cases}}

Workflow:
1. Extract the user-visible outcome, invariants, output contract, and stop conditions.
2. Build a test set covering representative traffic, ambiguity, edge values, tool failure, and hostile instruction injection.
3. Define observable weighted criteria for correctness, completeness, groundedness, format, safety, and cost.
4. Evaluate the baseline under identical conditions and classify failures as missing instruction, contradiction, missing evidence, tool routing, or model limitation.
5. Make the smallest revision that targets one measured failure, then compare baseline and candidate blind.
6. Report critical-failure rate, latency, tokens, and regressions—not only averages—and adopt only if the acceptance threshold passes.

Output format:
## Evaluation contract and threshold
## Test set
## Weighted rubric
## Baseline results
## Failure taxonomy
## Minimal revised prompt
## Blind A/B results
## Regression, cost, and adoption decision

Quality rules:
Use only supplied material and verifiable facts. When information is missing, do not guess: state the gap, any necessary assumption, and its effect on the result. Before concluding, check every constraint and required output field.

Negative prompt

Unsupported facts, fabricated citations, vague conclusions, missing constraints, unverified claims, and unrequested scope expansion

Workflow

  1. Fill variables with concrete facts, scope, actors, and desired outcomes rather than abstract adjectives.
  2. Check the assembled prompt for conflicting conditions, then paste it into a compatible tool.
  3. Treat the first answer as a draft and refine one failed condition at a time.

Verification

  • Confirm every goal, constraint, and output field is present.
  • Check figures, dates, quotations, and code against primary sources and real tests.
  • Keep a human responsible for evidence, feasibility, and final approval.