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 aFeedbackResult:
<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?
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 callkapso.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 checksnode.should_stop.
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 provideeval_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:Related
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
pip install leeroo-kapso · Every page as plain text: llms.txt.