How azure-samples/azure-search-openai-demo-csharp works
Project type and purpose
• This is a full-stack .NET sample application demonstrating a Retrieval-Augmented Generation (RAG) pattern over enterprise data using Azure AI services.
• It includes a Blazor WebAssembly frontend, an ASP.NET Core Minimal API backend, Azure Functions for embedding, a .NET MAUI hybrid client, and Bicep-based IaC to deploy Azure resources (Container Apps, Cognitive Search, OpenAI, Blob Storage, Application Insights, etc.).
File structure
• Top-level subdivisions under app/:
• frontend – Blazor WebAssembly client (static SPA)
• backend – ASP.NET Core Minimal API orchestrator & static host
• functions/EmbedFunctions – Azure Function to produce vector embeddings
• SharedWebComponents – Razor component library shared between WebAssembly and MAUI
• maui-blazor – .NET MAUI hybrid app reusing Blazor components
• prepdocs – CLI tool to preprocess and chunk PDF documents before indexing
• shared – Shared DTOs and interfaces for search, embedding, vision, and OCR services
• tests – Unit and component tests for frontend parser logic and backend services
• Infrastructure folder infra/ contains Bicep templates grouping core (storage, search, key vault), host (container apps, registry, functions), AI (cognitive services), monitoring and security.
README for architecture insights
• User clients (Web, MAUI) → Minimal API → Azure AI Search & OpenAI → returns responses
• Document ingestion pipeline: Blob Storage → Azure Functions (embedding) → Cognitive Search index
• Optional vision/OCR pipeline via Azure Computer Vision
• The flow orchestration is handled by ASP.NET Minimal API using Azure SDK and Semantic Kernel.
Essential elements to capture
• Clear component names (e.g., “Minimal API Container App”, “Embed Function App”)
• Data flow order (user query → retriever → generator → response)
• Ingestion pipeline (doc prep → embedding → index)
• External dependencies (Azure services)
• Infrastructure boundary and deployment artifacts (Bicep)