A concept build answering questions over a private document set, with every answer citing the passage it came from and abstaining when the corpus does not cover it.

We built this to settle an argument we keep having with prospective clients: a document assistant is only useful if you can tell when it is wrong. The pipeline chunks source documents on semantic boundaries rather than fixed token counts, embeds them into pgvector, and retrieves with a hybrid of dense and keyword search — dense alone reliably misses exact identifiers like invoice numbers and part codes. Retrieved passages are reranked before they reach the model, and the answer is required to cite the chunks it used, rendered as a link straight to the source paragraph. The part we care about most is refusal. When retrieval returns nothing above the relevance threshold, the assistant says the corpus does not answer the question instead of producing a fluent guess. An assistant that is confidently wrong ten percent of the time is worse than no assistant, because it destroys trust in the ninety percent that was right. Runs against a synthetic corpus in the demo. No client data of any kind was used.