Project Description: Agentic Retrieval-Augmented Generation (RAG) Application This project involves building an agentic Retrieval-Augmented Generation (RAG) application designed to generate contextually grounded responses to user queries. The model leverages specific data stored in a vector database, ensuring high accuracy and relevance in its outputs.
Agentic Architecture and Tech Stack:
- Vector Database: Pinecone is utilized as the vector database, providing efficient storage and retrieval of relevant embeddings.
- Model and Embeddings: OpenAI powers both the model and embedding generation for semantic understanding and accurate responses.
- Orchestration Framework: LangGraph serves as an orchestration framework for managing complex agentic workflows.
Application Behavior: The model exclusively generates responses based on the context retrieved from the Pinecone database. Queries outside the retrieved context are intentionally left unanswered to maintain accuracy and relevance.
Example Interaction:
User Query: What was Amazon.com's annual visitor count in 2008, and how much did it grow afterward?
Response: In 2008, Amazon.com had 615 million annual visitors. By 2022, this figure grew to over 2 billion monthly visitors. Converting monthly visitors to an annual figure (2 billion × 12 months = 24 billion), the growth from 2008 to 2022 was approximately 23.385 billion additional visitors annually. This architecture ensures precise, contextually grounded responses while avoiding irrelevant or speculative outputs.
Setup to follow -
- Create a virtual environment - python3 -m venv virtual-env-name
- Activate the virtual environment - source virtual-env-name/bin/activate
- Install all the dependencies using the requirements.txt file - pip install -r requirements.txt
- I have used Amazon.com company's wiki page.
- I have used the pinecone database as my vector database. Create one account and start using it. Sign Up here - https://app.pinecone.io/
- Keep your OPENAI_API_KEY and PINECONE_API_KEY handy.