RAG - retrieval-augmented generation
Presentation - Empowering GenAI with RAG
RAG is an AI framework for retrieving facts from an external knowledge base to ground large language models (LLMs) on the most accurate, up-to-date information and to give users insight into LLMs' generative process.
- RAG combines retrieval and generation processes to enhance the capabilities of LLMs
- In RAG, the model retrieves relevant information from a knowledge base or external sources
- This retrieved information is then used in conjunction with the model's internal knowledge to generate coherent and contextually relevant responses
- RAG enables LLMs to produce higher-quality and more context-aware outputs compared to traditional generation methods
- Essentially, RAG empowers LLMs to leverage external knowledge for improved performance in various natural language processing tasks
Why is Retrieval-Augmented Generation important
- You can think of the LLM as an over-enthusiastic new employee who refuses to stay informed with current events but will always answer every question with absolute confidence.
- Unfortunately, such an attitude can negatively impact user trust and is not something you want your chatbots to emulate!
- RAG is one approach to solving some of these challenges. It redirects the LLM to retrieve relevant information from authortative, pre-determined knowledge sources.
- Organizations have greater control over the generated text output, and users gain insights into how the ML generates the response.
Codes
- generative-ai/gemini/use-cases/retrieval-augmented-generation/multimodal_rag_langchain.ipynb at main · GoogleCloudPlatform/generative-ai · GitHub ⭐ 18k
- GitHub - Farzad-R/Advanced-QA-and-RAG-Series: This repository contains advanced LLM-based chatbots for Q&A using LLM agents, and Retrieval Augmented Generation (RAG) and with different databases. (VectorDB, GraphDB, SQLite, CSV, XLSX, etc.) ⭐ 441
- example-app-langchain-rag/rag_chain.py at main · streamlit/example-app-langchain-rag · GitHub ⭐ 161
- GitHub - langchain-ai/rag-from-scratch ⭐ 9.3k
- generative-ai/gemini/qa-ops/building_DIY_multimodal_qa_system_with_mRAG.ipynb at main · GoogleCloudPlatform/generative-ai · GitHub ⭐ 18k
- Building A RAG System with Gemma, MongoDB and Open Source Models - Hugging Face Open-Source AI Cookbook