Document Q&A where every claim links to the passage behind it — and when the documents don't contain the answer, it says so.
Status Deployed on Render's free tier. Public accounts, version comparison and the evaluation lab live on a branch (PR #1); main has the core pipeline.
Document Q&A tools answer confidently whether or not the documents support it. In policy or compliance work, an unsupported answer is worse than no answer.
Approach
Vericore chunks documents with page and section metadata, embeds them locally and retrieves with semantic similarity plus lexical coverage. A relevance gate runs before generation: if nothing qualifies, the model is never called and the reply is “Information not available in the uploaded documents.”
My contribution
Personal project, built end to end: ingestion, section-aware chunking, hybrid retrieval and relevance gate, Groq generation with a deterministic fallback, the evidence UI and the evaluation lab.
Who it helps
Document Q&A where every claim links to the passage behind it — and when the documents don't contain the answer, it says so.
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.
D.03 — Technical decisions
Decisions, and why.
Upload
Parse
Chunk by page
Embed
Retrieve
Gate
Answer + passages
01
No evidence, no answer.
A retrieval gate filters unsupported questions before generation, so a refusal costs no model call.
02
Every claim should point at a passage.
Conservative passage matching links each displayed claim to its document, page, section and chunk. Unsupported statements are withheld.
03
Policies change between versions.
Version comparison shows added, removed and modified passages, with changed values side by side and numeric conflicts linked to both clauses.
04
Accuracy alone isn't the metric.
An evaluation lab records retrieval metrics, citation coverage, unsupported rate, refusal correctness and latency as saved runs.
05
Users must never see each other's documents.
Each account gets its own Chroma collection, registry, cache and Groq client; scrypt password hashes, HttpOnly sessions and PKCE for Google.
D.04 — Reliability and evaluation
What was verified, and how.
53
backend tests, including cross-account isolation
3
question evaluation suite — answer, compare, refuse — saved as runs
0
model calls when no passage qualifies
Test counts are the documented results in the project README. Latest CI on the default branch: No CI workflow
On this site's benchmark, the relevance-gate design cut answers to unanswerable questions from 75% to 0%, at a cost of 15.4% false refusals. Method, failures and limits
On Render's free tier, accounts and documents are ephemeral.
Email verification and password recovery aren't implemented yet.
Groq keys live in per-account server memory and are never persisted or returned.
Current status Deployed on Render's free tier. Public accounts, version comparison and the evaluation lab live on a branch (PR #1); main has the core pipeline.