Associated companyKnowledge system

Answer engine over 6.9M tax passages

A production answer engine we built and run for tax and accounting questions, searching about 6.9 million indexed passages.

Live and maintained

01 — The problem
Tax and accounting questions need exact answers from a very large body of guidance and study material. Keyword search misses reworded questions, and a plain chat model can produce an answer that sounds right and isn't.
02 — What we built
We built the whole pipeline: crawling and uploads, chunking and indexing into Qdrant, a self-hosted embedding model and reranker on a GPU server, and keyword and vector search run in parallel and merged by rank. The best passages go to the chat model, which streams the answer back.
03 — What changed
It runs in production today. Warm searches took about 46–49 ms when measured on 30 July 2026. It has real limits too: the server is short of memory, and cold searches can take several seconds.
Engineering highlights

The decisions worth defending.

  • Keyword and vector search run side by side and are merged by rank fusion, because tax questions depend on exact terms as well as meaning. Common abbreviations are expanded first, so “NOL” also finds “net operating loss”.
  • A cross-encoder reranker rescores the top 20 passages before the model sees any of them. Search finds candidates; the reranker decides what is actually relevant.
  • We found a silent bug: after a collection was renamed, document deletes did nothing and reported no error, so deleted content stayed searchable. We fixed it and removed 746,056 stale vectors, taking the index from 7.64M to 6.89M, then checked the result by search.
  • On a memory-limited server we moved the search graph to disk. Swap use fell from about 11.7 GB to about 5.3 GB and warm search speed held, at the known cost of slower cold searches.
  • Before deleting a wider set of about 916,000 suspect vectors, we tested the list and found it was mixed with live content. We left them in place: the space saved was not worth losing searchable knowledge.
  • Full snapshots of the index go offsite every week, and the recovery copy was integrity-checked before the older local snapshot was retired.

Technology

Built with

  • Python
  • Flask
  • FastAPI
  • Qdrant
  • BGE-M3
  • BGE-Reranker-v2-M3
  • OpenAI API
  • MySQL
  • Nginx

Services

  • RAG engineering
  • Search tuning
  • Production operations
Related

Nearby work.

All work
  • Reference architectureAI agent

    Inbound qualification system

    Sales opens a ranked, enriched list instead of an inbox, and every enquiry is answered — including the ones that used to fall through.

    • LLM agent
    • CRM API
    • Enrichment
    • Queue
  • Reference architectureDocument automation

    Document-to-ledger pipeline

    The routine majority posts without a human. Finance spends its time on genuine exceptions instead of on data entry.

    • Vision + OCR
    • Extraction
    • Rules engine
    • Accounting API
  • Reference architectureKnowledge system

    Answer engine over internal documents

    Staff get a cited answer in seconds, and the cases where the system does not know are visible instead of invented.

    • Vector database
    • Embeddings
    • Reranking
    • Citations

Have a problem shaped like this one?

Tell us what the process looks like today, and we'll show you what the built version does differently.