Updated on 14th August 2024
📝Article • Demo & Dataset on: 🤗Hugging Face
Large Language Models (LLMs) demonstrate significant capabilities but sometimes generate incorrect but believable responses when they lack information, and this is known as “hallucination.” It means they confidently provide information that may sound accurate but could be incorrect due to outdated knowledge.
Retrieval-Augmented Generation or RAG framework solves this problem by integrating an information retrieval system into the LLM pipeline. Instead of relying on pre-trained knowledge, RAG allows the model to dynamically fetch information from external knowledge sources when generating responses. This dynamic retrieval mechanism ensures that the information provided by the LLM is not only contextually relevant but also accurate and up-to-date.
This repository provides a collection of Jupyter notebooks that demonstrate how to build and experiment with RAG using different frameworks and tools.
Tool | LLMs | Description | Notebooks |
---|---|---|---|
Weaviate & LangChain | OpenAI | Build a question-answer system focused on providing answers related to the Roman Empire using Weaviate, LangChain, and OpenAI. | |
LangChain & LlamaIndex | OpenAI | Build basic and advanced document RAG workflow using LangChain, LlamaIndex and OpenAI article. | |
LangChain | Mixtral | Developed a chatbot that retrieves a summary related to the question from the vector database and generates the answer. | |
LangChain | llama-2 | Developed a machine learning expert chatbot (using Q&A dataset) that answers questions related to machine learning only without hallucinating. |