{"id":31758590,"url":"https://github.com/emredeveloper/rag-with-cache","last_synced_at":"2026-05-16T17:39:51.025Z","repository":{"id":273503944,"uuid":"919705649","full_name":"emredeveloper/RAG-With-Cache","owner":"emredeveloper","description":"A comprehensive study and implementation of best practices for Retrieval-Augmented Generation (RAG) systems. This project includes advanced features like model caching, multilingual support, and evaluation metrics to enhance the performance and usability of RAG systems.","archived":false,"fork":false,"pushed_at":"2025-10-03T15:48:45.000Z","size":16500,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T22:43:49.752Z","etag":null,"topics":["artificial-intelligence","documentation","llm","python","rag"],"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/emredeveloper.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":"SECURITY.md","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":"2025-01-20T21:21:21.000Z","updated_at":"2025-10-03T15:48:48.000Z","dependencies_parsed_at":"2025-03-08T22:22:57.458Z","dependency_job_id":"6bbad259-db4d-4462-9e52-a801994646fa","html_url":"https://github.com/emredeveloper/RAG-With-Cache","commit_stats":null,"previous_names":["emredeveloper/rag-with-cache"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/emredeveloper/RAG-With-Cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emredeveloper%2FRAG-With-Cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emredeveloper%2FRAG-With-Cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emredeveloper%2FRAG-With-Cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emredeveloper%2FRAG-With-Cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emredeveloper","download_url":"https://codeload.github.com/emredeveloper/RAG-With-Cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emredeveloper%2FRAG-With-Cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33112398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["artificial-intelligence","documentation","llm","python","rag"],"created_at":"2025-10-09T20:47:22.148Z","updated_at":"2026-05-16T17:39:51.020Z","avatar_url":"https://github.com/emredeveloper.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 RAG-With-Cache\n\nA compact reference implementation of **Retrieval-Augmented Generation (RAG)**\nthat focuses on the core building blocks: PDF ingestion, vector search, and\nlanguage model generation. The codebase has been simplified so the main RAG\npipeline lives in a dedicated `rag/` package with minimal dependencies and a\nclean entry point.\n\n---\n\n## 🌟 Features\n\n- **Modular package layout** – Embedding, language, data-loading, and\n  retriever utilities are organised under `rag/` for easier reuse.\n- **FAISS and HyDE retrievers** – Switch between traditional dense retrieval\n  and HyDE-style hypothetical document retrieval from the command line.\n- **Model caching** – Embedding and language models are cached locally to\n  avoid repeated downloads.\n- **PDF utilities** – Lightweight helpers for loading and chunking documents.\n- **Test coverage** – Pytest suite that exercises each major component with\n  fast stubs.\n\n---\n\n## 🚀 Quick Start\n\n1. **Install dependencies**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. **Prepare your documents**\n\n   Place PDFs inside `data/pdfs/`. The directory is created automatically when\n   running the CLI, but adding files ahead of time lets you test retrieval\n   immediately.\n\n3. **Run the demo CLI**\n\n   ```bash\n   python main.py\n   ```\n\n   Choose between FAISS or HyDE retrieval when prompted and start asking\n   questions about your documents.\n\n---\n\n## 📁 Project Structure\n\n```text\n├── rag/\n│   ├── config.py             # Configuration dataclass\n│   ├── data/                 # PDF loading utilities\n│   ├── embeddings.py         # SentenceTransformer wrapper with caching\n│   ├── language.py           # HuggingFace causal LM wrapper with caching\n│   ├── retrievers/           # FAISS and HyDE retrievers\n│   └── system.py             # High-level RAG orchestration\n├── data/pdfs/                # PDF documents for retrieval\n├── tests/                    # Pytest suite\n├── main.py                   # Command-line entry point\n├── requirements.txt          # Minimal dependency set\n└── setup.py                  # Package metadata\n```\n\n---\n\n## 🧪 Running the Tests\n\n```bash\npytest\n```\n\nThe HyDE tests rely on stubbed models so they run quickly without downloading\nlarge checkpoints.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femredeveloper%2Frag-with-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femredeveloper%2Frag-with-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femredeveloper%2Frag-with-cache/lists"}