{"id":15175534,"url":"https://github.com/shruagarwal/activeloop-langchain-coursebot","last_synced_at":"2026-02-10T01:31:04.445Z","repository":{"id":228590198,"uuid":"774368356","full_name":"ShruAgarwal/Activeloop-LangChain-CourseBot","owner":"ShruAgarwal","description":"Ask questions related to langchain course brought by Activeloop.","archived":false,"fork":false,"pushed_at":"2024-04-15T12:56:59.000Z","size":11244,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-21T10:22:21.290Z","etag":null,"topics":["apify","apify-api","cohere","langchain","llm-chatbot","openai-api","streamlit"],"latest_commit_sha":null,"homepage":"https://educhain-bot.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShruAgarwal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T12:34:38.000Z","updated_at":"2024-04-15T12:41:23.000Z","dependencies_parsed_at":"2024-03-19T15:28:16.006Z","dependency_job_id":"99ed27c5-f2a6-436b-b6a2-93a433c1b705","html_url":"https://github.com/ShruAgarwal/Activeloop-LangChain-CourseBot","commit_stats":null,"previous_names":["shruagarwal/activeloop-langchain-coursebot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShruAgarwal%2FActiveloop-LangChain-CourseBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShruAgarwal%2FActiveloop-LangChain-CourseBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShruAgarwal%2FActiveloop-LangChain-CourseBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShruAgarwal%2FActiveloop-LangChain-CourseBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShruAgarwal","download_url":"https://codeload.github.com/ShruAgarwal/Activeloop-LangChain-CourseBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240139095,"owners_count":19754048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apify","apify-api","cohere","langchain","llm-chatbot","openai-api","streamlit"],"created_at":"2024-09-27T12:39:24.155Z","updated_at":"2026-02-10T01:31:04.288Z","avatar_url":"https://github.com/ShruAgarwal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Chat with EduChain Bot\n### An LLM companion for answering your questions related to the [LangChain \u0026 Vector DBs in Production course](https://learn.activeloop.ai/courses/langchain) brought by *[Activeloop](https://www.activeloop.ai/)*\n\n## Demo 🕹\n[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://educhain-bot.streamlit.app/)\n\nhttps://github.com/ShruAgarwal/Activeloop-LangChain-CourseBot/assets/82811717/55c29e11-cc27-4e9d-8d69-848a48e724e8\n\n## How to use 👀\n\n1. Enter your OpenAI API key.\n   - You can get your own OpenAI API key from [here](https://platform.openai.com/account/api-keys) and then click on the `+ Create new secret key` button.\n2. You can now proceed to ask questions related to the course to the chatbot.\n\n## Behind the Scenes ⚙\nThis 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.\n\n*Here's a summary of the scripts used for building this chatbot:*\n\n1. `data_loading.py`:\n   - Handles the initial data gathering and processing task where it scrapes the text data from the Langchain course website using **[Apify](https://apify.com/)**.\n   - The scraped text data is then converted into numerical form (vectors) using [`CohereEmbeddings`](https://docs.cohere.com/docs/embeddings) that the chatbot can learn from.\n   - Finally, the transformed data is uploaded to **[Deep Lake](https://docs.activeloop.ai/)**, a data storage service, for future use.\n\n2. `app_workflow.py`:\n   - Handles the retrieval and ranking of the relevant data.\n   - First, it gathers the stored data from the `data_loading.py` file.\n   - Second, it uses `CohereRerank` to rank and retrieve the most relevant data based on the user’s query.\n      - `CohereRerank` is a reranking service that refines and ranks documents in alignment with a user’s search criteria.\n   - Third, it also builds the conversation chain with memory, which helps in maintaining the context of the conversation.\n\n3. `app_demo.py`:\n   - The main script demonstrates the working of the chatbot through a user-friendly web interface using **Streamlit**.\n   - The chatbot then uses the stored and transformed data from **Deep Lake** to answer user queries.\n\n### Tech-stack 🛠\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/ShruAgarwal/Activeloop-LangChain-CourseBot/blob/main/tech_stack.png\"/\u003e\n\u003c/p\u003e\n\n## Key Learnings 🌱\n- Provided a deep understanding of how RAG can be used to answer queries by retrieving relevant information from a detailed knowledge base.\n- Involves scraping data from a course website, which helped in understanding how to extract and structure data from the web.\n- The use of **Cohere** for embedding and reranking provided insights into how these techniques can improve the relevance of the retrieved information.\n- Storing the transformed data in Deep Lake helped in understanding the importance of efficient data storage and retrieval in AI applications.\n- Demonstrated how to integrate powerful APIs and libraries like **OpenAI and Langchain** to build a sophisticated chatbot.\n- Highlightes the potential of AI in enhancing educational experiences, by providing a chatbot that can answer course-related queries.\n- Helped with learning *project management, problem-solving, and debugging skills* to bring all the components together into a working chatbot.\n\n## Credits ✨\n- *Inspired to build this chatbot from* [this tutorial!](https://www.activeloop.ai/resources/retrieval-augmented-generation-for-llm-bots-with-lang-chain/)\n- *Thanks to* [Yuichiro's Streamlit Theme Editor](https://github.com/whitphx/streamlit-theme-editor) that helped me find the suitable app's theme :)\n- *Chatbot logo and tech stack design made by me using [Canva](https://www.canva.com/)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshruagarwal%2Factiveloop-langchain-coursebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshruagarwal%2Factiveloop-langchain-coursebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshruagarwal%2Factiveloop-langchain-coursebot/lists"}