This repository contains the code and documentation for a sophisticated car search chatbot with advanced functionalities, leveraging vector databases and Large Language Models (LLMs). Below, you'll find a detailed overview of the project's functionalities and how to get started.
-
Vector Creation for Car Documents:
- Create vectors for car documents to enable efficient and accurate document retrieval.
-
Index Creation in ChromaDB:
- Organize and manage vectors by creating an index in ChromaDB and upserting (updating and inserting) these vectors locally.
-
LLM Integration:
- Integrate a Large Language Model (LLM) to enhance the chatbot's ability to understand and generate human-like responses.
-
Document Retriever Creation:
- Set up a retriever to fetch vectors from ChromaDB, ensuring relevant information is readily accessible.
-
Integration with LangChain:
- Use the
create_stuff_documents_chain
function from LangChain to integrate our prompt and LLM, forming a cohesive unit.
- Use the
-
Retrieval Chain Construction:
- Create a retrieval chain to facilitate seamless communication between the LLM, document retriever, and the prompt.
-
Conversation History Management:
- Use LangChain's
history_langchain_format
to store conversation history, allowing the chatbot to perform actions or generate messages based on previous human responses.
- Use LangChain's
-
Secondary LLM for User Information Extraction:
- After completing a conversation, pass all messages to a second LLM to extract the user's name and email, validate it, and provide the output in the desired format.
-
Local Storage of Information:
- Store the extracted and validated user information in a local directory.
- docker build --build-arg OPENAI_API_KEY="api-key" -t chatbot .
- docker run chatbot
- Python 3.10
- Required Python libraries (detailed in
requirements.txt
)