A useful retrieval result lets a reader inspect the original passage and identify the document it came from. SearchCandy returns quote text and a source identifier for your application to present.
This is illustrative sample data, not a production response or benchmark. A sample document named sample-contract.md contains:
Either party may terminate this agreement with sixty days' written notice.
For a question about termination notice, present the supporting passage alongside its source. Keep your own document-name-to-URL mapping if you want a clickable citation; a source identifier is not automatically a public link.
r = sc.query("What is the termination notice period?")
if r.not_covered:
print("No supporting passage returned.")
else:
for quote in r.quotes:
print(quote.text)
print("Source:", quote.source_id)
print("Graph version:", r.version)Source fidelity means the text is present in the document. It does not establish that the passage is relevant, complete, current, or applicable to the user's circumstances. Inspect surrounding clauses and conflicting passages when your use case requires them.
If you pass retrieved text to a language model, check whether the final answer is supported by the passages. Store the graph version and source identifiers with the result so you can revisit its evidence after the documents change.
Read about version history · Review the evaluation and its limits
Next: Handling unanswered questions →