The agents

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.

One answer in twelve steps, with the values from a real run: the question about sleep spindles with Compare on; the Planner reads H-MEM and plans searches; the Retriever finds 14 passages from 5 files; Zetaris confirms 5 of 5 files; the Writer drafts one finding per sentence; the Verifier checks every quote in one SQL statement; the Analyst's quotes are checked the same way and recorded in the World Model as 3 claims × 3 sources, 6 agree, 1 partly; 3 ticked citations, the table and the receipt in 19 s.
A real run from testing, Compare on: 14 passages from 5 files, every quote found, 19 seconds.
PlannerReads your corrections (H-MEM) firstPlans 1–3 searches; flags comparisonsRetrieverpgvector + full text per query,fused by Reciprocal Rank FusionZetaris pre-checkWhile the Writer writes: are thesedocuments in the evidence store?WriterOne finding per sentence, each witha citation and an exact quoteVerifierEach quote checked in code, then all of themin ONE Zetaris statement; support judgedAnswerOnly what passed. The rest is dropped,never shown as verifiedReceipt + traceSteps, sources, SQL in the app;logs/<runId>.jsonlunsupported,with reasons(≤ 2 rewrites)Analystclaims × sources,quotes checkedin Zetaris; stanceskept in theWorld Model
Teal: checked in Zetaris. Lime: only what passed reaches you.

Step by step

  1. 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.
  2. 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.
  3. Zetaris pre-check. While the Writer writes, confirms the documents behind those passages are in the evidence store.
  4. 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.
  5. 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.
  6. 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) > 0

A 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.

On this page