Skip to main content
The feedback generator reads an experiment’s evaluation output and decides whether the campaign continues. It replaces a fixed score threshold with a judged verdict, so a run stops when the goal is genuinely met rather than when a number crosses a line.

How does it decide?

After the coding agent implements a solution and runs evaluation, the feedback generator validates the evaluation, extracts the score, checks goal completion, and generates feedback — each covered in What does it check? below.

FeedbackResult

The feedback generator returns a FeedbackResult:
The judge must answer in five XML tags — <stop>, <evaluation_valid>, <score>, <feedback>, <cards_load_bearing>. An answer without the tags parses to None; the caller retries once, and a second tagless answer becomes an explicit failure result rather than a silent guess.

What does it check?

1. Validate evaluation

The feedback generator checks if the agent-built evaluation is fair and correct:
  • Does the evaluation actually test the goal criteria?
  • Is the evaluation not trivially passing (e.g., print("SCORE: 1.0"))?
  • Are the metrics appropriate for the problem?
If the evaluation is invalid, the feedback generator sets evaluation_valid=False and provides feedback to fix the evaluation.

2. Check goal completion

The feedback generator determines if the goal has been achieved by:
  • Parsing the evaluation output for success criteria
  • Comparing scores against thresholds mentioned in the goal
  • Understanding semantic success (e.g., “all tests passed”)

3. Extract score

The feedback generator parses the evaluation output to extract numeric scores:

4. Generate feedback

If the goal is not achieved, the feedback generator provides actionable suggestions:

How do I use it?

Automatic (via evolve)

The feedback generator is automatically used when you call kapso.evolve():

Direct usage

Configuration

The feedback generator is integrated within the search strategy. You can configure the agent type in the search strategy configuration:

How does the search strategy use it?

Feedback generation happens within the search strategy, not the orchestrator: each node gets its own verdict right after implementation, and the orchestrator only checks node.should_stop.
A fixed score threshold would need the evaluation format known in advance and would trust every evaluation equally; the judged verdict reads any format, checks the evaluation itself for fairness, and returns suggestions rather than a bare number.

How do I get useful feedback?

1. Include success criteria in goal

The feedback generator works best when the goal includes clear success criteria:

2. Let agent build evaluation

Don’t provide eval_dir unless you have specific evaluation requirements. The agent builds domain-appropriate evaluation:

3. Trust the feedback

The feedback generator provides actionable suggestions. The next iteration’s coding agent receives this feedback and uses it to improve:

Execution Flow

See how feedback fits in the flow

Search Strategies

How strategies use feedback

Coding Agents

Agents that power feedback generation

API Reference

Full API documentation
Related pages: Execution Flow · Search Strategies · Coding Agents · API Reference Kapso is an open-source framework by Leeroo that builds software toward measurable goals through experiment campaigns. Source code: github.com/Leeroo-AI/kapso · Install: pip install leeroo-kapso · Every page as plain text: llms.txt.