Retrieval-Augmented Generation (RAG) Questions

Grounding language-model outputs in external knowledge at inference time. Covers document ingestion, chunking and embedding, sparse, dense and hybrid retrieval (BM25, score fusion, contrastive training of retrievers), vector search and approximate-nearest-neighbour index engineering (HNSW, IVF, product quantization, filtering, updates, sharding), re-ranking with cross-encoders, and context assembly with prompt templates and citations. Also covers reducing hallucination through verification and abstention, evaluating retrieval-augmented systems, and production concerns such as freshness, access control, prompt injection through retrieved documents, deletion and privacy, caching, cost, and weighing retrieval against fine-tuning. Generic LLM evaluation and release gates, the craft of prompts beyond retrieved-context templates, attention internals, parameter-efficient fine-tuning, model serving and distributed inference engineering, database indexes, and whole-product ML system design are covered elsewhere.

MediumSystem Design
21 practiced

Explain index freshness and document versioning in a RAG pipeline. For a knowledge base updated hourly, outline a strategy to incorporate updates with minimal disruption to queries and to support point-in-time retrieval.

MediumTechnical
17 practiced

You need to index PDFs and scanned documents (OCR noise) into a vector store. Outline preprocessing steps to improve retrieval quality: OCR cleanup, layout-aware chunking, table extraction, and metadata enrichment. Mention tools and heuristics.

MediumSystem Design
24 practiced

A large ANN index must support frequent inserts, updates and deletes while keeping query latency low. What update strategies would you consider and what are the trade-offs between in-place online updates and batch rebuilds?

That is every published Retrieval-Augmented Generation (RAG) question for Data Engineer so far. Browse the other topics in this category, or practice this one interactively.