Skip to content

Commit 4feaa06

Browse files
author
Kavyansh Chourasia
committed
Shiksha-API: Durable Functions updated README.md, included qdrant vector store and agent pool
1 parent ee3084b commit 4feaa06

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

shiksha-api/durable-functions/README.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,21 @@ The application consists of the following components:
2525

2626
## RAG Agent Strategies
2727

28-
The system supports two distinct Retrieval-Augmented Generation (RAG) strategies for content generation:
28+
The system supports multiple Retrieval-Augmented Generation (RAG) strategies for content generation, including:
2929

30-
### Vector Index RAG Agent (`VectorIndexRAGAgent`)
30+
31+
### Qdrant RAG Agent (`QdrantRAGAgent`)
32+
33+
- **Strategy**: Uses Qdrant vector database for scalable, production-grade vector search and retrieval
34+
- **Implementation**: Integrates with `QdrantRagOps` for querying Qdrant collections
35+
- **Best for**: Large-scale, high-performance semantic search and retrieval tasks
36+
- **How it works**:
37+
- The agent parses the `index_path` to determine the Qdrant collection and metadata filter
38+
- Uses Azure OpenAI for both embedding and completion
39+
- Queries Qdrant for relevant content using vector similarity and metadata filtering
40+
- Handles structured JSON responses and robust error handling
41+
42+
### Vector Index RAG Agent (Data store- Azure Blob) (`VectorIndexRAGAgent`)
3143

3244
- **Strategy**: Traditional vector-based retrieval using similarity search
3345
- **Implementation**: Uses `InMemRagOps` from the rag-wrapper library
@@ -37,7 +49,8 @@ The system supports two distinct Retrieval-Augmented Generation (RAG) strategies
3749
- Queries are embedded and matched against document vectors using cosine similarity
3850
- Most relevant content is retrieved based on semantic similarity
3951

40-
### Graph Index RAG Agent (`GraphIndexRAGAgent`)
52+
53+
### Graph Index RAG Agent (Data store- Azure Blob) (`GraphIndexRAGAgent`)
4154

4255
- **Strategy**: Property graph-based retrieval with entity and relationship awareness
4356
- **Implementation**: Uses `InMemGraphRagOps` from the rag-wrapper library
@@ -47,12 +60,27 @@ The system supports two distinct Retrieval-Augmented Generation (RAG) strategies
4760
- Enables sophisticated reasoning over interconnected concepts
4861
- Supports complex queries that require understanding of entity relationships
4962

50-
Both agents inherit from `BaseAzureBlobRAGAgent` which provides:
63+
64+
#### RAG agents with Azure blob as data store inherit `BaseAzureBlobRAGAgent` which provides:
5165

5266
- Azure OpenAI integration with structured JSON response formatting
5367
- Blob storage management for downloading and caching RAG indexes
5468
- Resource cleanup and error handling
5569

70+
## Agent Pool
71+
72+
The `AgentPool` class manages singleton instances of all agent types, ensuring efficient resource usage and consistent access throughout the application.
73+
74+
- **Purpose**: Centralized factory and cache for all agent instances (GPT, RAG, Validator, etc.)
75+
- **Features**:
76+
- Prevents duplicate instantiation of agents
77+
- Supports multiple RAG agent types (Qdrant, Vector, Graph) based on identifier
78+
- Provides methods to clear and reset agent resources
79+
- **Usage**:
80+
- `AgentPool.get_rag_agent(identifier)`: Returns the correct RAG agent instance for the given index/identifier
81+
- `AgentPool.get_gpt_agent()`: Returns the singleton GPT agent
82+
- `AgentPool.clear_rag_agent_resources(identifier)`: Clears resources for a specific RAG agent
83+
5684
## Lesson Plan Creation Flow
5785

5886
The lesson plan generation follows a sophisticated workflow orchestration pattern using Directed Acyclic Graphs (DAGs) for optimal parallel execution:
@@ -108,12 +136,18 @@ The lesson plan generation follows a sophisticated workflow orchestration patter
108136

109137
#### Generation Agents
110138

139+
111140
- **`BaseAzureBlobRAGAgent`**: Abstract base class for RAG agents
141+
- **`QdrantRAGAgent`**: Qdrant vector database-based content retrieval (see details above)
112142
- **`VectorIndexRAGAgent`**: Vector similarity-based content retrieval
113143
- **`GraphIndexRAGAgent`**: Knowledge graph-based content retrieval
114144
- **`GPTAgent`**: Direct GPT-based content generation
115145
- **`ValidatorAgent`**: Content validation and quality assurance
116146

147+
#### Agent Management
148+
149+
- **`AgentPool`**: Singleton factory and manager for all agent instances (see details above)
150+
117151
#### Data Models
118152

119153
- **`WorkflowDefinition`**: Defines the lesson plan structure and dependencies

0 commit comments

Comments
 (0)