<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="semantic-cache-lookup-tiers-37c99796" name="Semantic cache lookup tiers">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <object id="1" label="Semantic cache lookup tiers" schemaVersion="1" diagramId="semantic-cache-lookup-tiers-37c99796" canonicalAppearanceKey="tsx:src/app/(docs)/docs/concepts/semantic-caching/page.tsx:tiersChart#1" sourceSha256="37c99796549fce6f64851e9ba172c0eb6e416333b1bc87465bb93caf5a26e1f8" metadataPayloadSha256="41813654c82ce120dd3ed8c00a5377ea3dfb76d9a0e6391ba64d335b8a51f6ad" generationKey="270dd5498eaee04190be5073a2851e4388e312ea777d484d091475e5d5cfd5f2" concepts="[&quot;Semantic caching&quot;,&quot;Tiers&quot;]" keywords="[&quot;→ exact_key&quot;,&quot;exact_key hit?&quot;,&quot;≥ 0.97&quot;,&quot;yes (≥ 0.97)&quot;,&quot;in [0.90, 0.97)&quot;,&quot;&lt; 0.90&quot;,&quot;serve + promote (new exact_key)&quot;,&quot;serve-time ACL re-check&quot;,&quot;pgvector cosine&quot;,&quot;≥ directServeThreshold?&quot;,&quot;not equivalent&quot;,&quot;all deps readable&quot;,&quot;cheap LLM equivalence check&quot;,&quot;MISS → run pipeline → store&quot;,&quot;serve cached StructuredAnswer&quot;,&quot;any dep gone / tombstoned&quot;,&quot;question + model + promptVersion + effectiveConfig&quot;,&quot;yes&quot;,&quot;no&quot;,&quot;equivalent&quot;]" application="{&quot;name&quot;:&quot;eli-ai&quot;,&quot;version&quot;:&quot;0.1.0&quot;}" packages="{&quot;mermaid&quot;:&quot;11.16.0&quot;,&quot;mermaidCli&quot;:&quot;11.16.0&quot;,&quot;playwright&quot;:&quot;1.62.1&quot;,&quot;playwrightCore&quot;:&quot;1.62.1&quot;,&quot;puppeteer&quot;:&quot;25.6.0&quot;,&quot;puppeteerCore&quot;:&quot;25.6.0&quot;}" environment="{&quot;architecture&quot;:&quot;x64&quot;,&quot;containerImage&quot;:&quot;playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109&quot;,&quot;node&quot;:&quot;v26.3.1&quot;,&quot;platform&quot;:&quot;linux&quot;,&quot;yarn&quot;:&quot;4.17.1&quot;}" renderer="{&quot;browser&quot;:{&quot;executableSha256&quot;:&quot;0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71&quot;,&quot;name&quot;:&quot;chromium&quot;,&quot;revision&quot;:&quot;1234&quot;,&quot;version&quot;:&quot;151.0.7922.34&quot;},&quot;font&quot;:{&quot;family&quot;:&quot;Eli Diagram Inter Variable&quot;,&quot;fileSha256&quot;:&quot;3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62&quot;,&quot;licenseSha256&quot;:&quot;3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345&quot;},&quot;mermaidConfigSha256&quot;:&quot;68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101&quot;,&quot;themeCssSha256&quot;:&quot;c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033&quot;}" adapterVersions="{&quot;diagramGenerator&quot;:&quot;2&quot;,&quot;drawioFlowchart&quot;:&quot;1&quot;,&quot;drawioGantt&quot;:&quot;1&quot;,&quot;drawioSequence&quot;:&quot;1&quot;,&quot;drawioState&quot;:&quot;1&quot;}" mermaidType="flowchart" direction="TB" generatedAt="2026-08-12T23:42:08.800Z" mermaidSource="flowchart TB&#10;  Q[&quot;question + model + promptVersion + effectiveConfig&quot;] --&gt; Key[&quot;sha256 → exact_key&quot;]&#10;  Key --&gt; Exact{&quot;exact_key hit?&quot;}&#10;  Exact --&gt;|&quot;yes&quot;| ACL[&quot;serve-time ACL re-check&quot;]&#10;  Exact --&gt;|&quot;no&quot;| Vec{&quot;pgvector cosine&lt;br/&gt;≥ directServeThreshold?&quot;}&#10;  Vec --&gt;|&quot;yes (≥ 0.97)&quot;| ACL&#10;  Vec --&gt;|&quot;in [0.90, 0.97)&quot;| Judge[&quot;cheap LLM equivalence check&quot;]&#10;  Vec --&gt;|&quot;&lt; 0.90&quot;| Miss[&quot;MISS → run pipeline → store&quot;]&#10;  Judge --&gt;|&quot;equivalent&quot;| Promote[&quot;serve + promote (new exact_key)&quot;]&#10;  Judge --&gt;|&quot;not equivalent&quot;| Miss&#10;  Promote --&gt; ACL&#10;  ACL --&gt;|&quot;all deps readable&quot;| Serve[&quot;serve cached StructuredAnswer&quot;]&#10;  ACL --&gt;|&quot;any dep gone / tombstoned&quot;| Miss">
          <mxCell parent="0"/>
        </object>
        <object id="n:Q" label="question + model + promptVersion + effectiveConfig" mermaidId="Q" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="181.777344" y="8" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Key" label="sha256 → exact_key" mermaidId="Key" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="203.582031" y="158" width="212.390625" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Exact" label="exact_key hit?" mermaidId="Exact" mermaidShape="diamond">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;perimeter=rhombusPerimeter;shape=rhombus;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="230.988281" y="260" width="158.578125" height="158.578125" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:ACL" label="serve-time ACL re-check" mermaidId="ACL" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="105.898438" y="1125.84375" width="246.390625" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Vec" label="pgvector cosine≥ directServeThreshold?" mermaidId="Vec" mermaidShape="diamond">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;perimeter=rhombusPerimeter;shape=rhombus;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="312.144531" y="492.578125" width="259.265625" height="259.265625" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Judge" label="cheap LLM equivalence check" mermaidId="Judge" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="345.59375" y="825.84375" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Miss" label="MISS → run pipeline → store" mermaidId="Miss" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="427.09375" y="1275.84375" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Promote" label="serve + promote (new exact_key)" mermaidId="Promote" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="231.777344" y="975.84375" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Serve" label="serve cached StructuredAnswer" mermaidId="Serve" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="1275.84375" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_Q_Key_0" label="" mermaidId="L_Q_Key_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Q" target="n:Key" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="309.777344" y="108" as="sourcePoint"/>
              <mxPoint x="309.777344" y="158" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="309.777344" y="133"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Key_Exact_0" label="" mermaidId="L_Key_Exact_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Key" target="n:Exact" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="309.777344" y="210" as="sourcePoint"/>
              <mxPoint x="309.777344" y="260" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="309.777344" y="235"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Exact_ACL_0" label="yes" mermaidId="L_Exact_ACL_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Exact" target="n:ACL" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="260.0903" y="368.891081" as="sourcePoint"/>
              <mxPoint x="181.836558" y="1125.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="114.585938" y="455.578125"/>
                <mxPoint x="114.585938" y="622.210938"/>
                <mxPoint x="114.585938" y="788.84375"/>
                <mxPoint x="114.585938" y="863.84375"/>
                <mxPoint x="114.585938" y="938.84375"/>
                <mxPoint x="114.585938" y="1013.84375"/>
                <mxPoint x="114.585938" y="1088.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Exact_Vec_0" label="no" mermaidId="L_Exact_Vec_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Exact" target="n:Vec" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="351.855519" y="376.499949" as="sourcePoint"/>
              <mxPoint x="441.277344" y="492.578125" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="441.277344" y="455.578125"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Vec_ACL_0" label="yes (≥ 0.97)" mermaidId="L_Vec_ACL_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Vec" target="n:ACL" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="364.184926" y="674.751332" as="sourcePoint"/>
              <mxPoint x="215.75682" y="1125.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="196.777344" y="788.84375"/>
                <mxPoint x="196.777344" y="863.84375"/>
                <mxPoint x="196.777344" y="938.84375"/>
                <mxPoint x="196.777344" y="1013.84375"/>
                <mxPoint x="196.777344" y="1088.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Vec_Judge_0" label="in [0.90, 0.97)" mermaidId="L_Vec_Judge_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Vec" target="n:Judge" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="462.334308" y="730.786786" as="sourcePoint"/>
              <mxPoint x="473.59375" y="825.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="473.59375" y="788.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Vec_Miss_0" label="&lt; 0.90" mermaidId="L_Vec_Miss_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Vec" target="n:Miss" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="511.953735" y="681.167359" as="sourcePoint"/>
              <mxPoint x="592.631376" y="1275.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="641.035156" y="788.84375"/>
                <mxPoint x="641.035156" y="863.84375"/>
                <mxPoint x="641.035156" y="938.84375"/>
                <mxPoint x="641.035156" y="1013.84375"/>
                <mxPoint x="641.035156" y="1088.84375"/>
                <mxPoint x="641.035156" y="1151.84375"/>
                <mxPoint x="641.035156" y="1226.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Judge_Promote_0" label="equivalent" mermaidId="L_Judge_Promote_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Judge" target="n:Promote" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="415.926771" y="901.84375" as="sourcePoint"/>
              <mxPoint x="359.777344" y="975.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="359.777344" y="938.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Judge_Miss_0" label="not equivalent" mermaidId="L_Judge_Miss_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Judge" target="n:Miss" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="498.513438" y="901.84375" as="sourcePoint"/>
              <mxPoint x="540.978538" y="1275.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="522.777344" y="938.84375"/>
                <mxPoint x="522.777344" y="1013.84375"/>
                <mxPoint x="522.777344" y="1088.84375"/>
                <mxPoint x="522.777344" y="1151.84375"/>
                <mxPoint x="522.777344" y="1226.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Promote_ACL_0" label="" mermaidId="L_Promote_ACL_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Promote" target="n:ACL" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="359.777344" y="1051.84375" as="sourcePoint"/>
              <mxPoint x="283.026662" y="1125.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="359.777344" y="1088.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_ACL_Serve_0" label="all deps readable" mermaidId="L_ACL_Serve_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:ACL" target="n:Serve" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="196.82125" y="1177.84375" as="sourcePoint"/>
              <mxPoint x="136" y="1275.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="136" y="1226.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_ACL_Miss_0" label="any dep gone / tombstoned" mermaidId="L_ACL_Miss_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:ACL" target="n:Miss" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="281.850729" y="1177.84375" as="sourcePoint"/>
              <mxPoint x="479.17394" y="1275.84375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="381.277344" y="1226.84375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
