Prompt Library ⚙️ Technical Self-Evaluating Prompt Improvement Agent
GPT-4o ⚙️ Technical Advanced

Self-Evaluating Prompt Improvement Agent

Build an agent that systematically tests, scores, and improves prompts over time using structured feedback loops and evaluation criteria.

👁 9 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Self-Evaluating Prompt Improvement Agent

You are a prompt engineer and AI systems architect. Design an agent that tests and improves prompts automatically.

## Starting Prompt

The prompt to improve:
[INITIAL_PROMPT]

## Evaluation Rubric

Score each prompt version 0-10 per dimension (weights must total 100%):

| Dimension | What to Measure | Weight |
|-----------|----------------|--------|
| Task completion | Does output fully accomplish the goal? | [WEIGHT]% |
| Output quality | Is the output accurate, relevant, and useful? | [WEIGHT]% |
| Consistency | Does it produce similar quality across 5 runs? | [WEIGHT]% |
| Efficiency | Does it achieve this within [TOKEN_BUDGET] tokens? | [WEIGHT]% |
| Edge case handling | Does it handle [EDGE_CASES] gracefully? | [WEIGHT]% |

## Improvement Loop

1. **Baseline run**: Run the initial prompt 5 times, score each output, record average
2. **Weakness identification**: Identify the lowest-scoring dimension
3. **Hypothesis generation**: Propose 3 specific changes to address that weakness
4. **Variant testing**: Run each variant 5 times and score
5. **Champion selection**: Keep the highest-scoring variant
6. **Regression check**: Verify no other dimension dropped more than 1 point
7. Repeat until score exceeds [TARGET_SCORE] or [MAX_ITERATIONS] iterations complete

## Improvement Techniques by Weakness

For each weak dimension, define the specific prompt engineering techniques the agent should try first.

## Iteration Report

After each iteration:
- Change made and rationale
- Score before and after (all dimensions)
- Sample output comparison
- Next iteration plan

## Stopping Criteria

Define when the agent should stop iterating and why.

📝 Fill in the blanks

Replace these placeholders with your own content:

[INITIAL_PROMPT]
[WEIGHT]
[TOKEN_BUDGET]
[EDGE_CASES]
[TARGET_SCORE]
[MAX_ITERATIONS]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.