Handbook
Example — RAG answer from evidence (fake)
Understand answer_from_evidence inputs/outputs using fixture evidence and fake chat, not a live retriever.
Updated
Use case
Understand answer_from_evidence inputs/outputs using fixture evidence and fake chat, not a live retriever.
What it demonstrates
- Contract-driven payloads for RAG tasks.
- Policy expectations for citations (see RAG guide and VERIFICATION).
Source
examples/rag/answer_from_evidence_fake.py
Command
PYTHONPATH=src python3 examples/rag/answer_from_evidence_fake.py
Steps
- Read the task contract:
answer_from_evidence. - Build a minimal evidence pack and question payload matching
input_schema. - Use
TaskRunner(chat=fake_chat)like basic task runner, returning JSON that matchesoutput_schema.
Expected output
Ok with answer / citation fields as defined by the contract version you run.
Failure modes
- Schema mismatch on evidence or answer shape.
- Citation policy — verification may reject missing or invalid citations when enabled.