{"id":28152370,"url":"https://github.com/krishmakhijani/rag_vs_agenticrag","last_synced_at":"2025-11-09T18:01:32.618Z","repository":{"id":293114589,"uuid":"981442781","full_name":"krishmakhijani/RAG_vs_AgenticRAG","owner":"krishmakhijani","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-05-11T12:25:52.000Z","size":1373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T19:04:04.116Z","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/krishmakhijani.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-05-11T12:26:12.000Z","dependencies_parsed_at":"2025-05-13T19:04:10.381Z","dependency_job_id":"90c1c970-701a-42fa-b33f-aff9e32ed6fe","html_url":"https://github.com/krishmakhijani/RAG_vs_AgenticRAG","commit_stats":null,"previous_names":["krishmakhijani/rag_vs_agenticrag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishmakhijani%2FRAG_vs_AgenticRAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishmakhijani%2FRAG_vs_AgenticRAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishmakhijani%2FRAG_vs_AgenticRAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishmakhijani%2FRAG_vs_AgenticRAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishmakhijani","download_url":"https://codeload.github.com/krishmakhijani/RAG_vs_AgenticRAG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276462,"owners_count":22043868,"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","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-05-15T05:09:10.952Z","updated_at":"2025-11-09T18:01:32.611Z","avatar_url":"https://github.com/krishmakhijani.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%2Fkrishmakhijani%2Frag_vs_agenticrag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishmakhijani%2Frag_vs_agenticrag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishmakhijani%2Frag_vs_agenticrag/lists"}