Eval — Recall & Precision
Steps
- Load the eval set (
eval/questions.yamlshipped with the blueprint). Each entry hasquestion,gold_chunk_ids, optionalmust_include_text. - For each question, run
retrieve-and-rerank→answer-with-citations. - Score against the gold:
- Recall = |cited ∩ gold| / |gold|
- Precision = |cited ∩ gold| / |cited|
- Aggregate — report mean recall, mean precision, and per-question breakdown. Surface the bottom 3 questions for inspection.
- Fail if mean recall < 0.7 or mean precision < 0.5 (configurable in
eval_setmetadata).
Output shape
{
"summary": {"mean_recall": 0.82, "mean_precision": 0.71, "n": 12},
"per_question": [
{"q": "...", "recall": 1.0, "precision": 0.75, "missing_gold": []}
]
}
Validation
This skill is the validator for the retrieval layer. Run it from CI
after any change to chunk-and-embed, retrieve-and-rerank, or the
chunking config.
Failure modes to avoid
- Tuning the rerank threshold to pass eval, breaking real retrieval —
if eval recall jumps but production retrieval set shrinks, that's a
red flag. Always report
top_ndistribution too. - Stale gold IDs — if
chunk-and-embedwas rerun with new chunk_ids, the eval gold is stale. Re-author the eval set whenever ingestion changes meaningfully.