File size: 2,001 Bytes
b91232a
 
 
 
 
 
 
 
 
 
 
 
f401ee6
f5a475f
 
 
f401ee6
f5a475f
 
 
 
 
f401ee6
f5a475f
 
 
 
 
 
 
f401ee6
f5a475f
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
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`.