How microsoft/msbuild-lab335-agentic-rag works
Project type and purpose
• This repo is not an application codebase but a hands-on lab/tutorial (“Build Your First Agentic RAG Solution with Azure AI Search”).
• The goal is to guide learners through building an agent-orchestrated Retrieval-Augmented Generation (RAG) solution on Azure.
File structure
• Top level: README.md, SUPPORT.md, SECURITY.md, lab folder, img folder. No “src” or “backend” directories.
• “lab/” contains four exercise markdowns plus media: each exercise progressively builds RAG features (retrieval modes, semantic ranker, automated evaluation, agentic features).
• This implies the actual system design will be conceptual—mapping the target architecture learners will implement.
README for additional insights
• The README describes session resources, links to the Build session page and Microsoft Learn plan.
• No code; emphasis is on Azure AI Search, semantic ranking, agentic orchestration, evaluation.
• User Interface (e.g., a web client or CLI where the user submits queries)
• Agent Orchestrator (the “brain” that decides when to retrieve, ask follow-up questions, call the LLM)
• Retrieval Layer
– Azure Cognitive Search (indexes documents/media in Azure Blob Storage)
– Semantic Ranker plugin (optional semantic re-ranking service)
• Generation Layer
– Azure OpenAI Service (LLM endpoint)
• Automated Evaluation Module (optional—exercise-3)
• Data Stores
– Azure Blob Storage (raw docs, index)
– Application logs / Telemetry
• External Services
– Microsoft Learn links / Build session resources (for context, not part of runtime)
b. Relationships and interactions
1. User → UI → Agent Orchestrator
2. Orchestrator → Azure Cognitive Search (query embedding)
3. Search → returns top-k docs → optional semantic ranker → filtered docs
4. Orchestrator packages prompt + docs → Azure OpenAI → LLM response
5. If exercise-4 agentic: orchestrator may loop (follow-up retrieval → LLM) until answer complete
6. (Optional) Send response to evaluation module → feedback → logs
7. Final answer → UI → User
c. Architectural patterns & design principles
• Separation of concerns: clear layers for orchestration, retrieval, generation, evaluation
• Serverless / Microservices: each component (functions or services) can scale independently
• Event-driven loops for agentic features
• Modular extensibility: switch in/out semantic ranker, evaluation, additional retrieval modes
d. Key technologies, frameworks, libraries
• Azure Cognitive Search SDK
• Azure OpenAI SDK
• Azure Blob Storage
• (Optional) Azure Functions or Web App for orchestration
• Semantic ranking packages (e.g., Azure AI semantic ranking)
• Logging/Monitoring via Azure Application Insights
Final advice
• Be detailed but avoid overcomplicating: start with core RAG pipeline (retrieval + generation), then layer on semantic ranking, evaluation, agentic loop.
• Essential Azure service boundaries and how data flows through each exercise stage.