--- 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 with LangChain and OpenAI's GPT-3.5-turbo. ## 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 GPT-3.5 Turbo 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 GPT-3.5 Turbo**: Leverages the advanced language understanding and generation capabilities of GPT-3.5 Turbo 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 OpenAI GPT-3.5 Turbo 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`.