{"id":22190809,"url":"https://github.com/aryan-coder-student/chatpdf","last_synced_at":"2026-04-08T18:01:51.927Z","repository":{"id":264918913,"uuid":"889981264","full_name":"Aryan-coder-student/ChatPDF","owner":"Aryan-coder-student","description":"An interactive Streamlit app that allows users to upload documents (PDF, TXT) and chat with them using a Retrieval-Augmented Generation (RAG) model. The app leverages LangChain for document parsing and retrieval, Chroma for vector storage, and a LLM for answering queries based on document content.","archived":false,"fork":false,"pushed_at":"2025-05-19T17:59:17.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T01:46:41.565Z","etag":null,"topics":["generative-ai","langchain","python","rag","streamlit","vector-database"],"latest_commit_sha":null,"homepage":"https://bascirag-chatpdf.streamlit.app/","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/Aryan-coder-student.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-17T18:10:58.000Z","updated_at":"2025-05-19T17:59:21.000Z","dependencies_parsed_at":"2025-10-10T01:45:20.168Z","dependency_job_id":"4f69d355-ca17-40b8-8906-afc5874736b0","html_url":"https://github.com/Aryan-coder-student/ChatPDF","commit_stats":null,"previous_names":["aryan-coder-student/chatpdf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aryan-coder-student/ChatPDF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aryan-coder-student%2FChatPDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aryan-coder-student%2FChatPDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aryan-coder-student%2FChatPDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aryan-coder-student%2FChatPDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aryan-coder-student","download_url":"https://codeload.github.com/Aryan-coder-student/ChatPDF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aryan-coder-student%2FChatPDF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["generative-ai","langchain","python","rag","streamlit","vector-database"],"created_at":"2024-12-02T12:12:42.544Z","updated_at":"2026-04-08T18:01:51.903Z","avatar_url":"https://github.com/Aryan-coder-student.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Document Chat Assistant 🤖\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Language-Python-blue?style=for-the-badge\u0026logo=python\" alt=\"Python\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Framework-Streamlit-red?style=for-the-badge\u0026logo=streamlit\" alt=\"Streamlit\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/AI-Retrieval%20Augmented%20Generation-green?style=for-the-badge\" alt=\"RAG\"\u003e\n\u003c/div\u003e\n\n## 🌟 Project Overview\n\nRevolutionize document interaction with our cutting-edge **Document Chat Assistant**! This intelligent application empowers users to upload, analyze, and explore multiple documents through an intuitive, AI-powered chat interface.\n\n---\n\n## ✨ Key Features\n\n| Feature | Description | 🚀 Highlights |\n|---------|-------------|---------------|\n| 🗂️ Multi-Document Upload | Upload PDF and TXT files seamlessly | Process multiple documents simultaneously |\n| 🧠 Smart Document Processing | Advanced document chunking and embedding | Uses state-of-the-art NLP techniques |\n| 💬 RAG-Powered Interaction | Context-aware response generation | Combines retrieval and language models |\n| 💾 Persistent Document Storage | Efficient embedding management | Utilizes Chroma for quick information retrieval |\n| 🤝 Interactive Chat Interface | Natural language document exploration | Ask complex questions, get precise answers |\n| 🔄 Flexible Reset Options | Manage chat and database | Easy reset for new document sets |\n\n---\n\n![image](https://github.com/user-attachments/assets/af6cf2c8-de42-4918-9ecf-8baf642c5c95)\n\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- 🐍 Python 3.8+\n- 📦 pip package manager\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/document-chat-assistant.git\n\n# Navigate to project directory\ncd document-chat-assistant\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### Running the Application\n\n```bash\n# Launch Streamlit application\nstreamlit run app.py\n```\n\n---\n\n## 🔍 How It Works\n\n```mermaid\ngraph TD\n    A[Upload Documents] --\u003e B[Preprocess Documents]\n    B --\u003e C[Create Embeddings]\n    C --\u003e D[Store in Chroma]\n    D --\u003e E[User Query]\n    E --\u003e F[Retrieve Relevant Context]\n    F --\u003e G[Generate AI Response]\n    G --\u003e H[Display Answer]\n```\n\n### Code Breakdown\n\n#### Document Upload and Processing\n\n**File Uploader**:\n```python\nuploaded_files = st.file_uploader(\n    \"Upload Documents\", \n    type=[\"pdf\", \"txt\"], \n    accept_multiple_files=True\n)\n```\n\n**Document Processing Workflow**:\n```python\ndef process_documents(uploaded_files):\n    documents = []\n    for file in uploaded_files:\n        # Use appropriate loader based on file type\n        if file.type == \"application/pdf\":\n            loader = PyPDFLoader(file)\n        else:\n            loader = TextLoader(file)\n        \n        # Split documents into chunks\n        text_splitter = RecursiveCharacterTextSplitter(\n            chunk_size=500,\n            chunk_overlap=50\n        )\n        document_chunks = text_splitter.split_documents(loader.load())\n        \n        # Create embeddings\n        embeddings = HuggingFaceEmbeddings()\n        vectorstore.add_documents(document_chunks)\n        \n    return documents\n```\n\n#### RAG Prompt Template\n```python\nprompt_template = \"\"\"\nYou are a helpful assistant. Answer the question based strictly on the provided context.\nThink step by step and provide a detailed, accurate response.\n\nContext:\n{context}\n\nQuestion: {question}\nHelpful Answer:\"\"\"\n```\n\n### Key Technologies\n\n- 🧠 **AI/ML**: \n  - LangChain\n  - HuggingFace Embeddings\n  - ChatGroq\n- 🌐 **Web Framework**: Streamlit\n- 💾 **Vector Database**: Chroma\n\n---\n\n## 🤝 Contributing\n\nInterested in improving the Document Chat Assistant? We welcome contributions!\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## 📜 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n---\n\n\n**Created with ❤️ by AI Enthusiasts **\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryan-coder-student%2Fchatpdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryan-coder-student%2Fchatpdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryan-coder-student%2Fchatpdf/lists"}