Two systems, drawn from their source at pinned commits, and one benchmark you can re-run. Every component links to the files it summarises; anything that exists only on a branch, or that this site runs differently from the original, is labelled.
Architecture explorer
Select a component to see what it does, what can go wrong, the trade-off behind it and where it lives in the code.
Two paths share one index. Upload parses, chunks and embeds documents into ChromaDB. A question is embedded, scored against a candidate pool, and either stopped at the relevance gate (NOT_FOUND, no model call) or answered from 1–3 chunks whose cited ids are checked against what was supplied.
Interface
API
Ingestion
Retrieval
Answering
Implemented at this commit
External service
Branch only
Call or data flow
In the code at this commit
React workspace
Upload documents, ask questions and inspect the evidence behind each answer.
In
User files and questions
Out
Calls to /api/documents and /api/chat; renders answers, confidence and evidence cards
Failure
API errors surface as toasts; NOT_FOUND renders a dedicated unknown-question card instead of an empty answer.
Trade-off
A single workspace keeps evidence next to the answer, at the cost of a denser screen on mobile.
React workspace (in the code at this commit). Upload documents, ask questions and inspect the evidence behind each answer. Sends to: Documents API, Chat API.
Documents API (in the code at this commit). Upload, list, inspect and delete documents; returns suggested questions per document. Sends to: Parser.
Chat API (in the code at this commit). Runs evidence-first QA: retrieve, gate, then generate only when evidence qualifies. Sends to: Hybrid retriever.
Parser (in the code at this commit). Validate and extract page text from PDF and TXT files, cleaning Unicode and broken hyphenation. Sends to: Section chunker.
Section chunker (in the code at this commit). Split pages at numbered, ALL CAPS and Title Case headings; long sections become overlapping sentence windows. Sends to: Local embeddings.
Local embeddings (in the code at this commit). Embed chunks and questions with all-MiniLM-L6-v2, normalised, on the server's CPU. Sends to: ChromaDB.
ChromaDB (in the code at this commit). Persist chunk vectors and metadata in a cosine collection plus a document registry. Sends to: nothing.
Hybrid retriever (in the code at this commit). Score 25 candidates with hybrid = min(1, cosine + 0.5·coverage²), gate the query, drop near-duplicates, keep 1–3 chunks. Sends to: ChromaDB, Evidence strength, Groq generation.
Evidence strength (in the code at this commit). Label evidence HIGH, MEDIUM or LOW from hybrid, semantic and coverage scores. Sends to: nothing.
Groq generation (external service, called from the code). Answer from the supplied chunks only, as JSON with cited source ids; temperature 0, 128 output tokens. Sends to: Extractive fallback, Source-id check.
Extractive fallback (in the code at this commit). Without a model, quote the single sentence that matches at least two question words. Sends to: nothing.
Source-id check (in the code at this commit). Keep only cited ids that were among the supplied chunks. Sends to: nothing.
Accounts, versions, eval lab (only on a branch, not main). Public accounts with per-user collections, policy version comparison and an evaluation lab. Sends to: nothing.
Evaluation lab
The question is narrow on purpose: does refusing before generation stop unsupported answers, and what does it cost? Measured on the TypeScript port that powers the playground.
Run
2026-10-13-0c8ad9d
Dataset
36 questions · v1 · dev/test split
Corpus
4 documents → 24 chunks (Vericore @ 969b3e0)
Generation
None — 0 tokens, $0 cost
Machine
v24.20.0 · 12th Gen Intel(R) Core(TM) i5-12500H
Two configurations, same dataset, same chunks. Lexical baseline ranks by similarity and always answers. Vericore port adds the hybrid rerank, relevance gate and evidence-strength check.
Metric
Lexical baseline
Vericore port
Vericore port · test split
Precision@3Of the top 3 ranked passages (before the relevance gate), the fraction that are relevant. If fewer than 3 passages are returned, the denominator is the number returned; zero returned counts as 0. Answerable questions only.
39.7%
39.7%
43.6%
Recall@3Of the distinct expected evidence passages, the fraction found in the top 3. Matters for multi-document questions. Answerable questions only.
96.2%
96.2%
96.2%
MRR@10Mean of 1 / rank of the first relevant passage in the top 10 (0 if none). Answerable questions only.
0.981
0.981
1.000
Answer correctnessAnswerable questions that were answered and whose answer contains every expected fact (substring match).
88.5%
80.8%
76.9%
False refusalsAnswerable questions that received “not found”. The cost of refusing too eagerly.
0.0%
15.4%
15.4%
Correct abstentionUnanswerable questions that correctly received “not found”.
25.0%
100.0%
100.0%
Unsupported answersUnanswerable questions that received an answer anyway — the failure an evidence gate exists to prevent.
75.0%
0.0%
0.0%
False premise handledFalse-premise questions that were either refused or answered with the correct fact from the right passage.
50.0%
100.0%
100.0%
Citation validityAnswered questions whose citation points at a retrieved passage and quotes it verbatim (validated automatically).
100.0%
100.0%
100.0%
Citation supportAnswered questions whose cited passage is one of the expected evidence passages.
92.9%
100.0%
100.0%
Latency p50Wall-clock time of the full pipeline per question with the index already built. Machine-dependent; median and 95th percentile.
1.11 ms
0.38 ms
0.34 ms
Precision@3 is capped near 33% here because most questions have a single relevant passage; MRR shows the right passage is almost always ranked first. Latency is wall-clock on the machine above with the index already built (4.61 ms to build) and will differ on yours.
By category · Vericore port
single16 q · 93.8% correct
paraphrase4 q · 0.0% correct
multi-document2 q · 100.0% correct
confusing4 q · 100.0% correct
unanswerable8 q · 100.0% handled
false-premise2 q · 100.0% handled
What the gate changed
On questions the corpus cannot answer, the baseline answered 75.0% of the time — for example “Who is the CEO of NovaTech?” → “Welcome to NovaTech.” The gate brings that to 0.0%, at the cost of refusing 15.4% of answerable questions, all of them paraphrases.
Representative successes
multi-document What are the core working hours for remote staff?
“Remote team members must remain accessible on Slack and email during core working hours from 10:00 AM to 3:00 PM in their respective time zone.” — remote-p1-c4
multi-document How many days of service before a new employee can request leave or work remotely?
“New joiners begin accruing leave immediately upon their first day of employment and may request leave following 30 days of service.” — leave-p1-c1
confusing Within how many business days must managers respond to leave requests?
“Department managers must approve or reject leave requests within 3 business days.” — leave-p1-c3
confusing How many days of notice must regular full-time staff give when resigning?
“The standard notice period for regular full-time staff is 30 calendar days.” — handbook-p3-c2
Every failure (5)
#16 single · test When does medical insurance coverage start?
Answered from benefits-p1-c1, but the quoted sentence does not contain the expected fact.
#17 paraphrase · dev How much time off do new parents who are not the birthing parent get?
Refused at the relevance gate: the question shares too few terms with the passage that answers it.
#18 paraphrase · test Do I need a doctor's note when I'm off sick?
Retrieved the right area but no sentence matched enough question terms to be quoted.
#19 paraphrase · dev Can I work from home?
Refused at the relevance gate: the question shares too few terms with the passage that answers it.
#20 paraphrase · test Is there money for books and conferences?
Refused at the relevance gate: the question shares too few terms with the passage that answers it.
What this benchmark does not show
36 questions over 24 chunks is a regression benchmark, not an estimate of real-world accuracy.
Thresholds were tuned on the dev split; test-split numbers are less optimistic but share the same small corpus.
Answer correctness is a substring check against expected facts, not a judgement of fluency or completeness.
The corpus is synthetic and written in a clean policy style; real documents with tables, scans and contradictions are harder.
It measures this site's TypeScript port (TF-IDF in place of MiniLM, no LLM). It is evidence about the design, not a measurement of the deployed Vericore service.