<mxfile host="app.diagrams.net" agent="architecture-deliverables" version="24.0.0">
  <diagram name="Critical Flow — Question to Cited Answer" id="15-query-sequence">
    <mxGraphModel dx="1400" dy="900" background="#ffffff" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1560" pageHeight="980" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="n.user" value="&lt;b&gt;User&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#08427b;strokeColor=#073b6f;fontColor=#ffffff;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="60" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.ui" value="&lt;b&gt;Web App&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="240" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.api" value="&lt;b&gt;Query API&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="430" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.guard" value="&lt;b&gt;Guardrails&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="610" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.ret" value="&lt;b&gt;Retriever&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="790" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.rr" value="&lt;b&gt;Reranker&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="980" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.mgw" value="&lt;b&gt;Model Gateway&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#ffe6cc;strokeColor=#d79b00;fontColor=#4a3200;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="1160" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="n.llm" value="&lt;b&gt;Claude API&lt;/b&gt;" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;recursiveResize=0;outlineConnect=0;size=58;rounded=1;arcSize=8;fillColor=#f5f5f5;strokeColor=#8c8c8c;fontColor=#333333;fontSize=12;fontFamily=Segoe UI;verticalAlign=top;spacingTop=9;" vertex="1" parent="1">
          <mxGeometry x="1350" y="80" width="160" height="780" as="geometry" />
        </mxCell>
        <mxCell id="_m1" value="1. asks a question" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.1179;exitDx=0;exitDy=0;entryX=0.5;entryY=0.1179;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.user" target="n.ui">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m2" value="2. POST /v1/query" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.1692;exitDx=0;exitDy=0;entryX=0.5;entryY=0.1692;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.ui" target="n.api">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m3" value="3. screen input" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.2205;exitDx=0;exitDy=0;entryX=0.5;entryY=0.2205;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.api" target="n.guard">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m4" value="4. clean, PII masked" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.2718;exitDx=0;exitDy=0;entryX=0.5;entryY=0.2718;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.guard" target="n.api">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m5" value="5. hybrid search, k=50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.3231;exitDx=0;exitDy=0;entryX=0.5;entryY=0.3231;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.api" target="n.ret">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m6" value="6. dense + BM25 + SQL, tenant filtered" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.3744;exitDx=0;exitDy=0;entryX=0.5;entryY=0.4051;entryDx=0;entryDy=0;align=left;spacingLeft=6;" edge="1" parent="1" source="n.ret" target="n.ret">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="950" y="370" />
              <mxPoint x="950" y="400" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="_m7" value="7. fused candidates" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.4410;exitDx=0;exitDy=0;entryX=0.5;entryY=0.4410;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.ret" target="n.rr">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m8" value="8. top 8 with parents" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.4923;exitDx=0;exitDy=0;entryX=0.5;entryY=0.4923;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.rr" target="n.api">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m9" value="9. assemble context" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.5436;exitDx=0;exitDy=0;entryX=0.5;entryY=0.5436;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.api" target="n.mgw">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m10" value="10. documents + question" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.5949;exitDx=0;exitDy=0;entryX=0.5;entryY=0.5949;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.mgw" target="n.llm">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m11" value="11. answer with cited spans" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.6462;exitDx=0;exitDy=0;entryX=0.5;entryY=0.6462;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.llm" target="n.mgw">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m12" value="12. normalised result" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.6974;exitDx=0;exitDy=0;entryX=0.5;entryY=0.6974;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.mgw" target="n.api">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m13" value="13. grounding gate" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;strokeColor=#5a6570;exitX=0.5;exitY=0.7487;exitDx=0;exitDy=0;entryX=0.5;entryY=0.7795;entryDx=0;entryDy=0;align=left;spacingLeft=6;" edge="1" parent="1" source="n.api" target="n.api">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="580" y="670" />
              <mxPoint x="580" y="690" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="_m14" value="14. no supporting span, abstain" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=block;endFill=1;dashed=1;strokeColor=#b85450;fontColor=#b85450;exitX=0.5;exitY=0.8154;exitDx=0;exitDy=0;entryX=0.5;entryY=0.8154;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.api" target="n.ui">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m15" value="15. streamed answer + citations" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.8667;exitDx=0;exitDy=0;entryX=0.5;entryY=0.8667;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.api" target="n.ui">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="_m16" value="16. renders with source links" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;fontFamily=Segoe UI;verticalAlign=bottom;endArrow=open;endFill=0;dashed=1;strokeColor=#5a6570;exitX=0.5;exitY=0.9179;exitDx=0;exitDy=0;entryX=0.5;entryY=0.9179;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.ui" target="n.user">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="title" value="Critical Flow — Question to Cited Answer" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=20;fontStyle=1;fontColor=#16202c;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1470" height="30" as="geometry" />
        </mxCell>
        <mxCell id="rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#c9d3de;" vertex="1" parent="1">
          <mxGeometry x="40" y="50" width="1470" height="10" as="geometry" />
        </mxCell>
        <mxCell id="note" value="Semantic cache hit and token streaming are omitted for clarity." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="910" width="1470" height="20" as="geometry" />
        </mxCell>
        <mxCell id="foot-rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#e3e9ef;" vertex="1" parent="1">
          <mxGeometry x="40" y="930" width="1470" height="10" as="geometry" />
        </mxCell>
        <mxCell id="foot" value="v 1.0   ·   owner Solution Architecture" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=9;fontColor=#9aa7b4;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="940" width="1470" height="10" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
