Skip to content

Simple retrieval-augmented generation (RAG) chat application using Chainlit, Langchain, Chroma, and OpenAI

License

Notifications You must be signed in to change notification settings

brendancsmith/simple-rag-chat

Repository files navigation

simple-rag-chat

CodeFactor GitHub Actions Workflow Status GitHub License

This is a simple retrieval-augmented generation (RAG) chat application using OpenAI, Chainlit, Langchain, and Chroma.

The app provides an chat interface that asks user to upload PDF or text documents and then allows the user to ask questions against the provided documents. It uses OpenAI's API for the chat and embedding models, Langchain for the framework, Chainlit as the fullstack interface, and Chroma for the vector database.

Interface

The following is an example chat using Gap Q1 2023 Earnings Release as the uploaded PDF:

Chat Interface

🧰 Stack

👉 Getting Started

We use Python Poetry for managing virtual environments and we recommend using pyenv to manage Python versions.

Install and start the Poetry shell as follows.

poetry install
poetry shell

Please create an .env file from .env.sample once the application is installed. Edit the .env file with your OpenAI org and OpenAI key.

cp .env.sample .env

⏯️ Run the Application

Run the application by:

chainlit run app/app.py -w

🛠️ Development

Install pre-commit

pre-commit install
pre-commit install-hooks

LICENSE

This repository is an extension of llm-pdf-qa-workshop by Hanchung Lee, licensed under GPLv3.

About

Simple retrieval-augmented generation (RAG) chat application using Chainlit, Langchain, Chroma, and OpenAI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published