Chatbot_Langchain_MultiQueryRetriever

chatbot that allows you to interact with your PDF files. When you upload a document, it generates a split and a summary, stored in separate collections within the Qdrant vector database. When you ask a question, two queries are created to search for relevant information in the summary and split, optimizing token usage in the LLM model.

Stars
0
Committers
2

Chatbot using Langchain's model for chatting with your PDF's |Chatbot using Langchain and RAG Advanced with MultiQueryRetrieve and Multivectorstore|


Chatbot where you can chat with your PDF. It consists of a multiretriever and multivector model. When you insert your PDF it will generate a split and a summary of your documents, where in a vectorial base Qdrant will save the complete document, the split and a summary of the document in different collections respectively. When the user inserts the query, the multiquery retriever will create a query adjacent to the original one, having two queries, where they will be used to search for the documentation in the Qdrant summary and split collections. Only two collections were selected for the search due to the limitation of the number of tokens to be passed to the LLM model.

The LLM model used in this project is gemini-1.5-pro.


Chatbot logic diagram


USE

  1. pip install requirements.txt
  2. Insert your credential of Gemini-Pro in the .env file
  3. Deploy Qdrant using Docker-Compose --> Run image qdrant
  4. deployment streamlit : streamlit run main.py

Deployment

  1. Qdrant image

  2. Streamlit image

  3. Consult you question image

  4. Monitore the LLM model using Phoenix Ariza image