Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gopikrsmscs/chat-with-document-rag
Retrieval Augment Generation, Chat with your document using lang chain and open ai.
https://github.com/gopikrsmscs/chat-with-document-rag
chatbot langchain openai-api retreival-augmented-generation streamlit
Last synced: 26 days ago
JSON representation
Retrieval Augment Generation, Chat with your document using lang chain and open ai.
- Host: GitHub
- URL: https://github.com/gopikrsmscs/chat-with-document-rag
- Owner: gopikrsmscs
- License: mit
- Created: 2024-08-27T19:00:40.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T05:11:43.000Z (5 months ago)
- Last Synced: 2024-11-18T10:28:34.967Z (3 months ago)
- Topics: chatbot, langchain, openai-api, retreival-augmented-generation, streamlit
- Language: Python
- Homepage:
- Size: 6.11 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat with the Document (RAG): Attention is All You Need, Transformer
This project provides an interactive interface to chat with documents using a Retrieval-Augmented Generation (RAG) approach. It uses the "Attention is All You Need" Transformer paper as a primary document, Chroma for vector storage, and OpenAI's language model for chat responses. The application is built using Streamlit to provide an easy-to-use chat interface.# Project Structure
- retrieval_augment_generation_chat.py: The main application file that sets up the Streamlit interface and handles the chat logic.
- document_indexing.ipynb: A Jupyter Notebook responsible for loading, splitting, and creating embeddings from the document.
- Transformer.pdf: The primary document used for the chat context.
- chromadb: Directory where the Chroma vector store persists the document embeddings.# Requirements
- Python 3.8 or higher
- Streamlit
- LangChain
- OpenAI's API key
- Chroma
- PyPDFLoader# Installation
- Clone the repository:
```bash
git clone [email protected]:gopikrsmscs/chat-with-document-rag.gitcd chat-with-document-rag
```
- Install the required dependencies:
```bash
pip install streamlit langchain chromadb PyPDFLoader openai
```
- Set up your OpenAI API key: Export your API key to the environment variable:
```bash
export OPENAI_API_KEY='your_openai_api_key'
```
![Chat Interface Output](/chat_interface.png)# Features
- Document Interaction: Chat with the content of the Transformer paper using a retrieval-augmented generation approach.
- Contextual Responses: The model generates responses based on specific document sections, ensuring answers are relevant.
- Streamlit Interface: Basic interface to type queries and see responses.# License
This project is licensed under the MIT License. See the LICENSE file for more details.