An LLM companion for answering your questions related to the LangChain & Vector DBs in Production course brought by Activeloop
educhain_bot_demo.mp4
- Enter your OpenAI API key.
- You can get your own OpenAI API key from here and then click on the
+ Create new secret key
button.
- You can get your own OpenAI API key from here and then click on the
- You can now proceed to ask questions related to the course to the chatbot.
This educational chatbot demonstrates the power of Retrieval Augmented Generation (RAG) to answer queries related to the course and provides relevant info to you by retrieving data from an extensive and detailed knowledge base. It returns a natural response to your questions along with the truth source.
Here's a summary of the scripts used for building this chatbot:
-
data_loading.py
:- Handles the initial data gathering and processing task where it scrapes the text data from the Langchain course website using Apify.
- The scraped text data is then converted into numerical form (vectors) using
CohereEmbeddings
that the chatbot can learn from. - Finally, the transformed data is uploaded to Deep Lake, a data storage service, for future use.
-
app_workflow.py
:- Handles the retrieval and ranking of the relevant data.
- First, it gathers the stored data from the
data_loading.py
file. - Second, it uses
CohereRerank
to rank and retrieve the most relevant data based on the userβs query.CohereRerank
is a reranking service that refines and ranks documents in alignment with a userβs search criteria.
- Third, it also builds the conversation chain with memory, which helps in maintaining the context of the conversation.
-
app_demo.py
:- The main script demonstrates the working of the chatbot through a user-friendly web interface using Streamlit.
- The chatbot then uses the stored and transformed data from Deep Lake to answer user queries.
- Provided a deep understanding of how RAG can be used to answer queries by retrieving relevant information from a detailed knowledge base.
- Involves scraping data from a course website, which helped in understanding how to extract and structure data from the web.
- The use of Cohere for embedding and reranking provided insights into how these techniques can improve the relevance of the retrieved information.
- Storing the transformed data in Deep Lake helped in understanding the importance of efficient data storage and retrieval in AI applications.
- Demonstrated how to integrate powerful APIs and libraries like OpenAI and Langchain to build a sophisticated chatbot.
- Highlightes the potential of AI in enhancing educational experiences, by providing a chatbot that can answer course-related queries.
- Helped with learning project management, problem-solving, and debugging skills to bring all the components together into a working chatbot.
- Inspired to build this chatbot from this tutorial!
- Thanks to Yuichiro's Streamlit Theme Editor that helped me find the suitable app's theme :)
- Chatbot logo and tech stack design made by me using Canva