fix(curation): refuse a facet value outside the vocabulary, keep those the model proposes #84

Merged
crapougnax merged 5 commits from fix/75-facet-vocabulary into develop 2026-11-30 09:19:50 +00:00
Owner

Closes #75

Behaviour

Who writes Value outside a closed vocabulary Before After
Curator (form or API) refused saved, value silently dropped, listed in rejected 400 Values outside the vocabulary: 'regions': 'east', nothing written, no git work
Model at ingestion proposed dropped kept in facet_proposals: { <facet>: [values] } on the draft
  • The curation form already offered only the vocabulary (plus the values a document carries); the refusal concerns the API and documents whose values left the vocabulary since: the message names what to remove.
  • The document page shows the proposals ("Valeurs proposées par le modèle, hors vocabulaire") for a tenant administrator to add them on the Resources page; a curator's save answers them (key removed).
  • A facet without vocabulary stays open: no new configuration flag needed.
  • facet_proposals is reserved (cannot be a facet identifier).
  • Docs (EN, FR): DOCUMENT-PROFILE (facets), MULTI-TENANCY (sections 9, 10).

Checks

Tests: refusal names the value and leaves the remote unchanged; the save removes the proposals; ingestion writes facet_proposals. yarn test 262/262.

🤖 Generated with Claude Code

Closes #75 ## Behaviour | Who writes | Value outside a closed vocabulary | Before | After | |---|---|---|---| | Curator (form or API) | refused | saved, value silently dropped, listed in `rejected` | **400** `Values outside the vocabulary: 'regions': 'east'`, nothing written, no git work | | Model at ingestion | proposed | dropped | kept in `facet_proposals: { <facet>: [values] }` on the draft | - The curation form already offered only the vocabulary (plus the values a document carries); the refusal concerns the API and documents whose values left the vocabulary since: the message names what to remove. - The document page shows the proposals ("Valeurs proposées par le modèle, hors vocabulaire") for a tenant administrator to add them on the Resources page; a curator's save answers them (key removed). - A facet without vocabulary stays open: no new configuration flag needed. - `facet_proposals` is reserved (cannot be a facet identifier). - Docs (EN, FR): DOCUMENT-PROFILE (facets), MULTI-TENANCY (sections 9, 10). ## Checks Tests: refusal names the value and leaves the remote unchanged; the save removes the proposals; ingestion writes `facet_proposals`. `yarn test` 262/262. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(curation): refuse a facet value outside the vocabulary, keep those the model proposes (#75)
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 55s
e513839950
Curation answers 400 naming each facet and value outside its closed
vocabulary, before any git work, instead of dropping them silently (rejected
is gone from the save result). Ingestion keeps the values the model proposes
outside a vocabulary under facet_proposals, shown on the document page for a
tenant administrator to add them to the vocabulary; a curator's save removes
the key. facet_proposals cannot be the identifier of a facet.

Closes #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(ingestion): let the model give a facet value outside the vocabulary (#75)
Some checks failed
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Has been cancelled
ad5ebd34f8
The prompt told the model to choose only among the vocabulary: on a text about
a Mediterranean climate it answered the closest value (temperate) and no
proposal could ever reach facet_proposals. It now gives the right value when
none fits, kept as a proposal for the administrators.

Refs #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Two commits added after the end-to-end run of 2026-11-29: on a text about a Mediterranean climate, the model answered climat: tempéré, the closest value of the vocabulary, because the prompt said "Choose only among". No proposal could ever reach facet_proposals. The prompt now names the vocabulary and asks for the right value when none fits; that value is kept as a proposal.

Two commits added after the end-to-end run of 2026-11-29: on a text about a Mediterranean climate, the model answered `climat: tempéré`, the closest value of the vocabulary, because the prompt said "Choose only among". No proposal could ever reach `facet_proposals`. The prompt now names the vocabulary and asks for the right value when none fits; that value is kept as a proposal.
test(ingestion): the prompt names the vocabulary without forbidding other values (#75)
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 56s
c1ee3262f7
Refs #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/develop' into fix/75-facet-vocabulary
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 1m7s
3501847b19
# Conflicts:
#	src/instance/__test__/document-analysis.test.ts
Merge remote-tracking branch 'origin/develop' into fix/75-facet-vocabulary
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 1m24s
bbbf377c46
# Conflicts:
#	src/instance/tenant-ingestion.ts
crapougnax merged commit c0f5cc794c into develop 2026-11-30 09:19:50 +00:00
crapougnax deleted branch fix/75-facet-vocabulary 2026-11-30 09:19:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
modaka/studio!84
No description provided.