<mxfile host="app.diagrams.net" agent="architecture-deliverables" version="24.0.0">
  <diagram name="Retrieval &amp; Generation Flow" id="07-retrieval-generation-flow">
    <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="1600" pageHeight="530" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="_st1" value="Admit" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.q" value="&lt;b&gt;User Question&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#08427b;strokeColor=#073b6f;fontColor=#ffffff;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="40" y="140" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.guard" value="&lt;b&gt;Input Guard&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;injection, PII&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="40" y="240" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st2" value="Plan" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="310" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.rw" value="&lt;b&gt;Query Rewrite&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;history-aware&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="310" y="140" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.route" value="&lt;b&gt;Route&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;modality + tool&lt;/font&gt;" style="shape=hexagon;perimeter=hexagonPerimeter2;size=0.12;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontColor=#4a3c00;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="310" y="240" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st3" value="Search" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="580" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.dense" value="&lt;b&gt;Dense Search&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;top 50&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="580" y="90" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.bm25" value="&lt;b&gt;Lexical Search&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;top 50, exact IDs&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="580" y="190" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.sql" value="&lt;b&gt;Text-to-SQL&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;aggregation over tables&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="580" y="290" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st4" value="Fuse" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="850" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.rrf" value="&lt;b&gt;RRF Fusion&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;rank-based merge&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="850" y="90" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.rr" value="&lt;b&gt;Cross-Encoder Rerank&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;top 8&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="850" y="190" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.parent" value="&lt;b&gt;Parent Expansion&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;small to big&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="850" y="290" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st5" value="Generate" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1120" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.asm" value="&lt;b&gt;Context Assembly&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;cached prefix&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1120" y="140" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.llm" value="&lt;b&gt;Claude Opus 5&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;citations enabled&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#8c8c8c;fontColor=#333333;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1120" y="240" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st6" value="Verify" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1390" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.gate" value="&lt;b&gt;Grounding Gate&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;every claim cited&lt;/font&gt;" style="shape=hexagon;perimeter=hexagonPerimeter2;size=0.12;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontColor=#4a3c00;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1390" y="120" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="n.out" value="&lt;b&gt;Answer + Citations&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;page, bbox, timecode&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1390" y="240" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="_spine7" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="220" y="220" as="sourcePoint" />
            <mxPoint x="300" y="220" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine8" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="490" y="220" as="sourcePoint" />
            <mxPoint x="570" y="220" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine9" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="760" y="220" as="sourcePoint" />
            <mxPoint x="840" y="220" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine10" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1030" y="220" as="sourcePoint" />
            <mxPoint x="1110" y="220" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine11" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1300" y="220" as="sourcePoint" />
            <mxPoint x="1380" y="220" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_e12" value="unsupported claim, one retry" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;dashed=1;endArrow=block;endFill=1;strokeColor=#b85450;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;verticalAlign=bottom;fontFamily=Segoe UI;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.gate" target="n.rw">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1480" y="390" />
              <mxPoint x="400" y="390" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="_e13" value="numeric question" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;endArrow=block;endFill=1;strokeColor=#5a6570;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;verticalAlign=bottom;fontFamily=Segoe UI;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.route" target="n.sql">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="title" value="Retrieval &amp; Generation Flow" 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="1510" 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="1510" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg14" value="" style="rounded=1;arcSize=30;html=1;fillColor=#08427b;strokeColor=#073b6f;" vertex="1" parent="1">
          <mxGeometry x="40" y="430" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg15" value="Person or role" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="70" y="430" width="90" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg16" value="" style="rounded=1;arcSize=30;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
          <mxGeometry x="180" y="430" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg17" value="Security / platform" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="210" y="430" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg18" value="" style="rounded=1;arcSize=30;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
          <mxGeometry x="350" y="430" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg19" value="Application we own" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="370" y="430" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg20" value="" style="rounded=1;arcSize=30;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
          <mxGeometry x="500" y="430" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg21" value="Decision point" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="530" y="430" width="90" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg22" value="" style="rounded=1;arcSize=30;html=1;fillColor=#f5f5f5;strokeColor=#8c8c8c;" vertex="1" parent="1">
          <mxGeometry x="640" y="430" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg23" value="External / third party" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="670" y="430" width="130" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg24" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#b85450;strokeWidth=1.4;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="820" y="440" as="sourcePoint" />
            <mxPoint x="850" y="440" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_lg25" value="failure / alternate" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="850" y="430" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg26" value="" style="html=1;endArrow=none;strokeColor=#5a6570;strokeWidth=1.4;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="990" y="440" as="sourcePoint" />
            <mxPoint x="1010" y="440" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_lg27" value="synchronous" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1020" y="430" width="70" height="20" as="geometry" />
        </mxCell>
        <mxCell id="note" value="Abstain is a valid terminal state: no supporting span means no answer." 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="460" width="1510" 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="480" width="1510" 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="490" width="1510" height="10" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
