User Queries over Unstructured Data:
“What is the application process for NEET PG?”
“How many examination centers available for NEET PG exam?”
These queries require detailed, context-rich information that is usually found in unstructured data sources like research papers, industry reports, and meeting minutes. If the RAG model only pulled structured data, the responses could lack depth and contextual relevance.
Our Solution: Agentic RAG
To address this limitation, we implemented Agentic RAG. This method enhances the basic RAG approach by incorporating an intelligent agent that can understand the nature of the query and determine the appropriate data source for the response.
Agentic RAG utilizes a combination of natural language processing (NLP) techniques and machine learning algorithms to classify queries. It can dynamically decide whether to pull information from structured databases or unstructured text corpora, ensuring that the responses are not only accurate but also relevant to the context of the query.
Implementing Agentic RAG with OpenAI
1. OpenAI’s Assistant: We used OpenAI’s Assistant APIs as the main component of our RAG system, ensuring high-quality, human-like responses.
2. Function Calling: This feature allowed us to integrate various functions that the assistant could call upon to process specific tasks, such as querying databases or retrieving documents.
3. File Retrieval: We developed a file retrieval system to efficiently access and retrieve documents from our unstructured data sources.
How Agentic RAG Works
1. Query Classification: The agent, in our case OpenAI Assistant classifies incoming queries to determine if they require retrieval over structured or unstructured data.
2. Data Retrieval: Based on the classification, the system retrieves the necessary information from the appropriate document or calls relevant function for data
3. Response Generation: OpenAI’s assistant generates a response using the retrieved information, ensuring it is appropriate.