Interviewers want to hear about ingestion pipeline, chunking strategy, vector database selection, retrieval architecture, caching, and cost optimization at scale. They also probe on how you handle updates without re-embedding everything.
Askgenai In Answered question
- Ingestion: Async pipeline (Celery/Apache Kafka) with OCR (for PDFs), HTML parsing, and deduplication.
- Chunking: Hierarchical chunks (parent-child) with overlap. Use semantic chunking (detect topic shifts) instead of fixed-size.
- Vector DB: Pinecone/Weaviate for managed scale, or pgvector with partitioning. Use IVF or HNSW indexes.
- Hybrid Retrieval: Combine BM25 (keyword) + dense (vector) via reciprocal rank fusion (RRF).
- Update Strategy: Incremental embedding — only re-embed changed/added documents. Use document versioning.
-
Cost: Cache frequent queries with Redis. Use cheaper embedding models (e.g.,
text-embedding-3-small) for first stage, expensive only for reranking.
Askgenai In Answered question