{"id":23571642,"url":"https://github.com/ankitrajput0096/QueryPal-Personalized-AI-Friend","last_synced_at":"2025-08-29T18:30:56.330Z","repository":{"id":269758908,"uuid":"908373341","full_name":"ankitrajput0096/QueryPal-Personalized-AI-Friend","owner":"ankitrajput0096","description":"QueryPal is a RAG system using Meta's Llama 2.0 (via Ollama), ChromaDB, and LangChain for seamless document retrieval and query handling. It offers precise answers to document-based and general queries through an intuitive, user-friendly dashboard.","archived":false,"fork":false,"pushed_at":"2024-12-30T09:36:23.000Z","size":6607,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T21:50:57.205Z","etag":null,"topics":["chromadb","docker","docker-compose","langchain","llama","ollama","python3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ankitrajput0096.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-25T22:43:26.000Z","updated_at":"2024-12-30T16:49:39.000Z","dependencies_parsed_at":"2024-12-30T10:19:51.394Z","dependency_job_id":"3111f1d6-050a-4ee8-a5f5-99d179a20c00","html_url":"https://github.com/ankitrajput0096/QueryPal-Personalized-AI-Friend","commit_stats":null,"previous_names":["ankitrajput0096/dockerized-rag-app-for-qa","ankitrajput0096/querypal-personalized-ai-friend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ankitrajput0096/QueryPal-Personalized-AI-Friend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitrajput0096%2FQueryPal-Personalized-AI-Friend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitrajput0096%2FQueryPal-Personalized-AI-Friend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitrajput0096%2FQueryPal-Personalized-AI-Friend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitrajput0096%2FQueryPal-Personalized-AI-Friend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankitrajput0096","download_url":"https://codeload.github.com/ankitrajput0096/QueryPal-Personalized-AI-Friend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitrajput0096%2FQueryPal-Personalized-AI-Friend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272736853,"owners_count":24984502,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chromadb","docker","docker-compose","langchain","llama","ollama","python3"],"created_at":"2024-12-26T20:18:56.337Z","updated_at":"2025-08-29T18:30:56.320Z","avatar_url":"https://github.com/ankitrajput0096.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QueryPal - Your Personalized AI Companion\n**Built with LLAMA 2 (via Ollama), ChromaDB, Docker, Flask, React, and Redux**\n\n---\n\n## Overview\n\nQueryPal is a **Retrieval-Augmented Generation (RAG)** system that leverages Meta's Llama 2.0 model (via **Ollama**), ChromaDB for vector storage, and LangChain for process orchestration. This project seamlessly combines document retrieval and query handling, enabling:\n\n- Contextually relevant responses to questions about uploaded documents.\n- General knowledge query answering.\n\nA sleek and intuitive dashboard enhances the user experience, making it easy to interact with the system.\n\n---\n\n## Screenshots\n\n### Homepage\n![Homepage](./images/photo_5.png)\n\n### Chat Interface\n![Chat Interface 1](./images/photo_6.png)\n![Chat Interface 2](./images/photo_7.png)\n![Chat Interface 3](./images/photo_8.png)\n\n---\n\n## RAG Architecture\n\nQueryPal integrates robust document retrieval capabilities with LLM-driven response generation to ensure accurate and context-aware answers. The process involves:\n\n- **Retriever**: Encoding and indexing external documents into vectors for similarity-based searches.\n- **Generator**: Using **Llama 2.0 (via Ollama)** to generate responses based on retrieved documents or pre-trained knowledge.\n\nLangChain orchestrates the workflow, ensuring a seamless integration of these components.\n\n![RAG Architecture](./images/RAG_arch_2.png)\n\n---\n\n## Features\n\n- **General Queries**: Answers a wide range of questions using Llama 2.0’s built-in knowledge, even without uploaded documents.\n- **Document-Based Q\u0026A**: Delivers precise, context-aware answers by analyzing uploaded documents.\n\n---\n\n## How It Works\n\n1. **Embedding Creation**: Generates document embeddings using HuggingFace.\n2. **Data Persistence**: Stores embeddings for future use.\n3. **Vector Database**: Builds a ChromaDB-based vector database for efficient retrieval.\n4. **Retriever Initialization**: Fetches relevant documents for user queries.\n5. **General Query Handling**: Leverages Llama 2.0 to answer questions unrelated to uploaded documents.\n6. **LLM Integration**: Ensures deterministic, contextually relevant answers using **Llama 2.0 (via Ollama)**.\n7. **Q\u0026A Pipeline**: Combines the retriever and generator components via LangChain.\n\n---\n\n## Project Structure\n\n- **Frontend**: Developed with React, featuring Redux for state management and React Router for navigation. The UI is intuitive and user-friendly.\n- **Backend**: Built on Flask, hosting the RAG stack and exposing necessary APIs.\n\n---\n\n## Getting Started\n\n### Clone the Repository\n\n```bash\ngit clone git@github.com:ankitrajput0096/QueryPal-Personalized-AI-Friend.git\ncd QueryPal-Personalized-AI-Friend\n```\n\n---\n\n## Building the Application\n\n### Using Docker\n\n1. Build the Docker image:\n   ```bash\n   docker-compose build\n   ```\n2. Start the Docker containers:\n   ```bash\n   docker-compose up\n   ```\n\n### Running the Pre-Built Docker Image\n\n1. Start the containers with:\n   ```bash\n   docker-compose -f docker-compose-run.yml up\n   ```\n\n---\n\n## Interacting with the Backend APIs\n\n### Postman API Collection\n\nA [Postman collection](./RAG_backend/RAG_stack.postman_collection.json) is included for easy API interaction. Import the collection and use the following endpoints:\n\n1. **General Query**\n   - **Description**: Handles questions unrelated to uploaded documents.\n   - **Endpoint**: `http://127.0.0.1:8090/ask_general_query`\n   - **Method**: POST\n   - **Request Body**:\n     ```json\n     {\n       \"query\": \"What is the capital of USA?\"\n     }\n     ```\n   ![Screenshot](./images/photo_1.png)\n\n2. **Upload Document**\n   - **Description**: Uploads documents for embedding and storage.\n   - **Endpoint**: `http://127.0.0.1:8090/upload_document`\n   - **Method**: POST\n   - **Request Body**: Form-data with key `file`.\n   ![Screenshot](./images/photo_2.png)\n\n3. **Similarity Search**\n   - **Description**: Finds content similar to a query in uploaded documents.\n   - **Endpoint**: `http://127.0.0.1:8090/similarity_search`\n   - **Method**: POST\n   - **Request Body**:\n     ```json\n     {\n       \"query\": \"Find content similar to this query.\"\n     }\n     ```\n   ![Screenshot](./images/photo_3.png)\n\n4. **Query Document**\n   - **Description**: Queries uploaded documents for specific information.\n   - **Endpoint**: `http://127.0.0.1:8090/query_document`\n   - **Method**: POST\n   - **Request Body**:\n     ```json\n     {\n       \"query\": \"What is the content of the document?\"\n     }\n     ```\n   ![Screenshot](./images/photo_4.png)\n\n5. **Upload and Query Text**\n   - **Description**: Uploads text and queries it simultaneously.\n   - **Endpoint**: `http://127.0.0.1:8090/text_and_query`\n   - **Method**: POST\n   - **Request Body**:\n     ```json\n     {\n       \"text\": \"Summary of A Brief History of Data Visualization...\",\n       \"query\": \"What were the changes during the 1850–1900 Golden Age of statistical graphics?\"\n     }\n     ```\n   ![Screenshot](./images/photo_9.png)\n\n---\n\nThis README ensures a clear understanding of QueryPal’s features and usage. Feel free to reach out with questions or suggestions!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitrajput0096%2FQueryPal-Personalized-AI-Friend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitrajput0096%2FQueryPal-Personalized-AI-Friend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitrajput0096%2FQueryPal-Personalized-AI-Friend/lists"}