Recipe: build a faithfulness judge for RAG
Recipe — RAG faithfulness judge. Pointer to the SDK rag_assessment sample.
Last updated
Was this helpful?
Recipe — RAG faithfulness judge. Pointer to the SDK rag_assessment sample.
Canonical sample: samples/cowork/rag_assessment.py — RAG Runner-Quality Judge multi-agent pattern. One agent executes retrieval queries; the other evaluates groundedness and retrieval quality.
Capture traces with retrieval and generation spans separately.
Build a faithfulness judge: client.judges.create(name=, evaluation_goal=) whose rubric checks claims against retrieved chunks.
GEPA-optimize against ≥50 labeled examples — see Bootstrap a judge before GEPA.
Apply via client.trace_evaluations.create(trace_id=, judge_id=).
Last updated
Was this helpful?
Was this helpful?