{"id":25376497,"url":"https://github.com/rscr1/crag_project","last_synced_at":"2026-04-24T21:32:59.756Z","repository":{"id":277546628,"uuid":"932759090","full_name":"rscr1/crag_project","owner":"rscr1","description":"Crag implementation","archived":false,"fork":false,"pushed_at":"2025-03-14T07:55:48.000Z","size":694,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T16:49:19.937Z","etag":null,"topics":["langgraph","llamaindex","python","streamlit","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rscr1.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}},"created_at":"2025-02-14T13:20:35.000Z","updated_at":"2025-03-14T07:55:52.000Z","dependencies_parsed_at":"2025-04-09T09:49:37.070Z","dependency_job_id":"62a8fbdc-e688-4455-baf9-af33336038d4","html_url":"https://github.com/rscr1/crag_project","commit_stats":null,"previous_names":["rscr1/crag_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rscr1/crag_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rscr1%2Fcrag_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rscr1%2Fcrag_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rscr1%2Fcrag_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rscr1%2Fcrag_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rscr1","download_url":"https://codeload.github.com/rscr1/crag_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rscr1%2Fcrag_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["langgraph","llamaindex","python","streamlit","transformers"],"created_at":"2025-02-15T04:28:04.885Z","updated_at":"2026-04-24T21:32:59.734Z","avatar_url":"https://github.com/rscr1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knowledge Assistant\n\n## Overview\nThe Knowledge Assistant is a web application designed to provide answers to user queries by leveraging a Retrieval-Augmented Generation (RAG) approach. This application utilizes various libraries and models to perform web searches, retrieve relevant documents, and generate responses based on the context provided.\n\n## Example Outputs\nHere are some examples of the application in action:\n\n**In-domain (without web-search)**:\n   ![alt text](/src/example1.png)\n   ![alt text](/src/example2.png)\n\n**Out-of-fomain (with web-search)**:\n    ![alt text](/src/example3.png)\n    ![alt text](/src/example4.png)\n\n## Libraries Used\nThe following libraries are utilized in this project:\n\n- **Streamlit**: For creating the web interface.\n- **Torch**: For deep learning model operations.\n- **Transformers**: For loading and using pre-trained models.\n- **Ollama**: for inference LLM.\n- **DuckDuckGo Search**: For performing web searches.\n- **LangGraph**: For managing the workflow of the RAG process.\n- **LlamaIndex**: For handling document embeddings and retrieval.\n- **Tiktoken**: For tokenization of text inputs.\n- **SQLite**: For storing chat history in a local database.\n\n## Key Entities in RAG\nThe application implements several key entities in the RAG framework:\n\n- **MyEmbeddings**: A custom embedding class that generates embeddings for queries and documents using a pre-trained model.\n- **VectorStoreManager**: Manages the vector store, loading data, and creating embeddings for documents.\n- **GraphState**: Represents the state of the RAG workflow, including the user's question, retrieved documents, and generated responses.\n- **Workflow Graph**: A directed graph that defines the sequence of operations (nodes) and their connections (edges) in the RAG process.\n\n## CRAG Method Implementation\nThe application implements the CRAG (Conditional Retrieval-Augmented Generation) method, which enhances the response generation process by conditionally deciding whether to perform a web search or generate a response based on the retrieved documents' relevance. The workflow consists of the following steps:\n\n1. **Retrieve**: Fetch relevant documents from the vector store based on the user's query.\n2. **Grade**: Evaluate the relevance of the retrieved documents using a reranker.\n3. **Web Search**: If necessary, perform a web search to gather additional context.\n4. **Generate**: Synthesize a final response using the available context from both retrieved documents and web search results.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frscr1%2Fcrag_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frscr1%2Fcrag_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frscr1%2Fcrag_project/lists"}