An undeclared name does not become a node - #568
Merged
Conversation
WaylandYang
marked this pull request as ready for review
September 9, 2026 17:50
WaylandYang
force-pushed
the
feat/undeclared-objects
branch
from
September 9, 2026 17:52
6753c13 to
17ee4af
Compare
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>
WaylandYang
force-pushed
the
feat/undeclared-objects
branch
from
September 9, 2026 22:37
17ee4af to
48ddbab
Compare
This was referenced Sep 9, 2026
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.
Closes #559.
What was wrong
Twenty percent of the AI-companies base was untyped entities, and 268 of those 296 had never been the subject of a fact. They were fact objects the extractor had not declared as entities: "lawsuit against OpenAI", "$5 billion", "March 2024", "machine learning models", "two executives in OpenAI". The relation-fact path created a node for any object (or subject) name it could not bind, type left empty, on the theory that the model had merely forgotten to declare it. Sometimes it had; mostly the name was a description or a value, and it became a node that
find_entitiesthen listed beside the real OpenAI.Resolution was not the cause: the funnel ran and merged 123 entities in that base; these were never duplicates of anything.
What changed
A name that is neither declared in the extraction nor already known to the base does not become a node.
resolution::existing_by_name, using the same recall keys as resolution: case-insensitive, generic suffixes stemmed). A forgotten declaration usually names something an earlier chunk or document declared, and that is found; a description is not.subject_not_declaredsignal.object_value, with the matched predicate when the ontology has one (a passive form that would need the object as subject gets no predicate; the word stays on the evidence), and a new drop signalobject_undeclaredso the rate can be read per base. The fact is still visible on the subject, still cited, still counted; it just does not mint an entity.is_entity_nameguard and the clause labels are untouched.Measured
The eight AI-companies documents, extracted twice on 2026-09-09 with the schema.org pack and DeepSeek-V3: once on
dev(baseline), once on this branch merged with #569 (after). Both runs completed with the base-level jobs (type resolution, adjudication, bootstrap) settled; both lost a few chunks to rate limiting and were requeued to completion (baseline 228 of 229 chunks, after 229 of 229).object_undeclaredsignalssubject_not_declaredsignalsWhat the new signal caught, in full:
persona,temporary injunction,civil investigative demand,the web for up-to-date information,recent events,marketers,several institutions,published news stories,SSI funding round,research team to investigate AI ethics,designed around human oversight,responding to prompts including descriptors of people,solutions in C, C++, Python, and MATLAB,517 questions about software engineering or computer programming,coding. The dropped subjects:educators(×4),users,students,investors,eleven employees,training data,study. Nothing in either list reads as a forgotten entity.The sixteen untyped entities that remain are declared ones whose proposed type the ontology lacks (
investigation×3,contract,settlement,Constitutional AI,Sequoia Capital, …); those are the type-adoption loop's to pick up, not this change's.The literal-object count rises by more than the fifteen signals because the model's output differs between runs (it declared fewer entities the second time); the signal counts the cases this rule decided. The two runs are one sample each; the untyped share and the never-a-subject count are the numbers the issue asked for and they moved by an order of magnitude.
Tests
an_undeclared_name_is_looked_up(store, database): found by canonical name, by case, by alias, by generic-suffix stem; not found when merged away; a description is not found.🤖 Generated with Claude Code