How azure-samples/azure-search-openai-javascript works
The system architecture should be represented in multiple layers, focusing on these key components:
Frontend Layer
• React/Lit-based webapp package with its key components:
• Chat interface
• Q&A interface
• Settings management
• Supporting content display
Application Layer
• Static Web App hosting the frontend
• Two Container Apps hosting the backend services:
• Search Service (packages/search)
• Indexer Service (packages/indexer)
Core Services Layer
• Azure OpenAI Service:
• ChatGPT model (gpt-35-turbo)
• Embedding model for vector search
• Azure AI Search:
• Search indexes
• Vector search capabilities
• Azure Blob Storage for document storage
Monitoring & Security Layer
• Application Insights for telemetry
• Azure Monitor for logging
• Azure Active Directory (optional) for authentication
Component Representation
• Use rectangles for services and applications
• Use hexagons for Azure PaaS services
• Use clouds for external services/APIs
Connection Flows
• Blue: User requests
• Green: Document processing
• Orange: Search operations
• Purple: AI operations
Key Processes to Highlight
a. Document Processing Flow:
Documents → Indexer Service → Azure AI Search
• ↓
• Azure OpenAI (embeddings)
b. Chat/Query Flow:
User → Frontend → Search Service → Azure AI Search
• ↓
• Azure OpenAI (ChatGPT)
• ↓
• Response
Additional Elements
• Version/environment information
• Security boundaries and authentication flows
• Scaling capabilities of container apps
Architectural Patterns to Emphasize
• Retrieval Augmented Generation (RAG) pattern
• Microservices architecture
• Event-driven processing
• Stateless design
Important Implementation Details to Note:
Container Apps
• Autoscaling configuration (1-10 replicas)
• Resource allocation (1 vCPU, 2GB RAM)
Search Service
• Semantic search capabilities
• Vector search integration
Security
• CORS boundaries
• Authentication flows (if enabled)
• Network security measures