Figure: A typical Retrieval-Augmented Generation (RAG) pipeline. The user’s query (1) is used to search for relevant documents (2) in the knowledge base. Those top documents are fetched as enhanced context (3–4) and fed with the original prompt to an...