Start with an example document and inspect the returned evidence. You need an API key first; if you do not have one yet, see Your API key.
pip install searchcandy
export SEARCHCANDY_API_KEY=sc_live_...
from searchcandy import SearchCandy
sc = SearchCandy()
# Create a sample file; use a separate folder for this example.
from pathlib import Path
folder = Path("./searchcandy-quickstart")
folder.mkdir(exist_ok=True)
(folder / "sample-contract.md").write_text(
"Either party may terminate with sixty days of written notice.",
encoding="utf-8",
)
sc.ingest_folder(str(folder))
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, quote.source_id)
t = sc.query("What does clause 99.9 say?") # not in the docs
print(t.not_covered) # Inspect the coverage result.The first ingest builds your graph, which takes a moment. Indexing and query timings depend on document size, workload, and network conditions.
Your sample document was submitted to your graph. Answers come with sources you can check, and the second question lets you inspect missing-evidence handling. Inspect the actual results before connecting the flow to your application.
Next: Adding documents →