<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="entity-graph-ingestion-pipeline-095f5e01" name="Entity graph ingestion pipeline">
    <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="Entity graph ingestion pipeline" schemaVersion="1" diagramId="entity-graph-ingestion-pipeline-095f5e01" canonicalAppearanceKey="tsx:src/app/(docs)/docs/concepts/entity-graph/page.tsx:ingestionChart#1" sourceSha256="095f5e01f005599923c2427c7580bb66743cb4677bebcd138cddd4cd921fad49" metadataPayloadSha256="4667ccc100d964580ca74e27ae40f026003d66ddbe4800d78e7dfea18baa76c4" generationKey="f6a353b57d44f98cb750b3724e73e1abcf5b8e4273b8155c8d3c49938450b134" concepts="[&quot;Entity graph&quot;,&quot;Ingestion&quot;]" keywords="[&quot;Postgres FTS (tsvector)&quot;,&quot;Output.object → fallback + repair&quot;,&quot;one-TX replace → canonical_relations&quot;,&quot;chunk (heading-aware)&quot;,&quot;embedChunks() (vector)&quot;,&quot;ontology + running run&quot;,&quot;extract- · stately&quot;,&quot;zero-LLM entities + mentions&quot;,&quot;idempotent edges + explicit evidence&quot;,&quot;snapshot doc, ordered chunks&quot;,&quot;all provider calls before mutation&quot;,&quot;lock + exact revalidate + latest owner&quot;,&quot;the serve-time edge table&quot;,&quot;saveDocument()&quot;,&quot;resolveWikilinks()&quot;,&quot;deriveCooccurrenceRelations()&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="LR" generatedAt="2026-08-12T23:38:25.319Z" mermaidSource="flowchart LR&#10;  Save[&quot;saveDocument()&quot;] --&gt; Chunk[&quot;chunk (heading-aware)&quot;]&#10;  Chunk --&gt; FTS[&quot;Postgres FTS (tsvector)&quot;]&#10;  Save --&gt; Wiki[&quot;resolveWikilinks()&lt;br/&gt;zero-LLM entities + mentions&quot;]&#10;  Wiki --&gt; Cooc[&quot;deriveCooccurrenceRelations()&lt;br/&gt;idempotent edges + explicit evidence&quot;]&#10;  Save -. enqueue .-&gt; Embed[&quot;embedChunks() (vector)&quot;]&#10;  Save -.-&gt;|&quot;extract-v2 · stately&quot;| Extract[&quot;snapshot doc, ordered chunks,&lt;br/&gt;ontology + running run&quot;]&#10;  Extract --&gt; LLM[&quot;all provider calls before mutation&lt;br/&gt;Output.object → fallback + repair&quot;]&#10;  LLM --&gt; Apply[&quot;lock + exact revalidate + latest owner&lt;br/&gt;one-TX replace → canonical_relations&quot;]&#10;  Cooc --&gt; Canon[(&quot;canonical_relations&lt;br/&gt;(the serve-time edge table)&quot;)]&#10;  Apply --&gt; Canon">
          <mxCell parent="0"/>
        </object>
        <object id="n:Save" label="saveDocument()" mermaidId="Save" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="140.5" width="180.65625" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Chunk" label="chunk (heading-aware)" mermaidId="Chunk" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="392.460938" y="8" width="232.671875" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:FTS" label="Postgres FTS (tsvector)" mermaidId="FTS" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="697.460938" y="8" width="234.671875" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Wiki" label="resolveWikilinks()zero-LLM entities + mentions" mermaidId="Wiki" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="686.796875" y="147" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Cooc" label="deriveCooccurrenceRelations()idempotent edges + explicit evidence" mermaidId="Cooc" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="992.796875" y="147" width="291.609375" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Embed" label="embedChunks() (vector)" mermaidId="Embed" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="388.171875" y="110" width="241.25" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Extract" label="snapshot doc, ordered chunks,ontology + running run" mermaidId="Extract" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="380.796875" y="309" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:LLM" label="all provider calls before mutationOutput.object → fallback + repair" mermaidId="LLM" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="686.796875" y="297" width="256" height="124" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Apply" label="lock + exact revalidate + latest ownerone-TX replace → canonical_relations" mermaidId="Apply" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1010.601563" y="297" width="256" height="124" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Canon" label="canonical_relations(the serve-time edge table)" mermaidId="Canon" mermaidShape="cylinder">
          <mxCell parent="1" vertex="1" style="backgroundOutline=1;boundedLbl=1;fillColor=#ECECFF;fontColor=#333333;html=1;shape=cylinder3;size=15;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1334.40625" y="211.327434" width="214" height="133.345133" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_Save_Chunk_0" label="" mermaidId="L_Save_Chunk_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Save" target="n:Chunk" 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="134.904422" y="140.5" as="sourcePoint"/>
              <mxPoint x="392.460938" y="34" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="284.726563" y="34"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Chunk_FTS_0" label="" mermaidId="L_Chunk_FTS_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Chunk" target="n:FTS" 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="625.132813" y="34" as="sourcePoint"/>
              <mxPoint x="697.460938" y="34" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="661.796875" y="34"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Save_Wiki_0" label="" mermaidId="L_Save_Wiki_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Save" target="n:Wiki" 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="188.65625" y="181.280209" as="sourcePoint"/>
              <mxPoint x="686.796875" y="197" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="284.726563" y="197"/>
                <mxPoint x="508.796875" y="197"/>
                <mxPoint x="661.796875" y="197"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Wiki_Cooc_0" label="" mermaidId="L_Wiki_Cooc_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Wiki" target="n:Cooc" 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="942.796875" y="197" as="sourcePoint"/>
              <mxPoint x="992.796875" y="197" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="967.796875" y="197"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Save_Embed_0" label="enqueue" mermaidId="L_Save_Embed_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Save" target="n:Embed" 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="188.65625" y="151.719791" as="sourcePoint"/>
              <mxPoint x="388.171875" y="136" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="284.726563" y="136"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Save_Extract_0" label="extract-v2 · stately" mermaidId="L_Save_Extract_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Save" target="n:Extract" 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="123.504018" y="192.5" as="sourcePoint"/>
              <mxPoint x="380.796875" y="359" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="284.726563" y="359"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Extract_LLM_0" label="" mermaidId="L_Extract_LLM_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Extract" target="n:LLM" 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="636.796875" y="359" as="sourcePoint"/>
              <mxPoint x="686.796875" y="359" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="661.796875" y="359"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_LLM_Apply_0" label="" mermaidId="L_LLM_Apply_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:LLM" target="n:Apply" 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="942.796875" y="359" as="sourcePoint"/>
              <mxPoint x="1010.601563" y="359" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="967.796875" y="359"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Cooc_Canon_0" label="" mermaidId="L_Cooc_Canon_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Cooc" target="n:Canon" 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="1284.40625" y="197" as="sourcePoint"/>
              <mxPoint x="1334.40625" y="228.12262" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1309.40625" y="197"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Apply_Canon_0" label="" mermaidId="L_Apply_Canon_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Apply" target="n:Canon" 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="1266.601563" y="359" as="sourcePoint"/>
              <mxPoint x="1334.40625" y="327.87738" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1309.40625" y="359"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
