Ingestion: chunk with structure-aware splitting, add contextual headers, embed in batches, and store vectors plus metadata (tenant, ACL, version, timestamps) with content hashes for incremental updates.
Index: HNSW with quantization (or IVF-PQ if memory is tight), sharded and replicated across nodes; keep a keyword index alongside for hybrid search.
Query path: rewrite follow-ups, run hybrid retrieval with permission filters (about 50 to 100 candidates), rerank the top candidates with a cross-encoder, and return 5 to 10 chunks.
Reliability and speed: embedding and result caches, timeouts with fallbacks (skip reranking if the reranker is slow), autoscaling on query load, and monitoring of recall, latency and cost.
Evaluation: labeled query set with recall@k and MRR in CI, plus online feedback and sampled review.
Loading…