Serve a tiny document chat response that is grounded in the first matching document and abstains when no evidence exists.
Required APIdef answer_with_citations(query, docs):
return {'answer': ..., 'citations': [...]} BehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
answer_with_citations('cats', {'doc-1': 'Cats sleep often.'})every answer must carry provenance
answer_with_citations('birds', {'doc-1': 'Cats sleep often.'})unsupported questions must not hallucinate
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.