NaturalLanguage entity tagging and CI#18
Merged
Merged
Conversation
- New EntityTagger provider protocol on MemoryConfiguration with an
NLTagger-backed NLEntityTagger default under the MemoryNaturalLanguage
trait (nil otherwise), mirroring the query-side NLQueryAnalyzer.
- Tagger results merge additively into heuristic extraction: they upgrade
generic entity labels to person/location/organization and append entities
the heuristics missed; heuristic behavior remains the floor. Facet
inference now sees merged entities, so location/person facets fire for
tagger-recognized names beyond the built-in lexicon.
- Ambiguous self-reported locations ("i'm in lisbon") are accepted when the
tagger confirms the phrase names a place, validated by title-casing inside
a carrier sentence where NLTagger place recognition is precise. Travel
qualifiers ("i'm in boston this week") mark the mention transient and
skip the residence write. Residence statements ("i live in ...") never
require tagger confirmation, keeping eval gates OS-stable.
- ingest/save entity normalization consults the tagger when candidates
supply no entities.
- ci.yml runs on every pull_request event and pushes to main: build and test with default traits, benchmark-leakage check, strict dataset validation, plus a separate CoreML+NaturalLanguage trait build job. SwiftPM build directories are cached per trait flavor; in-progress runs for a ref are cancelled on new commits. - evals.yml is workflow_dispatch-only: runs the extraction-affected eval suites under coreml_default, gates the pressure and smoke baselines, and uploads run reports. Manual because eval results are OS-sensitive; the release gate stays local per AGENTS.md.
Swift 6.2 (the CI toolchain) rejects capturing the caller's closure inside the actor-isolated transaction closure with a sending-risk diagnostic; Swift 6.3 accepts it. The temp FTS table is session-scoped, so seeding commits first and the caller's queries run after, with identical observable behavior.
The Swift Testing workaround hardcoded /Applications/Xcode.app framework paths. On CI runners the selected Xcode differs from that symlink, so the @test macro from the selected toolchain expanded against another Xcode's Testing framework and failed to build. When DEVELOPER_DIR is set, use only the selected toolchain's paths; CI now exports it from the Xcode selection step.
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.
Summary
Stacked on #16 (retargets to
mainwhen that merges).NaturalLanguage entity tagging
EntityTaggerprovider protocol onMemoryConfiguration, with anNLTagger-backedNLEntityTaggeras the default under theMemoryNaturalLanguagetrait (nil otherwise), mirroring the query-sideNLQueryAnalyzer.person/location/organizationand append entities the heuristics missed in well-capitalized text. Heuristic behavior remains the floor — lowercase chat text leaves the tagger silent, andentityTagger: nilreproduces pre-change behavior exactly. Facet inference now sees merged entities, so location/person facets fire beyond the built-in lexicon.save/ingestentity normalization consults the tagger when candidates supply no entities.CI
ci.ymlruns on every PR commit and pushes tomain:swift testwith default traits plus the leakage check and strict dataset validation, and a separate CoreML+NaturalLanguage trait build job. SwiftPM build dirs cached per trait flavor; in-progress runs cancel on new commits.evals.ymlisworkflow_dispatch-only: extraction-affected suites undercoreml_default, pressure/smoke baseline gates, reports uploaded as artifacts. Deliberately not PR-blocking since NaturalLanguage models vary by macOS version.Testing
coreml_default(96.49/85.10/95.29 on schema gold; 100% elsewhere; 0% false-writes) — the default-on tagger causes zero gate drift.