A shape of statement implies a fact of another property, read once per phrase and cached - #882
Merged
Merged
Conversation
…r phrase and cached Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
…lel tests cannot leak into it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
Merged
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.
The fifth slice of 0044 decision 3, and the one the prototype's recall gap points at (0044 §2): the facts a reader draws without the text stating them — a place's country from its region, a film's country from "British film", a year from a phrase — reach the typed graph through implication rules with cached readings. This is the largest remaining piece of alignment (cut 2); with it the parity run against the bound pass becomes possible once the bench in #880 is run with a model.
Model
READINGS) that feeds both the prompt and the validator:country_of_nationality,country_of_place,year_of_phrase.read_phrasesjob and cached inphrase_readings— a name resolves to an entity in the base (found by name, or created with its name fact per 0041), a year lands as a value, and "no answer" is cached too, so an unplaceable phrase is never asked about twice. The job then queues materialisation.materializenever calls a model. It reads the cache and, for approved rules, writes facts markedimpliedwith the triggering statement's evidence copied, tracked inimplied_fact_sources(rule + statement, or rule + entity for kind-word rules), and retired by source exactly like bound rows: a rejected rule, a dead statement, an entity whose kind word changed all take the row down at the next run. A reading not yet cached simply produces nothing that round. A thing never implies itself.utopia:impliedon such facts, so an auditor can tell a stated fact from a drawn one.Schema (migration 0073):
facts.implied,implication_rules,phrase_readings,implied_fact_sources.CURRENT_SCHEMA_VERSION→ 72 (it counts files; 0071 is held by #861).Surface:
POST /kbs/{id}/review/alignment/rules/{rule_id}({approve}→ 202 with a job id), aruleitem on the alignment queue with the shape, the concluded property and the reading, a card on the Review page in both languages.Verified against pgvector/pgvector:pg16 on a fresh database:
New coverage: a proposal lands once and a person's decision commits with the right job (
read_phraseswhen a reading is needed, materialisation otherwise); an approved rule waits for its reading, then implies a fact with evidence and sources, and a second run changes nothing; rejecting the rule or losing the statement retires the implied row; a kind-word rule implies a fact for every thing so called and "no answer" is cached; the aligner offers a kind word and records the model's proposal on the queue;read_phrasesfills the cache, names a thing and queues materialisation; the route answers 202 and scopes by base; the rule and reading parsers count malformed rows without believing them; the existing lifecycle regressions now script the rule question.Not in this PR, said in the record: a revision table of rules; readings beyond the three; evidence for kind-word rules (the kind word is the entity's, not a statement's, so there is no quote to copy).
🤖 Generated with Claude Code