Inquora · loading
Inquora · loading
Under the hood
The short version: one search rather than four, one model call rather than eight, and every passage the answer used written down beside it. The longer version, with the numbers and the commands that produced them, is below.
Every figure below was produced by a command in this repository, against the live system and a real model provider, on 2 September 2026. A green test suite is not evidence that a model pipeline works.
With a mean reciprocal rank of 0.967, over the fixture corpus. The right passage is usually the first one.
bun run eval
6.3 seconds to a complete answer with its sources stored, against the deployed endpoint and a real model.
bun run live:deployed
Extraction, chunking and embedding. A 516-file code repository takes 1.3 seconds and becomes 711 passages.
bun run scripts/live-ingest.ts
Ownership, isolation and column privileges, run against the real schema rather than a mock of it.
bun run db:test
Vector similarity and Postgres full-text search run inside a single SQL function and are combined by reciprocal rank fusion, so an exact term and a paraphrase both find the passage. The results are then spread out by maximal marginal relevance, so four near-identical paragraphs do not crowd out the one that answers the question.
The model is given search as a tool rather than handed results. It can search again with better wording, read the passages either side of a hit when an answer straddles a boundary, or skip retrieval entirely when the question is about the conversation. The first search is dispatched speculatively while the prompt is still being assembled, and thrown away if the model asks something different.
The system this replaced made five to eight model calls before a single word of the answer existed: query analysis, expansion, decomposition, a step-back pass and a separate reasoning pass. Those are gone. What is left is the call that writes the answer, plus one more when it decides to search.
Whether a document has finished indexing, how many passages it has, how many rows a sheet holds: all of it is maintained by triggers rather than by application code that might not run. In the previous system that code mostly did not run, and 213 of 241 documents sat unprocessed while reporting nothing wrong.
Text arrives as it is written, over a plain server-sent event stream. Closing the tab aborts the generation, so an abandoned answer stops costing anything, and whatever had been written is still stored rather than lost.
The full text of Pride and Prejudice — 762 passages from one PDF — graded against the categories a retrieval system is normally tested on. Every figure below is from that run.
Cited is how many passages the answer stands on. Read is how many retrieval offered it. The gap is precision: an answer resting on one passage out of twelve is doing the right thing, and reporting only the twelve is how good retrieval gets mistaken for careless retrieval.
| Tests | Question | Cited | Read | First word | In all |
|---|---|---|---|---|---|
| Entity relationship | How are Lady Catherine de Bourgh, Lady Anne Darcy and Mr Darcy related? Two sentences, one passage. The hard part is answering briefly and still showing the line. | 1 | 12 | 5.9s | 6.3s |
| Cross-chapter | What was the eventual relationship between Georgiana Darcy and Elizabeth, and why did it matter to Darcy? The evidence is in the last pages, which are the ones a retriever is least likely to reach for. | 1 | 12 | 5.2s | 6.1s |
| Semantic retrieval | What did Charlotte Lucas believe Jane should do to make Bingley more likely to fall in love with her? Answered with the actual advice — show more affection than she feels — not a paraphrase of it. | 2 | 12 | 5.2s | 5.8s |
| Cross-character | Why did Elizabeth think Lydia should not be allowed to go to Brighton? Her argument to her father, and separately her fear for the family's standing. | 2 | 12 | 5.0s | 5.7s |
| Distractor resistance | What did Elizabeth think was wrong with Charlotte's reasoning about marriage? Two opposed views of the same subject, in adjacent passages. It kept them apart. | 3 | 12 | 7.4s | 8.5s |
| Temporal contrast | What did Darcy first say about Elizabeth's appearance, and how does that contrast with his later description of her eyes? Only just tolerable, against uncommonly intelligent by the beautiful expression of her dark eyes. | 4 | 12 | — | 7.1s |
| Character development | How does Elizabeth's perception of Darcy change after reading his letter, and which part has the strongest impact? Indignation, then a second reading, then the passage that turns her judgment. In that order. | 5 | 12 | 8.4s | 10.8s |
| Multi-hop | What financial circumstances made Wickham motivated to keep the elopement secret? Seven passages joined into one account of his debts, his intentions and Lydia's lack of fortune. | 7 | 12 | 6.3s | 8.1s |
| Exact retrieval | Why did Elizabeth initially believe Wickham, and what in Darcy's letter made her reconsider? Quotes the will — three thousand pounds in lieu of the living — and the phrase gross duplicity. | 6 | 12 | — | 8.8s |
| Distributed evidence | Trace what changed Elizabeth's opinion of Darcy, from the Meryton assembly, through Wickham's story, to the letter. Three ordered parts, so it searched twice. The one question here that cannot be answered by one search. | 5 | 23 | 12.5s | 16.0s |
None of that matters unless the answer is right. Check one yourself.
Start reading