Skip to content

feat(entities): let the decision model type names the rules leave as terms - #513

Merged
adeelahmad merged 9 commits into
mainfrom
claude/project-thread-qfebqj
Oct 18, 2026
Merged

adeelahmad merged 9 commits into
mainfrom
claude/project-thread-qfebqj

Conversation

@adeelahmad

@adeelahmad adeelahmad commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: after #395 the rules type most names, but a name nothing around it explains (a single unknown word such as a brand, a product or a project, "Quillmark") still came out as a Term, even with a decision model set up.

After: when Jev or Laya is set up, analysis asks it what each new Term of a recording is, with the first two lines it's said in, and keeps the type when it is sure (decisions.act_above, 0.8). A model that isn't sure, or can't be reached, leaves the name a Term.

  • One call per recording: decide.choose_all asks several routine questions at once (up to 20 names a call, 40 a recording); Laya, which reads less, is asked one name at a time.
  • Not asked: names already entities or aliases, short forms of a longer name said in the same recording ("Johnson" of "Sarah Johnson"), names in Custom vocabulary, names a workflow's nodes typed, and namespaces on a fixed list.
  • New setting Settings › Analysis › Names the rules can't type (analysis.typing): auto (default: the decision model when one is set up, never the language model), model (the language model answers when there's no decision model), rules (no model).
  • Calls go through decide, so they are in Activity and count toward budgets; at the hard limit nothing is asked.

Motivation and Context

Adeel: "every entity comes as term? why!!" #395 fixed the rules; this covers the names the rules can't tell, with the decision model AGENTS.md asks routine calls to use.

Steps to reproduce (if appropriate):

With Jev set up, a transcript line "Then Quillmark came up, and Sarah Johnson said the Acme Corp deal is done." gave Quillmark as a Term. It is now a Product (test_the_decision_model_types_what_the_rules_cant).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests (tests/domain/test_name_types.py: Jev types an unknown name in one call and isn't asked again, unsure answers and failures stay Terms, the language model isn't asked by default, typing: model and typing: rules, Laya one at a time, Custom vocabulary terms aren't asked, choose_all).
  • My change requires documentation updates, and I have updated docs/ accordingly (processing.md "Names the rules can't type", assistant.md routine choices).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: unknown names get a type from the decision model; merged on green CI.
  • Agents: the types reach agents through the existing entity API, MCP and assistant tools; the setting is set over PUT /api/v1/settings/analysis and the assistant's change_settings tool like every other.
  • Zero setup: works with the decision model the install already has; nothing to add.
  • Fewest clicks: no clicks; one setting with a default.
  • Configurable: analysis.typing in Settings › Analysis, default auto, not in the setup wizard.
  • Light: no new dependency or model on the device.
  • Private and secure: with Jev (hosted), the lines that name an unknown Term leave the machine, as other routine choices already do; threat-model.md and threat-model.yaml say so, with Laya or rules as the way to keep them local.
  • Cost: the cheapest model (the decision model), one call per recording, only for names the rules can't type; logged in Activity and stopped at the budget's hard limit. The language model is never asked unless picked.
  • User decides: typing a name is a routine choice, so auto lets the decision model people already set up for routine choices make it, only when it is sure; installs without one see no change, rules turns it off, and types people set are never asked about or changed.
  • Upgrades: n/a, no change to stored data; existing Terms are kept (asking about them is a refine-later item).
  • Honest: docs say which models are asked, when, and that unsure names stay Terms.
  • Tested and documented; the README lists it as built (Understand it) with its checks in docs/requirements.md. No API shape change, so no OpenAPI change.
  • Open: no new dependency.
  • Reported in the thread; refine-later items in DEVLOG.md (an action to ask about existing Terms over API, MCP and the Entities page; the namespace's own types; the hybrid mode).
  • Reuse: reuses decide (engines, confidence, budgets), entity_setup's built-in type help and the existing settings UI.

Local CI (ci/local-ci.sh): all six jobs (FastAPI embedded and server, Next.js, pre-commit, title, upgrade from the last release) pass on this change over main at #518 (cc07979).

🤖 Generated with Claude Code

https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT

…terms

Analysis asks the decision model (Jev or Laya, when set up) what each new
Term of a recording is, in one call, and keeps the types it is sure of.
Settings > Analysis > Names the rules can't type (analysis.typing) can let
the language model answer too, or turn it off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
…model types names

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
…-qfebqj

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
…-qfebqj

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT

# Conflicts:
#	CHANGELOG.md
#	README.md
#	threat-model.yaml
…-qfebqj

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT

# Conflicts:
#	CHANGELOG.md
#	threat-model.yaml
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
The changelog entry moves to the end of Unreleased, where pull requests
adding at the top of the list don't conflict with it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MeaEgM8m7rTjbkKVQVsrT
@adeelahmad
adeelahmad merged commit f283e47 into main Oct 18, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-qfebqj branch October 18, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants