Skip to content

ShruAgarwal/Activeloop-LangChain-CourseBot

Repository files navigation

🤖 Chat with EduChain Bot

An LLM companion for answering your questions related to the LangChain & Vector DBs in Production course brought by Activeloop

Demo 🕹

Streamlit App

educhain_bot_demo.mp4

How to use 👀

  1. 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.
  2. You can now proceed to ask questions related to the course to the chatbot.

Behind the Scenes ⚙

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:

  1. 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.
  2. 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.
  3. 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.

Tech-stack 🛠

Key Learnings 🌱

  • 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.

Credits ✨

Releases

No releases published

Packages

No packages published

Languages