How forestavanade/vector-search-ai-assistant-mongodbvcore works
Main Components
a. Client Layer:
• Blazor Server Web Application (Search project)
• Chat interface components
• Session management
• Token tracking visualization
b. Application Services Layer:
• ChatService
• OpenAiService
• MongoDbService
• Vector processing services
c. Data Layer:
• Azure Cosmos DB for MongoDB vCore
• Products collection (with vectors)
• Customers collection (with vectors)
• Sales Orders collection (with vectors)
• Completions collection (chat history)
d. External Services:
• Azure OpenAI Service
• Text embeddings model (text-embedding-ada-002)
• Chat completions model (gpt-4-32k)
e. Data Processing Layer:
• Azure Functions
• Ingest and Vectorize function
• Remove Data function
Component Relationships and Data Flow
a. Primary Flow:
Response back to UI
b. Data Processing Flow:
Important Subsystems to Highlight
a. Vector Processing Pipeline:
• Text input → Embeddings generation → Vector storage/search
b. Conversation Management:
• Session tracking
• Token management
• History storage
c. RAG Pattern Implementation:
• Vector search
• Context assembly
• Completion generation
Additional Details
Key architectural aspects:
• Token management boundaries
• Collection relationships
• Vector index types (IVF/HNSW)
• Deployment boundaries
Notes
Annotations for:
• Maximum token limits
• Vector search parameters
• Collection configurations
• Model specifications