Repository navigation
fix(media): prompts carry the earlier context they refer to (#185) - #193
Merged
Merged
Conversation
…refer to (#185) Desktop media mode wrapped the user's text as "Generate an image ... from this prompt:", which reads as "pass this through". ImageGen sends exactly the prompt it receives, and its spec never said the image model can't see the chat, so "turn these numbers into an infographic" reached the model with no numbers and it invented its own. - Desktop wrapper now tells the agent the media model sees only the prompt, to write referenced figures/names/text in verbatim, and never to invent data. - ImageGen/VideoGen/MusicGen prompt specs say the same. - Each success result shows "Prompt sent: ..." so the chat shows what the media model was actually given. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Fixes #185.
Image mode wrapped the request as
... from this prompt:, and ImageGen passes itspromptstraight to the image model, which can't see the chat. "Turn these numbers into an infographic" reached the model with no numbers, so it made some up.apps/desktop/src/hooks/use-franklin-chat.ts): tells the agent that the media model sees only the prompt, that it should copy any figures, names or text the request refers to into the prompt verbatim, and that it must never invent data. Applies to image, video and music modes.promptfield of ImageGen, VideoGen and MusicGen now says it must be self-contained.Prompt sent: …, so the chat shows what the media model actually got.Tests: three new local tests (spec wording, a mocked-gateway ImageGen run that checks the prompt arrives unchanged and is echoed back, and the desktop wording).
npm testgives 794 pass; the desktoptsc --noEmitis clean.🤖 Generated with Claude Code