By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The strongest version of reflection feeds the critic an external signal instead of asking for an opinion. This is the difference between 'review your work' and 'here is the test output'.
| Signal | What the critic sees | Typical fix |
|---|---|---|
| Failing test | Test name, expected and actual | Edit the code that broke the test |
| Schema error | Field, expected type, received type | Reshape the output |
| Citation check | Claim with no source id | Add the source or drop the claim |
| Tool error | Status code and message | Change arguments or choose another tool |
| Rubric miss | Which of five checks failed | Targeted edit |
def external_critique(draft, sources):
"""Deterministic checks first; they are free and never drift."""
problems = []
for claim in draft.claims:
if claim.source_id not in sources:
problems.append(f"UNSUPPORTED: {claim.text[:60]!r}")
if not 250 <= len(draft.text.split()) <= 350:
problems.append(f"LENGTH: {len(draft.text.split())} words, want 250-350")
return problemsCode-generated feedback means the revision step gets a precise instruction, and the loop can be tested without a model at all. That makes it the cheapest reliable quality gain in this course.
Coverage, tone, redundancy and 'does this actually answer the question' are not mechanical. Use a model for those, and keep the mechanical checks in code. The mix gives you speed where it is free and judgement where it matters.
Key takeaways
External signals (tests, schemas, citations) make reflection precise.
Deterministic checks are free, stable and testable without a model.
Re-run only the failed checks after a revision.
Use a model critic for judgement: coverage, tone, redundancy.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.