{"id":30720196,"url":"https://github.com/krishstwt/rag_vs_agenticrag","last_synced_at":"2025-09-03T11:01:58.995Z","repository":{"id":293114589,"uuid":"981442781","full_name":"krishstwt/RAG_vs_AgenticRAG","owner":"krishstwt","description":"This is a sample repository for the How Does Agentic RAG Outperform Traditional RAG? A TypeScript Journey with Pinecone and DeepSeek blog on medium","archived":false,"fork":false,"pushed_at":"2025-07-18T13:30:59.000Z","size":1373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T00:47:21.212Z","etag":null,"topics":["cohere","generative-ai","langgraph-js","llm","pinecone","rag","vector-database"],"latest_commit_sha":null,"homepage":"https://medium.com/@krishmakhijani/how-does-agentic-rag-outperform-traditional-rag-a-typescript-journey-with-pinecone-and-deepseek-9d6b91045e90","language":"TypeScript","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/krishstwt.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-05-11T05:40:27.000Z","updated_at":"2025-07-18T13:31:03.000Z","dependencies_parsed_at":"2025-05-13T19:04:10.381Z","dependency_job_id":"90c1c970-701a-42fa-b33f-aff9e32ed6fe","html_url":"https://github.com/krishstwt/RAG_vs_AgenticRAG","commit_stats":null,"previous_names":["krishmakhijani/rag_vs_agenticrag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krishstwt/RAG_vs_AgenticRAG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishstwt%2FRAG_vs_AgenticRAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishstwt%2FRAG_vs_AgenticRAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishstwt%2FRAG_vs_AgenticRAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishstwt%2FRAG_vs_AgenticRAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishstwt","download_url":"https://codeload.github.com/krishstwt/RAG_vs_AgenticRAG/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishstwt%2FRAG_vs_AgenticRAG/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273431417,"owners_count":25104496,"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-09-03T02:00:09.631Z","response_time":76,"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":["cohere","generative-ai","langgraph-js","llm","pinecone","rag","vector-database"],"created_at":"2025-09-03T11:00:31.353Z","updated_at":"2025-09-03T11:01:58.951Z","avatar_url":"https://github.com/krishstwt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAG vs AgenticRAG\n\nThis project compares **Retrieval-Augmented Generation (RAG)** with **Agentic RAG** for querying and analyzing PDF documents using Pinecone, LangChain, and Groq.\n\n## Prerequisites\n\n1. **Node.js** and **Bun** installed.\n2. API keys for:\n   - Pinecone\n   - OpenAI\n   - Cohere\n   - Groq\n   - LlamaParse (Llama Cloud)\n\n## Setup\n\n### 1. Install Dependencies\n\nRun the following command to install all dependencies:\n\n```bash\nbun install\n```\n\n### 2. Set Up Environment Variables\n\nCreate a `.env` file in the root directory and add the following keys:\n\n```env\nPINECONE_API_KEY=your_pinecone_api_key\nOPENAI_API_KEY=your_openai_api_key\nCOHERE_API_KEY=your_cohere_api_key\nGROQ_KEY=your_groq_api_key\nLLAMA_CLOUD_API_KEY=your_llama_cloud_api_key\n```\n\n### 3. Add PDF to Vector Store\n\nTo parse and store a PDF in Pinecone, run the following script:\n\n```bash\nbun run src/scripts/vectorStore.ts\n```\n\nThis script uses LlamaParse to extract text from the PDF and stores it in Pinecone.\n\n### 4. Run Traditional RAG\n\nTo execute the **Traditional RAG** agent, run:\n\n```bash\nbun run src/agent/traditional_rag_agent.ts\n```\n\nThis agent performs a similarity search in Pinecone and returns the most relevant information.\n\n### 5. Run Agentic RAG\n\nTo execute the **Agentic RAG** agent, run:\n\n```bash\nbun run src/agent/agentic_rag_agent.ts\n```\n\nThis agent includes additional steps like query rewriting and relevance checking to improve the quality of the response.\n\n## Project Structure\n\n- **`src/scripts/vectorStore.ts`**: Parses and stores PDFs in Pinecone.\n- **`src/tools/pinecone_search.ts`**: Handles Pinecone similarity search and Cohere reranking.\n- **`src/agent/traditional_rag_agent.ts`**: Implements the Traditional RAG pipeline.\n- **`src/agent/agentic_rag_agent.ts`**: Implements the Agentic RAG pipeline with query rewriting and relevance checking.\n\n## Notes\n\n- Ensure the PDF path in `vectorStore.ts` is correct before running the script.\n- The project uses Groq for LLM inference, but you can replace it with other models if needed.\n\n## License\n\nThis project is open-source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishstwt%2Frag_vs_agenticrag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishstwt%2Frag_vs_agenticrag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishstwt%2Frag_vs_agenticrag/lists"}