02/NLP · Data Engineeringproduction
Distributed Semantic Search
Oxide AI, 2021 to 2023
Semantic search and retrieval-based question answering across an enterprise document corpus, with the distributed data pipelines needed to keep it current.

Problem
Result
Pipeline stages
- 01
Ingest
Distributed jobs parse and clean documents across mixed formats. Batch rather than streaming, because the job that sets the requirement is reprocessing everything, not adding one file.
- 02
Embed
Embeddings are computed across the corpus in the same distributed pass, so a change of model is one long job rather than a migration.
- 03
Index
The vector index and the lexical index are built together over the same corpus at the same version, which is what lets the two retrieval paths be compared rather than guessed between.
- 04
Rank
Keyword and embedding results are fused. Part numbers, acronyms, and exact strings survive here; in embedding space alone they get averaged into something close but wrong.
- 05
Answer
The ranked passages ground the generated answer, so what comes back is bounded by what the corpus actually contains.
Decisions
Hybrid retrieval rather than embeddings alone
Most of the accuracy gain came from here. Embeddings are good at meaning and bad at exact tokens, and an enterprise corpus is full of exact tokens that carry the whole question. Fusing a lexical index back in recovers the cases where the right document was findable by name and unfindable by similarity.
Distributed batch ingestion
The requirement is not indexing a new document. It is reprocessing millions of them when the embedding model changes, and that job has to finish in hours rather than days or the model is effectively frozen.
Cost
Freshness. A new document is searchable on the next run, not on arrival, so real-time updates were traded away for the ability to rebuild the whole index.
Stack
- Python
- Spark
- ETL
- Vector databases
- AWS