How an answer is checked
From a question to an answer whose every quote was found word for word in its source, step by step.


Step by step
- Planner. Reads the corrections you've given Konkyo before (its H-MEM memory), rewrites the question so it stands alone, plans one to three searches, and decides whether the question weighs several sources against each other.
- Retriever. Searches your passages two ways for each query, by meaning (pgvector) and by words (Postgres full text), and fuses the lists. When even the best match is weak, the Planner replans from what came back (broader terms, synonyms, the words the closest passages use) and the Retriever searches again, fusing both rounds. If nothing is close enough after that, the answer is "This isn't in your library yet.", never a guess: it lists every search it tried and offers Find sources, which sends the Scout to open papers and the web.
- Zetaris pre-check. While the Writer writes, confirms the documents behind those passages are in the evidence store.
- Writer. Writes one finding per sentence, and is told to name each source by its authors. Each sentence carries a citation, and each citation an exact quote copied from its passage. You see the draft as it's written, its citations marked as being checked; the checked answer replaces it.
- Verifier. Checks each quote in code (normalised words, verbatim), then checks all of them in one Zetaris statement against Zetaris's own reading of the source PDF, a second extraction independent of Konkyo's. At the same time a model judges whether each sentence's quotes support it. Rejected sentences go back to the Writer with reasons, at most twice; whatever still fails is dropped. A later round judges only the rewritten sentences: one already approved, with the same words and quotes, keeps its verdict, and a quote Zetaris found isn't looked up again.
- Answer. Only what passed. The receipt shows the steps, sources, memories used and the SQL;
the full trace is written to
logs/<runId>.jsonl.
When Compare is on, or the Planner sees a question that compares sources, and the passages come from two or more files, the Analyst runs beside the Writer: up to six specific claims (it aims for three to six), each source's stance (agrees, disagrees, partly) with a quote, every quote checked in Zetaris, and the result recorded in your World Model (and the space's, when you asked in one space).
The check, as it runs
SELECT q.qid
FROM VALUES
('1', '<document>', '<passage>', 'spindlesarecharacteristicwaxingandwaningoscillations…'),
('2', '<document>', '<passage>', 'howevertopographicalsleepspindleanalysisrevealed…')
AS q(qid, doc, pid, qkey)
JOIN konkyo.konkyo_pdf_text t ON t.doc_id = q.doc
WHERE instr(t.p, q.qkey) > 0A quote counts only if its normalised words appear in Zetaris's text of the document. Recordings and notes have no PDF, so their quotes are checked against their passages as published to Zetaris. A Compare answer's receipt shows two statements: one for the answer's quotes, one for the table's.