{"id":22787027,"url":"https://github.com/bayyy7/agentic_rag-v1","last_synced_at":"2025-03-30T15:46:13.619Z","repository":{"id":267247901,"uuid":"900654898","full_name":"bayyy7/agentic_rag-v1","owner":"bayyy7","description":"End-to-End Chatbot app with RAG system using Langchain and Streamlit","archived":false,"fork":false,"pushed_at":"2024-12-23T04:32:44.000Z","size":2316,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T17:27:02.197Z","etag":null,"topics":["chatbot","langchain","langgraph","rag","streamlit"],"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/bayyy7.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-12-09T08:18:50.000Z","updated_at":"2024-12-23T04:32:48.000Z","dependencies_parsed_at":"2024-12-09T09:42:46.956Z","dependency_job_id":null,"html_url":"https://github.com/bayyy7/agentic_rag-v1","commit_stats":null,"previous_names":["bayyy7/agentic_rag-v1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayyy7%2Fagentic_rag-v1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayyy7%2Fagentic_rag-v1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayyy7%2Fagentic_rag-v1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayyy7%2Fagentic_rag-v1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayyy7","download_url":"https://codeload.github.com/bayyy7/agentic_rag-v1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342824,"owners_count":20761939,"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":["chatbot","langchain","langgraph","rag","streamlit"],"created_at":"2024-12-12T00:37:49.363Z","updated_at":"2025-03-30T15:46:13.593Z","avatar_url":"https://github.com/bayyy7.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agentic RAG with Langchain\n\n## 🌟 Project Overview\n\nThis is the implementation of using Google Gemini 1.5 Pro with langchain as framework. Allowing LLM to give an answer based on the given context (pdf). Also implemented using Langgrapph, a powerful state from Langchain, allowing developer to create custom flow or architecture, deliver with Chat Memory\n\n## ✨ Features\n\n- 📄 PDF Document Upload\n- 🤖 AI-Powered Knowledge Retrieval\n- 💬 Interactive Chat Interface\n- 🔍 Semantic Document Search\n\n## 🛠 Tech Stack\n\n- **Language Model**: Google Gemini 1.5 Pro\n- **Framework**: \n  - Streamlit\n  - LangChain\n- **Embedding**: Sentence Transformers\n- **Vector Store**: FAISS\n- **Programming Language**: Python 3.8+\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- Langchain\n- Google Generative AI API Key\n\n### Installation\n\n1. Clone the repository\n```bash\ngit clone https://github.com/bayyy7/agentic_rag-v1.git\ncd agentic_rag-v1.git\n```\n\n2. Create a virtual environment\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n```\n\n3. Install dependencies\n```bash\npip install -r requirements.txt\n```\n\n4. Configure environment variables\n- Create a `.env` file in the project root\n- Add your Google API key:\n```\nGOOGLE_GENERATIVE_AI=your_google_api_key_here\n```\n5. Create your system prompt\n- create `prompt` folder\n- create new python file `system_prompt.py`\n```\ndef system_prompt(tool_messages):\n   \"\"\"\n   Generate the system prompt content.\n   \"\"\"\n   docs_content = \"\\n\\n\".join(doc.content for doc in tool_messages)\n   return (\n      \"[YOUR PROMPT HERE]\"\n      f\"{docs_content}\\n\\n\"\n)\n```\n\n### Running the Application\n\n```bash\nstreamlit run app.py\n```\n### Custom Config\nYou can directly change the configuration on the `config/config.py`. There are several example you can change by what you want. Also be careful when changes the Embedding Model, you must known the dimension of the Embedding it self. This code below is the helper to know the size of embedding dimension.\n- Using the `embed_query` function\n```bash\nvector = embeddings.embed_query(\"aiueo\")\nmatrix = numpy.array(vector).astype('float32')\nlen(matrix)\n```\n- Using the `embed_document` function\n```bash\nvector = embeddings.embed_documents(str(\"aiueo\"))\nmatrix = numpy.array(vector).astype('float32')\nmatrix.shape[1]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayyy7%2Fagentic_rag-v1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayyy7%2Fagentic_rag-v1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayyy7%2Fagentic_rag-v1/lists"}