Ask your documents anything. It brings the receipts.
Kogniq is a RAG engineering and document-intelligence console: documents go in one end, grounded answers with validated citations come out the other — and every stage between them is inspectable.
It was built to make retrieval a visible, measurable mechanism rather than a black box: chunking strategies can be compared side by side, retrieval stages can be audited, and every answer carries its evidence.
citation specimen — how every answer ships
Chunking strategy determines the ceiling on retrieval quality: overlapping windows retrieved more supporting passages in this corpus [S1], while keyword scoring recovered exact terminology the dense retriever blurred [S2].
[S1] chunking-comparison.md[S2] retrieval-eval.md
a typographic specimen of the citation format — the live console renders real answers from real uploads
01
The actual problem
Retrieval-augmented generation usually fails quietly: the answer looks plausible, but nothing shows which document supported it, whether the right chunks were retrieved, or how a different chunking strategy would have changed the outcome.
The difficult part is not generating text — it is making the pipeline between the documents and the answer observable: comparing chunking strategies, fusing two very different retrievers without bias, and only then trusting the output enough to show it with citations attached.
02
The exploded machine
The machine is a pipeline of inspectable stages. Documents are ingested as PDFs, Markdown or LaTeX and previewed through comparable chunking strategies before anything is indexed.
01
Intake hopper — PDFs, Markdown, LaTeX
Documents enter raw; the console accepts the formats research actually arrives in.
02
Slicer — chunking preview & comparison
Chunking strategies are previewed side by side before indexing, so the silent decision becomes a measured one.
03
Twin sieves — Chroma dense + SQLite FTS5 BM25
Two independent retrievers run in parallel: dense vectors (all-MiniLM-L6-v2) for meaning, keyword scoring for exact terms.
04
RRF merging funnel — Reciprocal Rank Fusion
The two rankings fuse into one list that neither retriever could have produced alone — no hand-tuned weighting.
05
Lantern lens — grounded answers with citations
Answers are generated with validated [S1]-style citations; every claim points back to the chunk that supports it.
06
Eval gauges — hit rate, MRR, groundedness, citation coverage, latency
Retrieval quality is measured, not assumed — the same corpus can be re-evaluated after any pipeline change.
07
Study drawer — flashcards, quizzes, knowledge graph
Spaced-repetition flashcards, generated quizzes and a BFS-explorable knowledge graph grow out of the same indexed corpus.
Retrieval runs two independent mechanisms in parallel — Chroma dense vectors with SentenceTransformers (all-MiniLM-L6-v2) and SQLite FTS5 with BM25 keyword scoring — and Reciprocal Rank Fusion merges their rankings into one list that neither retriever could have produced alone.
Grounded answers are generated with validated [S1]-style citations, a knowledge graph is explorable through BFS traversal, and study tooling (flashcards with spaced repetition, quizzes) is generated from the same indexed corpus.
03
Engineering decisions
01
Hybrid retrieval over a single retriever
Dense vectors catch semantic matches that keyword scoring misses; SQLite FTS5 BM25 catches exact terminology that embeddings blur. Fusing both with Reciprocal Rank Fusion keeps each retriever's strengths without tuning a weighting scheme by hand.
02
Chunking comparison before indexing
Chunk size and strategy silently decide what a retriever can ever find. Making the chunking stage previewable turns that silent decision into a measured one.
03
Gemini with a local Ollama fallback
Generation uses Gemini where available and falls back to a locally hosted Ollama model — the pipeline keeps working when the hosted API does not.
04
Sessions that are verifiable, not just convenient
Argon2 password hashing with HttpOnly sessions keeps the console's own security posture at the same standard the answers are held to.