title: ChatBOT | |
emoji: π | |
colorFrom: blue | |
colorTo: gray | |
sdk: gradio | |
sdk_version: 3.33.1 | |
app_file: app.py | |
pinned: false | |
license: unknown | |
# Document Retrieval Augmented Language Model version 2.0 with LangChain and Meta's LLaMA-2.0 Chat. | |
## Description | |
This project involves the creation of a vector database using OpenAI embeddings and Chroma DB, followed by the retrieval of document snippets through a similarity search with LangChain's retrieval system. Upon retrieval of relevant snippets, the system uses LLaMA-2.0 to generate responses to input questions using the retrieved snippets as context. The system also incorporates a ConversationBufferMemory to store the memory of the chat, enhancing the quality of the conversational context and the relevance of generated responses. | |
## Contents | |
1. **OpenAI Embeddings and Chroma DB**: Utilizes the rich semantic information in OpenAI embeddings and the efficient storage and retrieval capabilities of Chroma DB to create a performant and effective vector database. | |
2. **Document Retrieval**: Uses LangChain's retrieval system to perform similarity search and retrieve relevant snippets from documents based on input queries. | |
3. **Response Generation with LLaMA-2.0**: Leverages the advanced language understanding and generation capabilities of LLaMA-2.0 to generate responses to input questions using Langchain's `RetrievalQA`. | |
4. **ConversationBufferMemory**: Stores the history of the conversation to ensure context continuity and enhance the relevance of the responses generated. | |
## Getting Started | |
### Prerequisites | |
Before you begin, ensure you have met the following requirements: | |
- You have installed Python 3.x. | |
- You have access to Meta's LLaMA-2.0 and relevant API credentials. | |
- You have set up Chroma DB on your server/machine, and the documents in the database. | |
- You have access to LangChain's retrieval system. | |
### Usage | |
After installation, you can use the system via command line or GUI through **gradio** `app.py`. | |