# Title of document
A rag pipeline typically starts by collecting and preparing information from relevant sources. Documents are divided into smaller sections and converted into searchable representations. When a user submits a question, the system retrieves the most relevant sections from the knowledge base. These results are then provided to the language model along with the original query. The model uses this context to generate the final answer. Depending on the application, the pipeline may also include ranking, filtering, source validation, and response evaluation to improve accuracy and reliability.
https://dataqix.com/retrieval-augmented-generation/