fix(short): el divisor del prompt iba redondeado y no reproducía su propia cuenta

12 ÷ 2.8 no da 5.1, da 5.0. La cuenta trabajada la hace el modelo con el número
que ve, así que el número que ve tiene que ser el real.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
ChemaVX
2026-08-13 20:41:02 +00:00
co-authored by Claude Opus 5
parent 8000ef2145
commit 02e553fffa
2 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -183,11 +183,11 @@ competing with words already on the frame. Chosen silence is an edit; a spec \
with one narrated shot out of eight is not a Short with a voice, it is a Short \ with one narrated shot out of eight is not a Short with a voice, it is a Short \
that forgot to speak. that forgot to speak.
- **Give every narrated shot enough time for its own line, and work it out \ - **Give every narrated shot enough time for its own line, and work it out \
rather than guessing.** The voice reads about {words_per_second:.1f} words a \ rather than guessing.** The voice reads about {words_per_second:g} words a \
second and pauses a quarter second at every full stop, so **count the words AND \ second and pauses a quarter second at every full stop, so **count the words AND \
count the sentences**: count the sentences**:
duration ≥ words ÷ {words_per_second:.1f} + {sentence_pause} × sentences + \ duration ≥ words ÷ {words_per_second:g} + {sentence_pause} × sentences + \
{rounded_pad} {rounded_pad}
The second term is the one that catches people out. "Witness identities. \ The second term is the one that catches people out. "Witness identities. \
@@ -196,9 +196,9 @@ not a fast line, it is three quarters of a second of silence on top. Two lines \
of the same length do not take the same time if one of them is chopped. of the same length do not take the same time if one of them is chopped.
Worked, on the example below: shot 1 speaks twelve words in one sentence, so \ Worked, on the example below: shot 1 speaks twelve words in one sentence, so \
12 ÷ {words_per_second:.1f} + {sentence_pause} + {rounded_pad} = 5.1, and it \ 12 ÷ {words_per_second:g} + {sentence_pause} + {rounded_pad} = 5.1, and it \
declares 5.5. Shot 4 speaks thirteen words in two sentences, so 13 ÷ \ declares 5.5. Shot 4 speaks thirteen words in two sentences, so 13 ÷ \
{words_per_second:.1f} + 0.5 + {rounded_pad} = 5.7, and it declares 6.0. Round \ {words_per_second:g} + 0.5 + {rounded_pad} = 5.7, and it declares 6.0. Round \
up, never down. up, never down.
This is the one rule that makes your own arithmetic true: a shot runs for the LONGER of \ This is the one rule that makes your own arithmetic true: a shot runs for the LONGER of \
+4 -2
View File
@@ -166,9 +166,11 @@ def test_the_prompt_gives_a_budget_the_model_can_count():
w, _ = writer("{}") w, _ = writer("{}")
prompt = w.build_prompt("Caso X", "material", None, "X.TEST") prompt = w.build_prompt("Caso X", "material", None, "X.TEST")
assert f"{NARRATION_WORDS_PER_SECOND:.1f} words a second" in prompt, \ # La constante exacta, no redondeada: el prompt trae una cuenta trabajada, y
# con "2.8" el divisor mostrado no reproduce el resultado mostrado.
assert f"{NARRATION_WORDS_PER_SECOND:g} words a second" in prompt, \
"sin el ritmo de la voz no hay cuenta que el modelo pueda hacer" "sin el ritmo de la voz no hay cuenta que el modelo pueda hacer"
assert f"words ÷ {NARRATION_WORDS_PER_SECOND:.1f}" in prompt assert f"words ÷ {NARRATION_WORDS_PER_SECOND:g}" in prompt
assert f"{NARRATION_WORD_BUDGET} words" in prompt assert f"{NARRATION_WORD_BUDGET} words" in prompt