{"id":28977017,"url":"https://github.com/unikill066/agentic-rag","last_synced_at":"2026-04-13T18:02:07.623Z","repository":{"id":300673497,"uuid":"1006574316","full_name":"unikill066/agentic-rag","owner":"unikill066","description":"This isn't just another RAG implementation, it's an agentic system that intelligently decides when and how to retrieve information.","archived":false,"fork":false,"pushed_at":"2025-07-04T20:05:13.000Z","size":9679,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T21:20:16.298Z","etag":null,"topics":["agentic-ai","agentic-rag","langchain","langchain-python","langgraph","langgraph-python","rag"],"latest_commit_sha":null,"homepage":"https://agentic-rag-gnqmsrmdhun5d9f4jua9p2.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unikill066.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-06-22T15:10:55.000Z","updated_at":"2025-07-04T20:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5276d04-5e7a-441a-96f1-b82df50135ab","html_url":"https://github.com/unikill066/agentic-rag","commit_stats":null,"previous_names":["unikill066/agentic-rag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unikill066/agentic-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikill066%2Fagentic-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikill066%2Fagentic-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikill066%2Fagentic-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikill066%2Fagentic-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unikill066","download_url":"https://codeload.github.com/unikill066/agentic-rag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikill066%2Fagentic-rag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31764317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"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":["agentic-ai","agentic-rag","langchain","langchain-python","langgraph","langgraph-python","rag"],"created_at":"2025-06-24T15:00:33.145Z","updated_at":"2026-04-13T18:02:07.617Z","avatar_url":"https://github.com/unikill066.png","language":"Python","readme":"# Agentic RAG Chatbot\n![Python](https://img.shields.io/badge/python-3.13%2B-blue?logo=python)\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n![OpenAI API](https://img.shields.io/badge/Powered_by-OpenAI_API-orange)\n\n![Agentic RAG Chatbot](misc/AgenticRAGChatbot.gif)\n\nAn **agentic Retrieval-Augmented Generation (RAG)** chatbot powered by [LangGraph](https://github.com/unikill066/langgraph), OpenAI’s GPT-3.5-turbo, and a Chroma vector store. It allows you to ask questions about **Nikhil Nageshwar Inturi’s** background, publications, projects, and qualifications, and get grounded answers sourced from indexed PDFs and other documents.\n\nThe app supports one upload at a time; progress bars updates live. More on the steps that go into the pipeline can be found here: \u003cp align=\"left\"\u003e\n  \u003ca href=\"docs/agentic-rag_wiki.md\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Step–by–Step-Docs-blue?style=for-the-badge\" alt=\"Step-by-Step Docs\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n```mermaid\ngraph TD\n    A[Start] --\u003e B[RAG Agent]\n    B --\u003e C{tools_condition}\n    C --\u003e|tools| D[Retriever Node]\n    C --\u003e|END| E[End]\n    D --\u003e F{document_quality}\n    F --\u003e|generator| G[Generator]\n    F --\u003e|rewrite| H[Rewrite]\n    G --\u003e E\n    H --\u003e B\n```\n\n### Difference b/w [Traditional RAG](https://nikhilrag-ntbaxj9puvp37yaqvkqsiu.streamlit.app/) \u0026 Agentic RAG\n| Feature                            | Traditional RAG                                                                                   | Agentic RAG                                                                                           |\n|------------------------------------|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| **Overview**                       | Retriever → Generator; static pipeline grounded in retrieved context.                              | RAG + intelligent agent; dynamic decision-making, planning \u0026 tool use.                                |\n| **Architecture**                   | Fixed sequence: query → embedding → retrieve top-k → prompt → LLM answer.                         | Loop of “Thought → Tool → Observation”; agent decides when/where/how to retrieve or call tools.       |\n| **Workflow**                       | One-shot: embed \u0026 retrieve → augment prompt → generate answer.                                     | Iterative: plan → retrieve → evaluate → (re-retrieve…) → generate → (optional verify).                |\n| **Memory \u0026 Reasoning**             | No built-in memory; reasoning is one-pass inside the final LLM call.                              | Maintains state across steps; chain-of-thought exposes planning, self-correction \u0026 long-term memory.  |\n| **Use Cases**                      | Simple QA on a single knowledge source.                                                           | Complex, multi-step tasks; multi-source routing; tool-augmented actions (e.g. charts, APIs).         |\n| **Trade-offs**                     | Simpler, faster, cheaper, easier to debug; limited adaptability.                                  | More flexible \u0026 accurate; handles ambiguity; higher latency, cost \u0026 engineering complexity.          |\n| **LangChain       | Chains: static RetrievalQA/ConversationRetrieval.                                                 | Agents: wrap retrievers as tools (LangChain Agents)      |\n\n\u003e Note: Check out the RAG implementation in this repository: [NikhilRAG](https://github.com/unikill066/NikhilRAG)\n\n## Features\n\n* **Agentic RAG pipeline**\n  A state‐graph (`graph.py`) orchestrates:\n\n  1. A router/agent node that decides whether to call a document retriever tool\n  2. A document‐quality checker to route between rewriting or generation\n  3. A generator node that synthesizes answers from retrieved context\n  4. A rewrite node that reformulates queries when no relevant docs are found\n\n      ![Graph Overview](misc/graph.png)\n\n* **Custom retriever tool**\n  Uses [Chroma](https://github.com/langchain-community/langchain-community) to index and retrieve document chunks (via `embed_generator.py` → `./chroma_db`), exposed as a named tool for the agent.\n\n* **Streamlit front-end**\n  A chat UI (`streamlit_app.py`) to interact with your RAG agent in real time:\n\n  * Initializes and persists `st.session_state.messages`\n  * Shows a welcome prompt and conversation history\n  * Invokes the compiled LangGraph state‐graph under the hood\n  * Displays “Thinking…” spinners and debug info on demand\n\n* **Embeddings \u0026 indexing**\n  `embed_generator.py` loads PDFs from `./docs`, splits into chunks, and persists embeddings in `./chroma_db`.\n\n* **Retrieval QA demo**\n  A standalone retrieval‐QA script (`bin/retriever.py`) to sanity-check your vector store outside of the state graph.\n\n## Getting Started\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/unikill066/agentic-rag.git\ncd agentic-rag\n```\n\n### 2. Install dependencies\n\nUsing **pip** (via `requirements.txt`):\n\n```bash\npip install uv\nuv venv .venv\nsource .venv/bin/activate\nuv pip install -r requirements.txt\n```\n\nOr with **Poetry**, `uv` is just 10-100X faster (via `pyproject.toml`):\n\n```bash\npoetry install\npoetry shell\n```\n\n### 3. Environment variables\n\nCreate a `.env`(refer to .env.example) in the repo root and set your OpenAI API key (and, if used, Firebase credentials):\n\n```ini\nOPENAI_API_KEY=sk-...\nLANGSMITH_TRACING=true\nLANGSMITH_ENDPOINT=\"https://api.smith.langchain.com\"\nLANGSMITH_API_KEY=ls-...\nLANGSMITH_PROJECT=\"proj_name\"\n```\n\n### 4. Index your documents\n\nPut any `.pdf` files you want to query into `./docs/` then run:\n\n```bash\npython bin/embed_generator.py\n```\n\nThis will split and embed your PDFs into `./chroma_db`.\n\n### 5. Run the Streamlit app\n\n```bash\nstreamlit run streamlit_app-local.py\n```\n\nOpen your browser at `http://localhost:8501` and start asking questions!\n\n## Repo Structure\n\n```\n.\n├── bin/\n│   ├── embed_generator.py     # PDF -\u003e Chroma embedding pipeline\n│   └── retriever.py           # Standalone RetrievalQA demo for testing\n├── chroma_db\n├── constants.py\n├── graph.py                   # builds \u0026 compiles the LangGraph Agentic RAG agent\n├── streamlit_app.py           # Streamlit front‐end \u0026 chat UI\n├── requirements.txt\n├── pyproject.toml\n└── README.md\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n\u003e Built by [Nikhil Nageshwar Inturi](https://github.com/unikill066) • 2025-06-22\n\u003e\n\u003e Contact: [ Gmail ](mailto:inturinikhilnageshwar@gmail.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funikill066%2Fagentic-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funikill066%2Fagentic-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funikill066%2Fagentic-rag/lists"}