This repo is an implementation of a chatbot specifically focused on question answering over the dbt documentation. It is based on the amazing chat-langchain.
Blog Post about the original langchain-chat library: blog.langchain.dev/langchain-chat/
There are two components: ingestion and question-answering.
Ingestion has the following steps:
- Clone the dbt documentation repository
- Split documents with LangChain's TextSplitter
- Create a vectorstore of embeddings, using LangChain's vectorstore wrapper ( with OpenAI's embeddings and Weaviate's vectorstore)
Question-Answering has the following steps:
- Given the chat history and new user input, determine what a standalone question would be (using GPT-3)
- Given that standalone question, look up relevant documents from the vectorstore
- Pass the standalone question and relevant documents to GPT-3 to generate a final answer
- Clone the dbt documentation repository
git clone git@github.com:dbt-labs/docs.getdbt.com.git
- Add your OPENAI_API_KEY to an .env file
mv .env.example .env
- Run the app
docker-compose up
- Open the app in your browser
Head over to localhost:9993
to see the app running.