{"id":25296027,"url":"https://github.com/sar-dul/rag-chatbot","last_synced_at":"2026-05-04T01:35:30.817Z","repository":{"id":276824165,"uuid":"930436610","full_name":"sar-dul/RAG-Chatbot","owner":"sar-dul","description":"RAG-powered document chatbot using Llama 3.2 with hybrid retrieval, conversational history, and Gradio interface.","archived":false,"fork":false,"pushed_at":"2025-02-10T16:55:59.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T20:49:44.926Z","etag":null,"topics":["chatbot","langchain","llama3","rag","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/sar-dul.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":"2025-02-10T16:24:54.000Z","updated_at":"2025-04-03T09:10:54.000Z","dependencies_parsed_at":"2025-02-10T17:26:22.886Z","dependency_job_id":"873a76bd-05d2-400f-bff1-7aa3db29fa5e","html_url":"https://github.com/sar-dul/RAG-Chatbot","commit_stats":null,"previous_names":["sar-dul/rag-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sar-dul/RAG-Chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sar-dul%2FRAG-Chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sar-dul%2FRAG-Chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sar-dul%2FRAG-Chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sar-dul%2FRAG-Chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sar-dul","download_url":"https://codeload.github.com/sar-dul/RAG-Chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sar-dul%2FRAG-Chatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chatbot","langchain","llama3","rag","sqlite3"],"created_at":"2025-02-13T02:55:03.559Z","updated_at":"2026-05-04T01:35:30.802Z","avatar_url":"https://github.com/sar-dul.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Query Chatbot (RAG-Based)\n\nThis repository contains a **RAG-based Document Query Chatbot** powered by **Llama 3.2** from **Ollama**. The chatbot can retrieve answers from uploaded documents using a **hybrid retriever (vector search + BM25)**, rerank results with a **cross-encoder**, maintain **conversational history**, support **function calling**, and **store chat history in SQLite3**.\n\n## Features\n- **Hybrid Retrieval**: Uses both **BM25** and **Vector Search** to retrieve relevant document passages.\n- **Cross-Encoder Reranking**: Improves retrieved results before passing them to the LLM.\n- **Conversational \u0026 History-Aware**: Maintains previous interactions for contextual responses.\n- **Function Calling**: Supports external API calls and tool usage within responses.\n- **Chat History Storage**: Saves interactions in an **SQLite3** database for future reference.\n- **Gradio UI**: Provides an interactive chat interface.\n\n## File Structure\n```\n📂 chatbot-repo\n├── chatbot.ipynb  # Jupyter Notebook for chatbot implementation\n├── chat.py        # Functions extracted from chatbot.ipynb\n├── UI.py          # Gradio-based chatbot inference UI\n├── README.md      # Project documentation\n```\n\n## Setup Instructions\n\n### 1. Install Dependencies\nEnsure you have **Python 3.8+** installed. Then, install the required dependencies:\n```bash\npip install -r requirements.txt\n```\n*(You may need to create a `requirements.txt` file listing dependencies like `gradio`, `langchain`, `ollama`, `sqlite3`, etc.)*\n\n### 2. Install and Run Ollama\nOllama is required to run **Llama 3.2** locally. Install it using:\n```bash\ncurl -fsSL https://ollama.com/install.sh | sh\n```\nThen, download **Llama 3.2**:\n```bash\nollama pull llama3\n```\n\n### 3. Run the Chatbot\nStart the chatbot with:\n```bash\npython UI.py\n```\nThis will launch the **Gradio UI**, allowing users to interact with the chatbot.\n\n## Usage\n1. Upload documents (PDFs, text files, etc.).\n2. Ask questions related to the uploaded content.\n3. The chatbot retrieves and reranks the best answers.\n4. View past conversations stored in SQLite3.\n\n## Future Improvements\n- Support for **more LLMs** (e.g., GPT, Mistral, Claude).\n- Improved **retrieval and ranking** strategies.\n- Integration with **external APIs** for function calling.\n- Deployment on **Hugging Face Spaces** or **Streamlit Cloud**.\n\n## License\nThis project is licensed under the **MIT License**.\n\n---\n\n🔥 **Developed by Sardul Ojha** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsar-dul%2Frag-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsar-dul%2Frag-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsar-dul%2Frag-chatbot/lists"}