Repository navigation
hygm: ship the generic default model learned ontologies start from - #441
Merged
Merged
Conversation
default_model() loads a packaged YAML: the fixed core (User, Person and the value types Duration, Quantity, Money, Date, TimeWindow), the generic layer (Organization, Location, Event), and the catch-alls Topic and Artifact, with generic user-centred relations and at least one relation into every value type. CORE_LABELS, VALUE_LABELS and CATCH_ALL_LABELS are what derivation and the adoption gate read; with_core() adds missing core types to a supplied schema for derive = "extend". Artifact is global so a tool named in many sessions is one node; Topic stays per chunk. Decided in #436 (map #431).
This was referenced Oct 6, 2026
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.
First build step of map #431, "An ontology that learns from the user's sessions". The content was decided in #436.
What
hygm.default_model()loads a packageddefault_ontology.yaml:User,Person, and the value typesDuration,Quantity,Money,Date,TimeWindow;Organization,Location,Event;Topic,Artifact;CORE_LABELS,VALUE_LABELS,CATCH_ALL_LABELS: the label sets that derivation (never merges or retires the core) and the adoption gate (measures catch-all share, Grill: the automatic gate that adopts a new model version #435) will read.with_core(model): adds any core type missing from a user-supplied schema, forderive = "extend".Choices worth a look
Artifactis global: a tool or library named in many sessions is one node. The backend's existing guard keeps all-lowercase mentions of a global type per chunk, so generic nouns ("the file") don't become hubs.Topicstays per chunk: as the high-volume catch-all, capitalized subjects would turn into hubs.DEFAULT_ONTOLOGY, as decided in Grill: the default ontology and a user-supplied one #436.Tests
hygm/tests/test_default.pychecks that:validate_model();span) and has a relation into it;Artifactis global andTopicper chunk;with_coreadds only the missing core types.All 41 hygm tests pass, and ruff and ty are clean. The YAML is confirmed to ship in the built wheel.