A simple, containerized GPT-powered web apllication allowing you to query your own PDF file. Uses streamlit for UI, ChromaDB to store embeddings and langchain.
- Create
.env
file in root directory of the project with the following contents. Replace OpenAI key with your own.
OPENAI_API_KEY="YOUR_API_KEY"
- Run docker compose in detached mode
docker-compose up -d
- Open http://localhost:8000
- Loads file using streamlit
- Splits pdf into chunks using langchain splitter
- Generates embeddings using
text-embedding-ada-002
- Stores embeddings in an in-memory instance of ChromaDB vector database
- Runs a RAG chain that will rertieve relevant splits and adds them to the context of the final prompt
The app leverages Retrieval-augmented generation (RAG). More info can be found here