sift-kg synthesis

Type: agentic-system-analyses/types/agentic-system-synthesis.md

Bounded synthesis

Documents become queryable state before review

sift-kg is a document-to-graph memory system with code-owned stages and an external-agent consumption protocol. This account covers its shipped CLI, library callers, maintenance paths and agent skill at commit d786991c024f5401f113fc0cb70aee96dd1bd3bf, with analysis cutoff 2026-10-18. The sole source, SRC-1, supplies inspected implementation and source-native instructions. No target code, tests, examples, services or host sessions were executed or observed. The account therefore establishes implemented routes and prescribed use, not successful operation, accuracy or causal benefit. External model/OCR internals and the agent's final response generation are outside the inspected product boundary (boundary, source register).

An ordinary progression is extract documents, build a graph, optionally resolve/review/apply identity changes, and later retrieve graph neighborhoods. The CLI and explicit library stages own the filesystem effects. The convenience library pipeline runs extraction, build and optional narration, not the review branch. Models return extraction records, identity proposals or prose to fixed orchestration; they do not choose tools inside an autonomous conversational loop (RT-RTE-document-extraction, RT-RTE-graph-build, workflow account).

For uncached extraction, code reads and chunks a document, obtains a first-chunk summary and supplies each extraction call with one chunk, domain guidance and that summary. Other chunks remain outside that call. Schema-free work can generate a reusable domain YAML from document samples. This separates working contexts without creating conversational subagents: structured return values escape the calls, while the summary is process-resident context for later chunk calls, not a persisted conversation checkpoint. Domain and summary supply is automatic internal context delivery; later CLI retrieval is separately caller-requested (RT-RTE-schema-discovery, RT-RTE-document-extraction, RT-BAP-domain-guidance).

The parser checks structure and conversions, not quotation authenticity or entailment. It can accept empty evidence fields; handled chunk failures can yield empty results rather than a document-level failure. Automatically admitted per-document JSON then feeds build. Build constructs a new graph, performs deterministic deduplication and optional cleanup, saves it, and only then writes relation-review flags. The graph is thus usable before factual review. Imported source claims and their model-interpreted representations are not independently accepted facts merely because they are stored (EPI-RTE-extraction-check, MEM-OBJ-document-extraction, EPI-RTE-relation-flagging).

Support, review and revision have different force

The retained graph combines symbolic IDs, endpoints, types and scores with natural-language names, attributes and evidence. Canonical relations accumulate mentions and distinct-document counts. Under default product-complement aggregation, repeated mentions from one document can increase confidence without adding an independent source. The arithmetic establishes statistics over admitted mentions, not calibrated truth probabilities. Query delivers representative evidence and support summaries, omitting full mention arrays and node contexts (RT-OBJ-graph-data, MEM-OBJ-relation-support, EPI-RTE-support-aggregation).

Cleanup is consequential, not merely cosmetic. Fixed rules can delete edges, prune nodes and rewrite relation labels or directions. Their domain is graph policy and configured schema fit, not documentary truth. Some passive-to-active rewrites preserve direction meaning; the inspected TRAVELED_FROM-to-TRAVELED_TO mapping changes the label without reversing endpoints. That implementation deduction prevents a universal semantic-preservation claim, not a conclusion that every rewrite is wrong. Cleanup can be bypassed, canonical-name fallback requires configuration, and unfixable type-direction mismatches can remain (EPI-RTE-graph-cleanup, RT-OBJ-domain-config).

Resolve proposes identity merges from selected type batches and attributes, with optional embedding-based grouping and deterministic same-name proposals on its supported path. It does not mutate the graph. Review then assigns executable YAML statuses through confidence policies or human keys. At CLI defaults, eligible drafts can auto-confirm at 0.85; setting auto-approve to 1.0 disables that path. Remaining manual items can be approved, rejected, skipped or left on quit. Quit preserves earlier decisions for the caller's YAML write, rather than rolling them back (RT-RTE-entity-resolution, RT-RTE-review-decisions, workflow account).

Apply selects CONFIRMED merges and removes relations matching REJECTED keys. This is a real enforcement point, but it authenticates neither a human approver nor an evidence-consuming factual criterion. Build already admits content, automatic policies can set statuses, and file editing is supported. Confirmed variant suggestions are not edge-insertion commands. Review is therefore neither universal human verification nor powerless annotation. Its implemented authority is bounded graph mutation on a separate apply invocation (RT-RTE-apply-decisions, EPI-CLM-merge-approval).

Reconstruction and later consumption remain separate operations

The extraction cache is the reconstruction base. Cache reuse checks model string, domain name and chunk size before rereading the document; it does not detect every same-stem content change. Build reads all parseable extraction files, including ones whose original document is no longer supplied. Force can regenerate requested inputs, but graph-only merges or rejections do not revise those inputs. Rebuild is not inverse-merge recovery and can restore previously removed material (MEM-OBJ-document-extraction, RT-CLM-incremental-extraction, RT-RTE-apply-decisions).

Narration separately produces descriptions, narrative Markdown and community labels from selected graph material and reloaded extraction excerpts. Those excerpts are joined by lowercased entity name, not a stable type/document-qualified identity. Phrase detection and model rewriting target wording, not factual validity. Graph changes do not automatically refresh these independently stored products. Description search, viewer and some export paths consume descriptions; library run_export and JSON export do not universally join them. Full narrative Markdown affords reading but has no established automatic pipeline reload of its full prose (RT-RTE-narrative-generation, MEM-OBJ-entity-descriptions, MEM-OBJ-communities, MEM-OBJ-narrative, MEM-RTE-export-artifacts, MEM-RTE-view-artifacts).

The representative agent workflow ends at two different boundaries: sift-kg delivers selected CLI output; the external host composes the user answer. The skill prescribes session orientation and graph-grounded answers. Query selects exact IDs or degree-ranked name/alias matches and returns a hop-bounded neighborhood, not a model-generated answer or a token-bounded context. Neighborhood arrays exclude metadata nodes, but exact DOCUMENT matches can survive in response metadata, and search can return DOCUMENT entries. No response-wide metadata exclusion follows. Paid-call confirmation is also host guidance, not CLI enforcement (RT-RTE-agent-retrieval, RT-BAP-host-skill, memory annotations, workflow account).

For document-grounded lookup, the supported contribution is durable structured state plus selective reload. For correction-sensitive use, graph surgery alone does not establish withdrawal from caches, prose or later rebuilds. For paid bulk processing, the runtime's cost control is best effort: queued chunk checks precede cost accrual, discovery/summary and several narrative phases are not covered by that check, and separate pipeline clients do not share a remaining balance. These scenario differences follow the actual consumers and control points, not a product ranking (RT-RTE-agent-retrieval, MEM-OBJ-document-extraction, runtime control coverage).

Adaptation is supported more narrowly than improvement

The strongest supported adaptive contribution is automatic creation of reusable domain guidance that reaches later extraction prompts and selected build rules. That is a behavior-shaping retained artifact independent of parameter training. Inspected code does not train the model client or embedding encoder; exact external artifacts and provider-side mutation remain unresolved. No comparison establishes that retained guidance or prose correction improved future capacity, and no evidenced criticism of a consumed explanatory theory establishes such improvement (RT-RTE-schema-discovery, RT-BAP-domain-guidance, RT-CMP-llm-client, RT-CMP-sentence-transformer, epistemic conclusion).

The accepted runtime does not establish a formulated-theory route on which to assign theory-builder conditions 1–4: localized explanatory theory, decisions depending on its content, content-directed criticism, and retained criticism shaping another round are each unestablished as theory-builder properties. Editable schema rules and prose repair do not close those gaps. Reflection is likewise unestablished: the records do not demonstrate a self-representation with both required causal directions. Automatic stages establish local computational control, not autonomous ownership of the caller-directed whole workflow. Trace learning remains not determinable rather than a supported yes or no. Exercised self-improvement at this boundary is unestablished: schema installation and reuse do not establish an objective-responsive improvement update followed by operation causally dependent on it. These are separate findings, not a ladder or a system-wide negative (RT-RTE-schema-discovery, RT-RTE-narrative-generation, workflow account, epistemic conclusion, profile verification).

Route-linked host sessions and source/answer comparisons would change the operation and fidelity assessment. Independent variation of guidance, review or retrieval would be needed for component-level benefit attribution. Content-addressed cache validation, revision-bound decisions/sidecars and propagated withdrawals would change the freshness assessment if implemented and traced across consumers. An explicit explanatory-theory criticism/revision route would supply different evidence from schema generation or phrase correction. None is assumed from the current product's labels.

Limitations

Limitation Affected SRC IDs and record citations Inspected boundary Conclusion prevented Evidence that would resolve it
Build's name-only endpoint selection is not separately inventoried in the reports. Different typed entities sharing a lowercase name can compete for the mapping. SRC-1; RT-RTE-graph-build, EPI-OBJ-graph-assertions, EPI-CLM-source-provenance; report limit Verifier inspected src/sift_kg/graph/builder.py; reports retain coarser endpoint-resolution findings. Homonym-safe attribution or complete lineage-selector comparisons. Canonical selector records covering collisions and type-qualified alternatives, with source-linked examples or traces for outcome claims.
The host skill's connection-discovery and suggestion protocols are not fully inventoried. SRC-1; RT-BAP-host-skill, workflow account, epistemic ledger; report limit Bundled skill prescribes neighborhood comparison and suggestions; actual host reasoning remains external. Complete comparisons of afforded host ideation or its epistemic criteria; observed conjectures or accepted new facts. Route records for these protocols; linked host outputs, checking and acceptance evidence for exercised claims.
The partial authority inventory omits the first-chunk summary's later chunk-call consumer as a separate unit. SRC-1; RT-RTE-document-extraction, memory annotation; profile limit Recorded summary construction and supply are wired; consumer-level profile coverage is incomplete. Complete memory-authority comparisons, not the independently supported graph/excerpt knowledge contribution. A consumer-specific authority unit supported by the recorded summary-to-chunk path.
No supplied run or causal experiment establishes successful completion, uptake or benefit. SRC-1; RT-RTE-document-extraction, RT-RTE-agent-retrieval, RT-BAP-host-skill Implementation and instructions only; host sessions and provider operation unavailable. Deployed reliability, better answers, exercised improvement or component-effect attribution. Route-linked execution evidence and outcome comparisons, with independent component variation where attribution is claimed.
Structural admission, model evidence fields and confidence arithmetic do not establish source truth or semantic fidelity. SRC-1; EPI-RTE-extraction-check, EPI-RTE-support-aggregation, EPI-RTE-graph-cleanup, RT-RTE-narrative-generation Parser, aggregation, cleanup and generation routes; no source/claim accuracy comparison or independent acceptance trace. General accuracy, calibrated confidence, universally faithful transformation or produced accepted ampliative knowledge. Source-aligned claim checks, independence/calibration evidence, and acceptance decisions naming criterion, intended use and scope.
Caches, graph decisions and generated sidecars lack an established synchronized revision/withdrawal route. SRC-1; MEM-OBJ-document-extraction, RT-OBJ-review-files, RT-RTE-apply-decisions, MEM-OBJ-communities, MEM-OBJ-entity-descriptions, MEM-OBJ-narrative Inspected local writers and later consumers; deployed host regeneration unknown. Deployment-wide fresh memory, synchronized withdrawal or exact rollback by rebuild. Revision-bound inputs/outputs and traces covering corrections through cache, rebuild, sidecar regeneration and later consumption.
Provider accumulation, caller-dependent initial content and unspecified API consumers remain unresolved; no qualifying trace-update chain or bounded absence closes the inventory. SRC-1; RT-CMP-llm-client, RT-OBJ-domain-config, RT-OBJ-graph-data, MEM-OBJ-document-extraction; profile verification Local shipped paths inspected; provider internals and actual arbitrary callers not supplied. Complete lineage/admission/consumer inventories or system-wide trace-learning yes/no. Provenance and admission records plus any automatic trace-to-durable-artifact-to-later-consumer chain, or warranted bounded absence records.
Presentation, ingestion and context construction are not exhaustively assessed. SRC-1; MEM-RTE-export-artifacts, MEM-RTE-view-artifacts, RT-RTE-document-extraction, RT-RTE-narrative-generation Export dispatch/flattening and Python view construction inspected; every serializer, browser behavior, OCR internals and further prompt-side truncation not fully traced. Universal presentation/import fidelity, OCR accuracy, complete evaluator coverage or universal token caps. Relevant serializer/browser/OCR evidence and full prompt construction, with execution comparisons for fidelity claims.

Source-read log: none. This synthesis uses the supplied accepted members and verification limits without new source inspection.