Skip to content

Entity extraction from selected records ​

This specification owns window extraction, deterministic host admission, source/entity/knowledge bindings, current storage and invocation recovery. The end-to-end construction design connects extraction to cross-window organization, maintenance and carrier evaluation. Quality versions, measured scope and readiness belong to the evaluation protocol.

See the identity rules for components/instances, collections/unresolved identities, renames/versions and later corrections. Section 6 defines current contracts; only current data structures are supported, without a legacy production reader; explicit new-workspace migration is separate. Human-confirmed cross-window organization is provided by the entity-link journal and library, without replacing window identities. Automatic cross-Agent identity merging is outside scope. Research, structural validation and functional completion do not establish model performance or reuse benefits.

1. User outcome and scope ​

The primary result is reusable, complete natural-language knowledge saved pending from one selected source window. Entity and optional typed association is a second independent projection, not the prerequisite or canonical body. See knowledge principles.

Generation inventories complete sources, saves admitted bodies, then independently compares sources, the fallible ledger and bodies. Association needs an exact actual Agent/human coverage decision and separate request confirmation. Zero bodies still need coverage. Missing or failed associations never block body reading, maintenance or revision; recognizing objects does not establish source faithfulness or task benefits.

Window entity meanings, mentions, qualifiers, referent levels and uncertainty remain inspectable. Names, paths, types and similarity do not establish identical objects. No automatic cross-window merging, embedding search or global graph is introduced. Cross-window library organization still requires the existing explicit human confirmation.

2. Research and decisions ​

Primary sourceRelevant practiceOMK decision
End-to-end Neural Coreference Resolution (2017)Spans and context support mention and antecedent decisions.Retain mention positions and correspondence rationale; do not resolve pronouns mechanically to the nearest name.
GLiNER (2024)Open entity types in named entity recognition.Keep open types; evaluate recognition separately from identity. Do not introduce another Python model dependency initially.
Joint entity-level relation extraction (2021)Joint use of local mentions, coreference, and entity relations.Preserve window-local evidence and independent identities. Current production saves canonical body before a separate association call; this replaces the historical joint typed workflow.
GraphRAG DataflowTextUnit provenance; joint entity/relation extraction; default merging by name and type.Retain provenance; name/type merging violates OMK's homonym boundary, so do not adopt it or full graph indexing.
W3C Web AnnotationQuotes with surrounding text distinguish repeated passages.Use an exact quote with adjacent source context to select a unique passage; the host computes positions and rejects ambiguous matches. This is OMK's selector, not complete protocol compatibility.
LLM coreference evaluation (2024)Automatic and manual analysis examines prompts and failures.Report structural admission separately from semantic errors against cases frozen before output.
LEA coreference evaluation research (2016)Entity links inform coreference evaluation.Check required links and separations independently; do not substitute entity counts or name matches. Do not claim a full LEA implementation.

These sources inform choices, not OMK performance evidence. Old single/bounded typed workflows keep their frozen measurement identities; current body-first generation cannot inherit their quality, cost or causal conclusions. Source-faithfulness and real-task benefits need their own controlled evidence.

3. Contracts and identity ​

Current knowledge-body-first/v9 completes after the draft and publication of either the ordinary body or the combined window results. Source inventory, coverage and pending associations can be prepared separately as needed. Model opinions and actual decisions remain separate; see the source review contract and generated contract.

BREAKING-SCHEMA/API/COMPARABILITY. Current journals use Schema 9. Ordinary body requests still bind the exact same-run draft and complete Source3. Codex body requests above the threshold use ordered windows. The host publishes only after every window succeeds. Source review and pending association generation remain independent. Matching older builds read older journals. knowledge-workflow-to9 migrates only to an independent copy and archives older journals, analyses, originals and automatic permissions unchanged. Historical measurements retain their original identities.

The body prompt determines a concrete case's scope before composing independently readable segments, including a case split into another proposal. A supported upgrade-background version is distinct from an unknown version implicated in a reported problem; general methods do not inherit unrelated case restrictions. The association prompt selects object mentions before mapping and checks each identified object across related same-source paragraphs about its definition, attributes, conditions, maintenance or storage. Valid own mentions may be reused without repeating a name or objectId in each paragraph; unrelated paragraphs remain unmapped. One declaration position cannot supply separate general-object/version mentions: Git metadata may qualify the object, while a separate version object needs its own source-supported mention. Independently referenced artifact/code states and necessary component/version mappings remain distinct. A property or problem statement is not a mention of its owning object, and a component link does not propagate retrieval mappings. These are model instructions, not deterministic semantic guarantees; raw quality still requires source review and actual scoped retrieval.

  • Canonical body draft: {title, content:{segments:[{segmentId,text,evidence}],organization?},reuseRationale}. Each segment is complete and preserves necessary conditions, attribution, negation, time, exceptions, participant stances and unknowns. Titles, reuse hints, quotes and future catalogs cannot supply missing body content.
  • Inline evidence: {source:{snapshotId,sourceVersion},selection:{evidenceRef,start,end,quote},basis,interpretation?}. Basis distinguishes source assertion, direct observation and inference; exact matching is not truth.
  • Body wire3/prompt19 and ledger wire3/prompt4 select host-owned {startPassageId,endPassageId} ranges in complete numbered source text and echo the exact passageIndexDigest. The frozen host mapping binds the full SourceSet, including empty sources, and computes exact quotes/UTF-16 positions; unknown, cross-unit/source or reversed IDs fail. Body ranges remain bounded at32,768 UTF-16 units; ledger ranges can be losslessly split at host boundaries within existing evidence limits. Association and coverage retain exact {evidenceRef,quote,contextBefore,contextAfter}-style unique location in their own units. No model supplies offsets or fuzzy matches; complete originals precede admission.
  • Each body proposal declares requiredContexts:[{literal,evidence}] for source-backed context shared by all its segments. A literal must occur verbatim in its evidence quote and every segment's text. The host appends that evidence to each segment, deduplicating complete evidence values without rewriting text. Empty declarations are allowed. Declared contexts do not prove that all necessary context or reusable content was identified. Compiled accepted drafts total at most 16 MiB of UTF-8 JSON; a proposal exceeding that capacity or merged evidence limits is rejected whole, without truncation.
  • Derived associations bind {knowledgeId,revisionId,bodyDigest}, exact catalog revisions, segmentEntityRefs, optional typedRelations, and issues. Typed relations retain source roles/modality/polarity where projected but do not require all body meaning to become triples. Failure/rebuilding never revises body. Default association prompt9 explicitly requests typedRelations: no reliable relations produce an empty array; null records a failed body association while preserving the original response. Relation text retains conditions, scope and attribution that change the judgment instead of making conditional applicability unconditional. These prompt and admission rules do not prove semantic correctness.
  • Window entities retain source-supported description, qualifiers, referentKind, identityStatus, uncertainties and closed component/collection/candidate references. Every admitted entity needs a valid mention; identifier fragments, missing refs and invalid mention ownership fail admission. No deterministic check proves semantic identity.
  • In association output, each entity owns mentions with entity-local mentionKey values. The host assigns persistent IDs and compiles catalog/entity/key-qualified references; equal keys under different entities are distinct. Component/collection links may cite only the declaring entity's own mentions and remain subject to existing referent-kind and reference-closure checks. Every body segment has exactly one segmentDecisions entry: mapped has nonempty entity references, abstained has none, and both require a reason. These AI decisions are diagnostics, not content or coverage reviews; abstention does not prove no relevant object exists.
  • New body and derived revisions are pending. Body retain/discard and derived accept/reject are independent decisions; a new revision inherits neither decision.

3.1 Critical sources and ordinary repeated mentions ​

Each complete body segment directly cites locations supporting its important conditions, corrections, exceptions and unknowns. When attribution depends on earlier source context, retain that anchor alongside the claim evidence. Metadata-derived scope remains identified as metadata: never fabricate a quote from it or treat source time as fact time. Full-message access, a catalog description or rationale is not direct evidence for a body claim. A body segment must preserve the content itself, not just its quote.

Body prompt19 organizes reusable conclusions, action prerequisites and final states before supporting cases, avoiding progress logs and repeated audit disclaimers. Each segment remains independently readable with its necessary object, version, attribution, conditions, negation, exceptions and unknowns. For changing implementations, production defaults, versions or completion status, every affected segment retains the reporting date, UTC/timezone basis and speaker attribution, for example as a dated conversation report. Sub-day precision or intermediate stages remain in body text when they change the judgment; a source date never becomes fact/effective/current-verification time. Evidence still quotes the original statement verbatim and preserves the exact supporting excerpt's original coordinate.timestamp and its metadata nature in interpretation. Metadata dates never become fabricated quotes or requiredContexts literals. Missing dates are explicit when relevant to adoption; file/Git attribution keeps its actual provenance without inventing message or fact time. Stable methods independent of historical status need no added date. These are prompt requirements, not deterministic semantic checks or evidence of general quality. Proposals follow future tasks: a method and its necessary actual context, selected plan and examples stay in the same knowledge entry, with source nature separated by paragraph. Method/case labels do not by themselves split that usage chain; unrelated tasks remain separate.

Object mentions are a separate identity-navigation obligation. Their permitted scope is the complete exact source window bound by the segment, not only the cited excerpt or quote. A supported mention elsewhere in that same sourceKey may provide navigation; it neither repairs missing claim evidence nor permits another sourceKey or title-only identity. Ordinary repeated names need not all become mentions, but necessary identity occurrences remain inspectable. Optional derived typed evidence may only reuse the cited source ranges of its referenced body segments. Source matching/localization and source-faithfulness judgment remain different checks.

Source-defined numbering, codes or order stay linked to their original entries and usable settings, examples and conditions when the numbered catalog is itself requested material. Host passage labels never become original item numbers. This is a model instruction, not a deterministic preservation guarantee.

4. Corrections and knowledge revisions ​

Entity correction appends an immutable entity-analysis revision under exact generation/head and idempotent request identities; it does not rewrite body. Existing mention identity cannot move to another source span. Source-supported new: identities are host-assigned UUIDs; component/collection/candidate references must remain closed.

Body revision accepts a complete new KnowledgeDraft with inline evidence. The host rereads every referenced snapshot/version and validates exact UTF-16 quotes before appending. The old citationLocators/--citations and parallel grounding fields are replaced. A new body revision gets its own digest, remains pending and does not inherit retain; older projection refs become stale.

apply-associations pins exact body/digest, catalogs and association generation to create a pending projection; review-associations reviews only that projection. Model rebuild-associations is prepared and confirmed independently with explicit complete sources and exact bodyRefs, without prior source-coverage decisions or body rewrites. After revision, associations bind the new bodyRefs; use separate prepare-source-review when coverage diagnosis is needed. Endpoints remain catalog/revision/entity-qualified, without name-based cross-window merging.

5. Domain and runtime boundaries ​

Knowledge contracts/history remain pure core; extraction owns phase wires and structural admission, application orchestrates use cases, and filesystem/executor adapters own effects. CLI and Studio use the same body-first flow. Cross-window entity-link execution remains independent.

Each stage records complete sources, prompt/profile/wire, system/input, producer and request digest before dispatch, checking execution/archive capacity first. Ledger, body, coverage and association have separate native identities and complete executor JSON (or bounded exception observations), archived before decoding. Refusals, partial failures, unknown fields, tool diagnostics, usage/cache and reported flags remain preserved, not represented as an old single run5 response.

Preparation is zero-model; confirm each exact requestDigest independently. Association additionally requires an active nonconflicting actual Agent/human coverage decision, rechecked at preparation and under the shared claim lock. Model all-covered/no-findings never approves itself. Revocation after claim preserves the sent original and pending result with invalidated context. Derived failure never deletes bodies. Stages default to 300 seconds with no automatic retry/reask/fallback, without implying cost or quality guarantees.

Journal6 with source-review input2, writing input1 and body input4 binds the complete delivered sources and pinned ledger/body context. Association independently retains its v1 input envelope. RawUnits, host sourcePath/cwd and capture time stay local. Instructions in sources are data, not authority to expand reading or invoke tools. Metadata quotes remain metadata, never fabricated excerpt speech. Unreported usage/cost stays unknown.

6. Current storage contracts ​

Current physical paths and identities are defined by the explicit workspace contract: body history Schema 3, independent association history Schema 2, entity history Schema 2, independent reviews Schema 1 and generation journal Schema 9, plus source-ledger/coverage histories Schema 1. Each body revision has bodyDigest; inline evidence is the source binding, without old parallel grounding/extractionRunId read dependencies.

generation-journals/<run-id>.json records phases and fixed publication intents. Originals at generation-journals/outcomes/<run-id>/<invocation-id>.json bind their request and complete byte digest. With current generation profiles, resume attaches held/orphan originals and replays exact commands/receipts with zero model calls. Partial publication retains fixed IDs and committed prefixes. A claimed phase with no original remains unknown and cannot be resent automatically. A never-claimed association may be sent only by explicit continuation. Repeating a completed run identity makes zero calls.

An active journal containing an older generation profile, including association v7 in prepared/claimed/archived states, is unsupported: the current build neither decodes archived output, attaches orphan output nor dispatches a later stage under mixed identities. Use the preserved matching build for recovery. Already recorded prepared_writes can replay their fixed publication intents without model decoding or calls; if further old-profile work remains, the run then returns to unsupported. Terminal completed/failed journals and their original bytes remain inspectable, and existing current-format body/entity/projection data remain readable. Historical records are never rewritten to claim the new profile.

Entity histories keep their 1,024-revision/16-MiB per-file limits and idempotent receipt replay; old revisions are not truncated. Catalog scans remain bounded at 4,096 files/64 MiB and report unreadable analyses separately. Structural validation, exact location and successful reopening do not establish semantic quality.

Current readers reject old typed knowledge v2 and current journal recovery rejects journal8 and earlier. Old run inventory is explicit unsupported. Migration requires a separate new workspace and preserved originals, creates new pending body revisions without retain inheritance, and does not retarget library/carrier refs. Old source/workspace/binary can be retained for rollback; there is no dual canonical reader.

seal-run/sealed-runs archive dispositions keep their independent historical identities; they do not restore old default generation or grant semantic acceptance. The retired study runtime is available only in matching historical builds, not in the current command tree. Explicit sealing preserves raw inventory before its own disposition marker; it is not a migration or current journal resume.

Writes share .knowledge-write.lock; only a local owner proven exited permits lock recovery. Body reading remains available if its derived association or source is unavailable, with explicit diagnostics rather than a healthy-empty result.

Historical typed prompt record (not the current generation identity):

The historically recorded raw UTF-8 digest for the full strict v16 system is sha256:a8c353c0f9c05d1249c3414eaaba7bc7d85b0d34f98142413ba6550173bde6e7. This is a historical digest declaration: the current tree has neither a corresponding complete v16 prompt artifact nor a v16 entry in test/measurement-governance/prompt-registry.ts and its freeze test. It therefore does not provide a recomputable byte-level anchor for that value; a recorded version or digest alone cannot restore the original system bytes. That historical prompt change is BREAKING-COMPARABILITY, without changing wire/domain Schemas, run storage or pipeline policies. Historical no-few-shot strict v15 retains frozen digest sha256:d5c14bb7809a2ccd57b5984bb39ff14ef709fd365db8df7792b697fac420736d; original prompt-json v14 retains sha256:e3acd05eca278b0e34f5d8b75767176c5ede7ce7fade561975eb1f4e4c417399. Old frozen assets, experiment arms, permissions and results retain their original identities; v16 cannot reuse an old runId or execution permission. Existing data is not migrated or rescored, and different identities cannot be pooled or inherit quality/Gold conclusions. Actual quality and execution evidence remain in the evaluation protocol.

7. Quality and completion evidence ​

Functional verification covers independent entity results, inspection/correction, shared knowledge identities and exact revision bindings, empty/partial/interrupted behavior, and rejection of unsupported formats. The historical typed evaluation protocol owns its frozen criteria, corpus/checker identities, comparisons and review gates. It does not certify this body-first workflow; body source-faithfulness and real task use need separately bound evidence. Location and reference closure establish structure, not semantic accuracy, truth or reuse benefit; workflow tests cannot replace that protocol.