Whenever you're ready, walk me through how you'd approach this.
Explain how a Retrieval-Augmented Generation (RAG) system works end to end, including how you retrieve context and generate the final answer.
Describe the document ingestion, chunking, embedding, indexing, retrieval, prompt construction, generation, citation, and evaluation stages. Include production considerations such as retrieval quality, context limits, hallucinations, latency, and stale documents. Provide Python code for a minimal but production-oriented implementation.