A phrase binds to a property - #751
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
…behind the running one Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0044 cut 2, first slice: a relation phrase binds to a property per signature (decision 3), the twin of the kind-word binding of #741. Pitfall 11 of
docs/design/prior-work.md(arguments before relations; the (class, class) signature is part of the key).What lands
Migration 0066:
phrase_bindings(phrase × subject class × object class or value → property, direction, status bound / none / undecided, the votes, the statement count and three examples at decision time, decided by agent or person;UNIQUE NULLS NOT DISTINCTso an unbound side is its own signature) andrelation_types.updated_at, touched on every update, which is what marks a binding stale.utopia_store::phrase_bindings: the signature query (live open statements grouped by normalised phrase, the two ends'type_idand whether the object is a value, with three rendered statements and their quotes fromfact_evidence),bindings,stale, anddecide(upsert; a person's decision is never overwritten by the agent).utopia_extract::phrase_align: the contract. One item per signature with its statements and quotes and the candidate properties (key, label, definition, kind, domain, range); the model answers[id, key | null, forward | reverse | null]. The rules are the kind-word rules turned to phrases: the property may be broader than the phrase, never narrower or merely related; judge by definition and sentences; null for a phrase that only reports or evaluates, for one whose sentences show different meanings, and for a value that is not what the attribute measures; direction follows the definition. Parsing is per item and tolerant, as inalign.utopia_server::phrase_alignment: the jobalign_phrases, per base under an advisory lock, enqueued when kind-word alignment finishes and when a property is created or updated. Candidates are the properties whose declared domain and range admit the signature's ends in either direction; an undeclared end admits anything, and an end whose kind word is bound to no class is admitted only by an undeclared end (the measurement below is why). More than 60 fitting candidates means the signature is skipped rather than guessed. Two votes with the candidates reversed; agreement binds, disagreement isundecided, null isnone.Both alignment jobs look for new work when they end. A run now re-enqueues itself when a batch failed (three 502s at the start of a kind-word run had left the 60 most frequent words undecided until the next document), when signatures or kind words appeared while it ran, or when bindings it made went stale while it ran (a property edited mid-run). A run that finds the lock held just returns: an earlier version of this branch had it queue itself behind the running one, which made the two kick each other in a 15 ms loop.
Nothing is materialised:
facts.from_statement_idand the typed rows are the next slice.Measured
A hand-written ontology of 14 classes and 28 properties (FDA, statistics, filings, notices) seeded into two bases; kind words aligned first by #741's job (60 of 400 bind on the batch, 15 of 230 on the NVDA releases: "financial measure", "line item", "trademark" fit none of the 14 classes).
25-document batch (extracted under #743, so its tables are pre-#744): 423 signatures over 861 statements.
NVDA four releases (#748 run), 334 signatures over 910 statements, most with an unbound subject: the proto offering every property bound 73 signatures (291 statements) at 59% stated, the generic
valueattribute having swallowed every cash-flow row ("NVIDIA —value→ (1,894)"); this branch binds 22 (70 statements, 8%) at 76% stated on 38, the nine wrong ones all one cash-flow section ("changes in operating assets and liabilities › accounts payable") bound to the change property.Coverage follows the kind-word bindings and the ontology's size, not the binder: with a 14-class ontology most ends are unbound and 276 of the batch's signatures have no admissible property. Statements under those stay in the open graph and count toward the workbench's suggestions.
What still goes wrong: a phrase that carries part of the value ("下降 3.4%" bound to the change property loses its sign, which wants an implication rule with a reading); "granted → participated_in"; tense ("files" bound to
filed).Run-to-run: the proto's binding pass ran twice on the batch and bound 103 then 90 signatures, with 14 and 28 undecided. Two votes per signature narrow the variance, they do not remove it; the undecided ones are the queue's.
Not in this change
Materialisation (
from_statement_id, typed rows, recomputation); implication rules and readings; a signature that tells a figure from words on the value side; the alignment queue page (#725); a debounce for bulk property creation (each creation queues a run; the lock serialises them and the end-of-run check catches the rest).🤖 Generated with Claude Code