<mxfile host="archify-azure" agent="archify-azure" version="1">
  <diagram name="RAG chat assistant on Azure OpenAI" id="5eVVRdVjN355zs3bCdK7">
    <mxGraphModel dx="1345" dy="820" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1345" pageHeight="820" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
<mxCell id="title" value="RAG chat assistant on Azure OpenAI" style="text;html=1;align=left;verticalAlign=top;fontSize=20;fontStyle=1;fontColor=#000000;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="40" y="24" width="1265" height="30" as="geometry"/></mxCell>
<mxCell id="subtitle" value="Authenticated API → orchestrator → content-safe model call grounded by Azure AI Search, with diagnostic logging" style="text;html=1;align=left;verticalAlign=top;fontSize=12;fontColor=#545B64;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="40" y="56" width="1265" height="24" as="geometry"/></mxCell>
<mxCell id="g-cloud" value="Azure" style="whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;pointerEvents=0;fontSize=12;verticalAlign=top;align=left;spacingTop=2;rounded=0;strokeColor=#243A5E;fontColor=#243A5E;fillColor=none;dashed=0;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="216" y="116" width="1089" height="664" as="geometry"/></mxCell>
<mxCell id="g-region" value="Region" style="whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;pointerEvents=0;fontSize=12;verticalAlign=top;align=left;spacingTop=2;rounded=0;strokeColor=#0078D4;fontColor=#0078D4;fillColor=none;dashed=1;dashPattern=2 3;spacingLeft=40;" vertex="1" parent="g-cloud"><mxGeometry x="228" y="48" width="615" height="592" as="geometry"/></mxCell>
<mxCell id="gi-region" value="" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;image=img/lib/azure2/general/Region_Management.svg;" vertex="1" parent="g-region"><mxGeometry x="4" y="4" width="32" height="32" as="geometry"/></mxCell>
<mxCell id="g-ai" value="Azure AI" style="whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;pointerEvents=0;fontSize=12;verticalAlign=top;align=left;spacingTop=2;rounded=0;strokeColor=#0078D4;fontColor=#0078D4;fillColor=none;dashed=0;spacingLeft=40;" vertex="1" parent="g-region"><mxGeometry x="210" y="48" width="190" height="520" as="geometry"/></mxCell>
<mxCell id="gi-ai" value="" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;image=img/lib/azure2/ai_machine_learning/AI_Foundry.svg;" vertex="1" parent="g-ai"><mxGeometry x="4" y="4" width="32" height="32" as="geometry"/></mxCell>
<mxCell id="n-users" value="Users" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/identity/Users.svg;" vertex="1" parent="1"><mxGeometry x="56" y="428" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-idp" value="Microsoft Entra ID&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;sign-in, RBAC&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/identity/Entra_ID_Protection.svg;" vertex="1" parent="1"><mxGeometry x="270" y="344" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-apim" value="API Management&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;auth, throttling&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/app_services/API_Management_Services.svg;" vertex="1" parent="1"><mxGeometry x="270" y="512" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-orch" value="App Service&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;orchestrator&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/compute/App_Services.svg;" vertex="1" parent="g-region"><mxGeometry x="40" y="264" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-safety" value="Azure AI Content&lt;br&gt;Safety&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;filters, prompt shields&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/ai_machine_learning/Content_Safety.svg;" vertex="1" parent="g-ai"><mxGeometry x="63" y="48" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-fm" value="Azure OpenAI&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;chat + embeddings&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/ai_machine_learning/Azure_OpenAI.svg;" vertex="1" parent="g-ai"><mxGeometry x="63" y="216" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-search" value="Azure AI Search&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;vector + keyword index&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/app_services/Search_Services.svg;" vertex="1" parent="g-ai"><mxGeometry x="63" y="384" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-docs" value="Azure Storage&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;source documents&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/storage/Storage_Accounts.svg;" vertex="1" parent="g-region"><mxGeometry x="508.5" y="264" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-mon" value="Log Analytics&lt;br&gt;&lt;font style=&quot;font-size:10px&quot; color=&quot;#545B64&quot;&gt;diagnostic logs, tokens&lt;/font&gt;" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/analytics/Log_Analytics_Workspaces.svg;" vertex="1" parent="1"><mxGeometry x="1178" y="344" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="n-kv" value="Azure Key Vault" style="image;aspect=fixed;html=1;points=[];align=center;fontSize=12;fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;image=img/lib/azure2/security/Key_Vaults.svg;" vertex="1" parent="1"><mxGeometry x="1178" y="512" width="64" height="64" as="geometry"/></mxCell>
<mxCell id="e-0" value="grounded prompt" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="g-region" source="n-orch" target="n-fm"><mxGeometry x="0" relative="1" as="geometry"></mxGeometry></mxCell>
<object label="5" tooltip="5. App Service → Azure OpenAI (grounded prompt)" id="b-0"><mxCell style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontStyle=1;fontSize=12;" vertex="1" parent="g-region"><mxGeometry x="157" y="285" width="22" height="22" as="geometry"/></mxCell></object>
<mxCell id="e-1" value="validates" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;dashed=1;exitX=0.5;exitY=1;exitDx=0;exitDy=48;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="n-idp" target="n-apim"><mxGeometry x="0" relative="1" as="geometry"></mxGeometry></mxCell>
<mxCell id="e-2" value="HTTPS + token" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="n-users" target="n-apim"><mxGeometry x="0" relative="1" as="geometry"><Array as="points"><mxPoint x="195" y="460"/><mxPoint x="195" y="544"/></Array></mxGeometry></mxCell>
<object label="1" tooltip="1. Users → API Management (HTTPS + token)" id="b-2"><mxCell style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontStyle=1;fontSize=12;" vertex="1" parent="1"><mxGeometry x="133" y="449" width="22" height="22" as="geometry"/></mxCell></object>
<mxCell id="e-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="n-apim" target="n-orch"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="409" y="544"/><mxPoint x="409" y="460"/></Array></mxGeometry></mxCell>
<object label="2" tooltip="2. API Management → App Service" id="b-3"><mxCell style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontStyle=1;fontSize=12;" vertex="1" parent="1"><mxGeometry x="347" y="533" width="22" height="22" as="geometry"/></mxCell></object>
<mxCell id="e-4" value="screen prompt" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;exitX=0.5;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="g-region" source="n-orch" target="n-safety"><mxGeometry x="0.4" relative="1" as="geometry"><Array as="points"><mxPoint x="72" y="128"/></Array></mxGeometry></mxCell>
<object label="3" tooltip="3. App Service → Azure AI Content Safety (screen prompt)" id="b-4"><mxCell style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontStyle=1;fontSize=12;" vertex="1" parent="g-region"><mxGeometry x="61" y="229" width="22" height="22" as="geometry"/></mxCell></object>
<mxCell id="e-5" value="retrieve" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="g-region" source="n-orch" target="n-search"><mxGeometry x="-0.3" relative="1" as="geometry"><Array as="points"><mxPoint x="140.5" y="296"/><mxPoint x="140.5" y="464"/></Array></mxGeometry></mxCell>
<object label="4" tooltip="4. App Service → Azure AI Search (retrieve)" id="b-5"><mxCell style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontStyle=1;fontSize=12;" vertex="1" parent="g-region"><mxGeometry x="238" y="453" width="22" height="22" as="geometry"/></mxCell></object>
<mxCell id="e-6" value="indexer" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;dashed=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="g-region" source="n-search" target="n-docs"><mxGeometry x="0" relative="1" as="geometry"><Array as="points"><mxPoint x="422.8" y="464"/><mxPoint x="422.8" y="296"/></Array></mxGeometry></mxCell>
<mxCell id="e-7" value="diagnostics" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#232F3E;strokeWidth=2;labelBackgroundColor=#ffffff;fontSize=11;fontColor=#232F3E;endArrow=open;endFill=0;endSize=8;dashed=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="n-fm" target="n-mon"><mxGeometry x="0.1" relative="1" as="geometry"><Array as="points"><mxPoint x="749" y="376"/></Array></mxGeometry></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
