Files
rag-technical-docs-assistant/docs/presentation/02-ingestion.svg
T

85 lines
7.1 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img">
<title>Document ingestion pipeline</title>
<desc>Independent uploads, bounded extraction and atomic publication</desc>
<defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="8" refY="4.5" orient="auto"><path d="M0,0 L9,4.5 L0,9" fill="#64748b"/></marker></defs>
<rect width="1600" height="1000" fill="#ffffff"/>
<style>text{font-family:Segoe UI,Arial,sans-serif}.title{font-size:38px;font-weight:700;fill:#0f172a}.sub{font-size:21px;fill:#475569}.node{font-size:21px;font-weight:650;fill:#0f172a}.detail{font-size:17px;fill:#475569}.edge{font-size:14px;fill:#475569}</style>
<text x="75" y="75" class="title">Document ingestion pipeline</text>
<text x="75" y="115" class="sub">Independent uploads, bounded extraction and atomic publication</text>
<path d="M395,262.5 L450,262.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M770,262.5 L825,262.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M1145,262.5 L1200,262.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M1360.0,335 L1360.0,435" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M1200,507.5 L1145,507.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M825,507.5 L770,507.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M450,507.5 L395,507.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M235.0,580 L235.0,680" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M395,752.5 L450,752.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M770,752.5 L825,752.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<path d="M1145,752.5 L1200,752.5" fill="none" stroke="#94a3b8" stroke-width="2.2" marker-end="url(#arrow)"/>
<rect x="75" y="190" width="320" height="145" rx="16" fill="#e8f0fe" stroke="#2563eb" stroke-width="1.8"/>
<rect x="75" y="212" width="5" height="101" rx="2" fill="#2563eb"/>
<text x="95" y="230" class="node">1. Admin upload</text>
<text x="95" y="268" class="detail">Cookie, role, CSRF</text>
<text x="95" y="298" class="detail">Idempotency-Key</text>
<rect x="450" y="190" width="320" height="145" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="1.8"/>
<rect x="450" y="212" width="5" height="101" rx="2" fill="#0f766e"/>
<text x="470" y="230" class="node">2. Validate intake</text>
<text x="470" y="268" class="detail">Size, MIME, file structure</text>
<text x="470" y="298" class="detail">SHA256 of original</text>
<rect x="825" y="190" width="320" height="145" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="1.8"/>
<rect x="825" y="212" width="5" height="101" rx="2" fill="#7c3aed"/>
<text x="845" y="230" class="node">3. Persist original</text>
<text x="845" y="268" class="detail">Immutable content on disk</text>
<text x="845" y="298" class="detail">New document; frozen profile</text>
<rect x="1200" y="190" width="320" height="145" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="1.8"/>
<rect x="1200" y="212" width="5" height="101" rx="2" fill="#7c3aed"/>
<text x="1220" y="230" class="node">4. Queue job</text>
<text x="1220" y="268" class="detail">Database-backed ingestion job</text>
<text x="1220" y="298" class="detail">No external message broker</text>
<rect x="75" y="435" width="320" height="145" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="1.8"/>
<rect x="75" y="457" width="5" height="101" rx="2" fill="#0f766e"/>
<text x="95" y="475" class="node">8. Chunk + normalize</text>
<text x="95" y="513" class="detail">Source order / groups / locations</text>
<text x="95" y="543" class="detail">Search text separate from source</text>
<rect x="450" y="435" width="320" height="145" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="1.8"/>
<rect x="450" y="457" width="5" height="101" rx="2" fill="#0f766e"/>
<text x="470" y="475" class="node">7. Quality admission</text>
<text x="470" y="513" class="detail">Strict review OR opt-in partial</text>
<text x="470" y="543" class="detail">Keep warnings; reject unusable</text>
<rect x="825" y="435" width="320" height="145" rx="16" fill="#fff2dd" stroke="#c56a08" stroke-width="1.8"/>
<rect x="825" y="457" width="5" height="101" rx="2" fill="#c56a08"/>
<text x="845" y="475" class="node">6. Extract text</text>
<text x="845" y="513" class="detail">DOCX/text: direct; PDF: fallback</text>
<text x="845" y="543" class="detail">Images: hosted vision</text>
<rect x="1200" y="435" width="320" height="145" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="1.8"/>
<rect x="1200" y="457" width="5" height="101" rx="2" fill="#0f766e"/>
<text x="1220" y="475" class="node">5. Worker claim</text>
<text x="1220" y="513" class="detail">Lease + fencing token</text>
<text x="1220" y="543" class="detail">Heartbeat and ownership checks</text>
<rect x="75" y="680" width="320" height="145" rx="16" fill="#fff2dd" stroke="#c56a08" stroke-width="1.8"/>
<rect x="75" y="702" width="5" height="101" rx="2" fill="#c56a08"/>
<text x="95" y="720" class="node">9. Embed bounded batches</text>
<text x="95" y="758" class="detail">Local Ollama / bge-m3</text>
<text x="95" y="788" class="detail">Stage results before publish</text>
<rect x="450" y="680" width="320" height="145" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="1.8"/>
<rect x="450" y="702" width="5" height="101" rx="2" fill="#7c3aed"/>
<text x="470" y="720" class="node">10. Atomic publication</text>
<text x="470" y="758" class="detail">Commit chunks + vectors together</text>
<text x="470" y="788" class="detail">Fenced by current claim</text>
<rect x="825" y="680" width="320" height="145" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="1.8"/>
<rect x="825" y="702" width="5" height="101" rx="2" fill="#7c3aed"/>
<text x="845" y="720" class="node">11. Ready / inactive</text>
<text x="845" y="758" class="detail">No partial searchable document</text>
<text x="845" y="788" class="detail">Same-job retry on eligible failure</text>
<rect x="1200" y="680" width="320" height="145" rx="16" fill="#e8f0fe" stroke="#2563eb" stroke-width="1.8"/>
<rect x="1200" y="702" width="5" height="101" rx="2" fill="#2563eb"/>
<text x="1220" y="720" class="node">12. Activate knowledge</text>
<text x="1220" y="758" class="detail">Admin selects ready document</text>
<text x="1220" y="788" class="detail">Revision / access invalidation</text>
<text x="75" y="890" class="detail">Review is conditional. Local partial-admission mode bypasses manual approval; malformed data, identity and bounds still fail.</text>
<circle cx="83" cy="962" r="7" fill="#2563eb"/><text x="100" y="968" class="detail">Frontend / admin</text>
<circle cx="458" cy="962" r="7" fill="#0f766e"/><text x="475" y="968" class="detail">Backend logic</text>
<circle cx="833" cy="962" r="7" fill="#7c3aed"/><text x="850" y="968" class="detail">Persistent state</text>
<circle cx="1208" cy="962" r="7" fill="#c56a08"/><text x="1225" y="968" class="detail">AI / embedding provider</text>
</svg>