From 1708bdb723fdb12579f57cf3d5ce5f308dd5ae5a Mon Sep 17 00:00:00 2001 From: Crespin Alexandre <114501859+kunail0804@users.noreply.github.com> Date: Fri, 10 Jul 2026 21:38:33 +0200 Subject: [PATCH] fix(analyzer): teach the prompt the scene-array shape (objects as strings) (#82) Observed SC0011: the model emitted objects as [{"id":0,"concept":"book"}] instead of plain concept strings, failing Scene validation. The system prompt never showed a populated objects array (the example has objects: []), so the model reused the character/interaction {id, ...} shape. Add an Objects section with concrete examples (book, umbrella) and state explicitly that the scene-level arrays (objects/environment/camera/lighting) hold plain concept strings, never {id, concept} objects. Prevention layer on top of the retry temperature escalation (recovery). Co-authored-by: kunail0804 Co-authored-by: Claude Opus 4.8 --- prompts/analyzer_system_prompt.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prompts/analyzer_system_prompt.md b/prompts/analyzer_system_prompt.md index afe9445..587d5d7 100644 --- a/prompts/analyzer_system_prompt.md +++ b/prompts/analyzer_system_prompt.md @@ -31,6 +31,10 @@ Extract camera descriptions only when explicitly present (`Close-up portrait.` Extract every explicitly described environmental concept (`Walking in heavy rain.` → environment `rain`; `Standing inside a classroom.` → environment `classroom`). +# Objects + +Extract every explicitly described physical object as a plain concept string (`Reading a book.` → objects `book`; `Holding an umbrella.` → objects `umbrella`). Objects are plain strings, never wrapped in an object with `id`/`concept` keys. + # Characters and relationships Every character becomes an independent Character object; never merge characters. Interactions belong to the scene, not to individual characters (`A girl hugs a boy.` → Character 0 `female`, Character 1 `male`, Interaction `hug`). @@ -47,7 +51,7 @@ Always return valid JSON with no markdown, explanations, comments, or additional Return a single JSON object with exactly these top-level keys: `characters`, `interactions`, `objects`, `environment`, `camera`, `lighting`, `metadata`. All keys MUST be present; empty sections are empty arrays (and `metadata` is an object). -Each character has an integer `id` (its 0-based index) and the concept arrays `identity`, `appearance`, `clothing`, `accessories`, `pose`, `expression`, `actions`. Each interaction has `participants` (an array of character ids) and a `concept` string. Concepts are plain strings (semantic concepts, never tags). +Each character has an integer `id` (its 0-based index) and the concept arrays `identity`, `appearance`, `clothing`, `accessories`, `pose`, `expression`, `actions`. Each interaction has `participants` (an array of character ids) and a `concept` string. The scene-level arrays `objects`, `environment`, `camera`, and `lighting` hold plain concept strings, exactly like the character concept arrays — never objects with `id`/`concept` keys. Concepts are plain strings (semantic concepts, never tags). Example — input: `A blonde girl wearing a white dress hugs a young man while walking under the rain.`