Retrieval-augmented generation, or RAG, is a framework that allows LLMs to extract information from external knowledge databases.