feat(loop): the digest judges intent from the content, not the file type - #124
Merged
Merged
Conversation
The intent on a digest deliverable came from the input medium:
INTENT_BY_KIND = {"text": "solve", "link": "solve", "idea": "share",
"image": "record", "voice": "record"}
So a piece of text that *tells a story* was classified 解决, and an image
captioning a *process* was classified 记录. The creator never sees this
happening — they see the consequences: the system asks a solve-flavoured
question and watches solve-flavoured signals for a piece that is not one. That
is the same class as the 展示作品被问转折 bug, with a different root: not too few
buckets, but the wrong evidence for the bucket.
The model already reads the whole material, so it now judges it too: the
judgment contract gains `content_intent` (one of the three, or null), the prompt
says to judge by content and explicitly not to pick solve just because the
material is text, and the JSON example carries the field. When there is no model
— or it declines to judge — the medium mapping still applies, unchanged.
Verified against the real model with a deliberate contrast:
- 「第一次办展那天…」 — **text**, but a story → judged **share** (the medium would
have said solve). This is the case that was broken.
- 「租房合同这三条…」 — text and a method → **solve**, and it drafted the two solve
fields from the material.
- The model can also decline: `null` falls back to the medium.
Reverting the change fails the new test that feeds an image item whose caption is
an experience and requires `share`.
Full backend suite: 503 passed.
Next slice (not in this PR): separating "what the content is" (open, AI-named)
from "which finite behaviour to run" (the routing key), which is what would let
the taxonomy stop being three values at all — a migration touching the CHECK
constraint and 139 references.
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.
The intent on a digest deliverable came from the input medium:
So a piece of text that tells a story was classified 解决, and an image captioning a process was classified 记录. The creator never sees this happen — they see the consequences: the system asks a solve-flavoured question and watches solve-flavoured signals for a piece that is not one. Same class as the 展示作品被问转折 bug, different root: not too few buckets, but the wrong evidence for the bucket.
What changed
The model already reads the whole material, so it now judges it too:
content_intent(one of the three, or null);Verified against the real model, with a deliberate contrast
null→ falls back to the mediumReverting the change fails the new test (an image item whose caption is an experience must come out
share).Full backend suite: 503 passed.
Not in this PR
The next slice would stop the taxonomy being three values at all: separating what the content is (open, AI-named) from which finite behaviour to run (the routing key). That is a migration — the CHECK constraint, 139 references across 12 files, ADR 0002's NULL semantics, E2E copy — so it wants its own plan rather than being smuggled in here.