<mxfile host="zl-research-templates">
  <diagram id="zl-检索增强生成（RAG）流程" name="检索增强生成（RAG）流程">
    <mxGraphModel dx="980" dy="480" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="980" pageHeight="480" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="c2" value="检索增强生成（RAG）流程" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontSize=16;fontStyle=1;fontColor=#1F2937;" vertex="1" parent="1"><mxGeometry x="40" y="40" width="900" height="30" as="geometry"/></mxCell>
        <mxCell id="c3" value="离线阶段：知识库构建" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#F8FAFC;strokeColor=#CBD5E1;strokeWidth=1.2;dashed=1;verticalAlign=top;align=left;spacingLeft=10;spacingTop=4;fontStyle=1;fontSize=13;fontColor=#374151;" vertex="1" parent="1"><mxGeometry x="40" y="90" width="900" height="130" as="geometry"/></mxCell>
        <mxCell id="c4" value="文档集合&lt;br&gt;（论文、报告、网页）" style="shape=document;whiteSpace=wrap;html=1;fillColor=#B3E3D5;strokeColor=#009E73;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;boundedLbl=1;size=0.18;" vertex="1" parent="1"><mxGeometry x="80" y="130" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c5" value="解析与清洗&lt;br&gt;（版式解析、去噪）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3E3D5;strokeColor=#009E73;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="250" y="130" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c6" value="文本分块&lt;br&gt;（保留出处元数据）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3E3D5;strokeColor=#009E73;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="420" y="130" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c7" value="向量化&lt;br&gt;（嵌入模型）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3E3D5;strokeColor=#009E73;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="590" y="130" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c8" value="向量数据库&lt;br&gt;（向量 + 元数据）" style="shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#F8E2B3;strokeColor=#E69F00;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;boundedLbl=1;backgroundOutline=1;size=8;" vertex="1" parent="1"><mxGeometry x="760" y="120" width="140" height="80" as="geometry"/></mxCell>
        <mxCell id="e9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c4" target="c5"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c5" target="c6"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c6" target="c7"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c7" target="c8"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="c13" value="在线阶段：检索与生成" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#F8FAFC;strokeColor=#CBD5E1;strokeWidth=1.2;dashed=1;verticalAlign=top;align=left;spacingLeft=10;spacingTop=4;fontStyle=1;fontSize=13;fontColor=#374151;" vertex="1" parent="1"><mxGeometry x="40" y="280" width="900" height="160" as="geometry"/></mxCell>
        <mxCell id="c14" value="用户问题" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3D5E8;strokeColor=#0072B2;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="80" y="320" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c15" value="相似度检索&lt;br&gt;（Top-&lt;i&gt;k&lt;/i&gt; 召回）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3D5E8;strokeColor=#0072B2;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="250" y="320" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c16" value="重排序&lt;br&gt;（交叉编码器）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#B3D5E8;strokeColor=#0072B2;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="420" y="320" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c17" value="大模型生成&lt;br&gt;（问题 + 上下文）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#F8E2B3;strokeColor=#E69F00;strokeWidth=1.5;fontColor=#1F2937;fontSize=12;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="590" y="320" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="c18" value="带出处的回答&lt;br&gt;（附引用来源）" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;fillColor=#0072B2;strokeColor=#0072B2;strokeWidth=1.5;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;spacing=6;" vertex="1" parent="1"><mxGeometry x="760" y="320" width="140" height="60" as="geometry"/></mxCell>
        <mxCell id="e19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c14" target="c15"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c15" target="c16"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e21" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c16" target="c17"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="c17" target="c18"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="e23" value="相关文本片段" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="c8" target="c15"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="830" y="250"/><mxPoint x="320" y="250"/></Array></mxGeometry></mxCell>
        <mxCell id="e24" value="原始问题" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeWidth=1.5;strokeColor=#4B5563;dashed=1;fontSize=11;fontColor=#1F2937;labelBackgroundColor=#FFFFFF;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="c14" target="c17"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="150" y="410"/><mxPoint x="660" y="410"/></Array></mxGeometry></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
