on a 480-question held-out evaluation set
end to end, including reranking
questions correctly refused rather than guessed
across four engineering teams
Lumify is an internal question-answering system built on top of roughly 40,000 pages of engineering documentation, runbooks, architecture decision records, and resolved incident tickets.
Engineers ask it a question in plain English. It returns a short answer, the passages it used, and a direct link into the source document. When the corpus does not contain enough evidence, it says so instead of producing a plausible paragraph.
That last behaviour is the reason the project exists.
The organisation had accumulated documentation across four systems over six years: a wiki, a repository of markdown ADRs, an incident tracker, and a folder of PDFs nobody had opened since the migration.
Search existed. It was keyword-based, and it worked if you already knew the vocabulary the original author had used. New engineers did not. The practical result was that documentation questions were answered by interrupting a senior engineer, which is an expensive and unevenly distributed cost.
An earlier attempt at this had been abandoned. It was a straightforward retrieval-augmented pipeline — embed everything, retrieve the top five chunks, ask a model to answer.
It failed for a specific reason, and it is worth being precise about it: the system was confidently wrong on exactly the questions that mattered most. Well-documented topics produced good answers. Undocumented or partially-documented topics produced fluent, well-formatted, entirely invented answers with fabricated references.
Engineers noticed. Trust collapsed within about three weeks, and once it collapsed, correctness improvements did not bring anyone back.
The hard requirement was not higher accuracy. It was a system that could be trusted to admit ignorance.
We set three targets before writing any code:
The second target was treated as non-negotiable. We agreed in advance that we would trade several points of accuracy to hit it.
I led the project end to end: retrieval architecture, the evaluation harness, the abstention model, the API service, and the review interface used by the technical writer.
One teammate owned the ingestion pipeline and connector work. Another owned the frontend beyond the review tool. I wrote the postmortem on the first version and the design document for the second.
Before touching retrieval, we assembled 480 questions with a technical writer and three senior engineers. Critically, about a third of them were deliberately unanswerable — questions about systems that genuinely had no documentation.
Most RAG evaluation sets contain only answerable questions, which means they cannot measure the failure mode that actually killed version one.
We measured recall@k independently of generation. This sounds obvious and is routinely skipped. It let us establish that the original system's problem was not retrieval — recall@10 was already 87% — but the generation step's unwillingness to say nothing.
Fixed-size chunking split runbooks mid-procedure. We rewrote ingestion to chunk on heading boundaries with a parent-document reference, so a retrieved step always carried the procedure it belonged to.
The production pipeline has four stages:
Slack / Web client
|
FastAPI gateway ---> Redis (query + embedding cache)
|
Hybrid retriever
| |
pgvector Postgres FTS
| |
Reciprocal rank fusion
|
Cross-encoder reranker
|
Sufficiency classifier -- insufficient --> Refusal + related docs
|
sufficient
|
Grounded generation (citation-constrained)
|
Citation validator --> ResponseIngestion runs separately on a schedule: connectors pull from each source, documents are normalised to markdown, chunked on structure, embedded in batches, and upserted with a content hash so unchanged documents cost nothing to re-index.
Calibrating abstention. The first sufficiency classifier was too eager and refused about a quarter of answerable questions, which is its own kind of useless. Tuning the threshold on the evaluation set brought false refusals to 6% while keeping true refusals at 88%.
Latency from reranking. The cross-encoder was the accuracy win and the latency cost. Batching candidate pairs and caching reranker scores against a query hash recovered most of it; the median settled at 1.4 seconds.
Documents that contradict each other. Six years of documentation contains superseded procedures. We added recency and document-status weighting to fusion, and surfaced contradictions explicitly rather than silently picking one — engineers preferred seeing the conflict.
Rebuilding trust. The technical problem was solvable in a quarter. Convincing engineers who had been burned by version one took longer, and was mostly won by the refusal behaviour rather than the accuracy numbers.
Against the 480-question evaluation set:
Six months after launch, roughly 310 engineers use it weekly. The refusal queue has also become the documentation team's prioritisation input — the questions the system cannot answer are a direct, ranked list of what is missing.
The result I care about most is not in the table: onboarding engineers now reach their first merged pull request measurably sooner, and the interrupt load on senior engineers dropped noticeably. Both are confounded by other changes, so I would not claim causation — but the direction is consistent and it is the outcome the project was actually for.
I would build the evaluation set before the first version, not the second. Everything that went wrong the first time was visible in the data we eventually collected; we simply had not collected it yet.
I would also resist the instinct to treat abstention as a fallback. Designing it as a first-class path — with its own latency budget, its own metrics, and its own interface treatment — is what made the system credible.
Awards and results connected to this project.
Papers that came out of, or fed into, this work.
There is always more detail than a write-up can carry — architecture trade-offs, what the evaluation missed, the decisions that were closer than they look. Ask.
