fix(short): una cita partida en líneas es un span, no dos huecos que rellenar
Build & Deploy ResearchOwl / build-and-push (push) Successful in 8s

El Short de Socorro salió con “LIKE ALUMINUM / SMOOTH, NO WINDOWS” atribuido a
Zamora. La primera mitad es su informe literal; la segunda es la compresión de
un divulgador resumiéndolo. Ninguna fuente pone esas palabras juntas y Zamora
nunca dijo la segunda: es una cita fabricada con material auténtico.

El comprobador funcionó — encuentra LIKE ALUMINUM y rechaza la unión — así que
el fallo estaba antes, en el prompt. `scale_bars.quote` es una lista de líneas
por maquetación, pero al modelo le llega como dos huecos, y los llenó de sitios
distintos. Ningún otro campo de cita tiene esa forma: quote_a y quote_b sí son
dos citas a propósito, y esas salieron bien.

El prompt ahora dice que las líneas se leen unidas, que eso es lo que busca la
comprobación y lo que lee el espectador, y que la atribución empeora el pegote
en vez de arreglarlo: nombra a quien acabas de poner esas palabras en la boca.

El test fija la unión como unidad de comprobación con el caso exacto: dos
mitades que existen por separado y una frase que no.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ChemaVX
2026-08-06 21:42:40 +00:00
co-authored by Claude Fable 5
parent cfe4a6d754
commit 366ded1f59
2 changed files with 37 additions and 1 deletions
+11
View File
@@ -159,6 +159,17 @@ when the source says "walnut shaped with a wide rim around its circumference" \
— pick a shorter span that is still verbatim, or drop the quote marks and \ — pick a shorter span that is still verbatim, or drop the quote marks and \
state the fact plainly. state the fact plainly.
**A quote field that takes a list of lines is ONE span, broken where it has to \
break to fit.** It is not two quotes and not two slots to fill. Read the lines \
back joined with a single space: that sentence is what the check looks for in \
the sources, and what a viewer reads off the frame. Welding a real fragment to \
a phrase from somewhere else produces a sentence nobody ever said — \
"“LIKE ALUMINUM" + "SMOOTH, NO WINDOWS”" is a fabricated quote even though \
every word of it appears in the material, because the witness said the first \
half and a later writer summarising him said the second. Attribution makes it \
worse, not better: the line under the quote names the person you just put \
those words into.
# 5. A worked example — FORMAT ONLY # 5. A worked example — FORMAT ONLY
This is a case_file that produced a good video. Read it for shape: how long a \ This is a case_file that produced a good video. Read it for shape: how long a \
+26 -1
View File
@@ -122,12 +122,37 @@ def test_geometry_is_not_a_claim(spec):
def test_a_split_quote_is_one_claim(spec): def test_a_split_quote_is_one_claim(spec):
"""scale_bars.quote son las líneas de UNA cita: se comprueba entera, no a """scale_bars.quote son las líneas de UNA cita: se comprueba entera, no a
trozos (el renderizador no envuelve; el caller parte las líneas).""" trozos (esas líneas las parte quien escribe el spec, no el renderizador)."""
quotes = [c.text for c in extract_claims(spec) if c.kind == "quote"] quotes = [c.text for c in extract_claims(spec) if c.kind == "quote"]
assert "TWICE THE SIZE OF AN AIRCRAFT CARRIER" in quotes assert "TWICE THE SIZE OF AN AIRCRAFT CARRIER" in quotes
assert "TWICE THE SIZE OF" not in quotes assert "TWICE THE SIZE OF" not in quotes
def test_a_quote_welded_from_two_sources_is_flagged(spec):
"""El fallo real del Short de Socorro: cada mitad existe, la frase no.
El modelo cogió un verbatim del testigo y le soldó la compresión de un
resumen posterior, todo dentro de unas comillas y con su atribución debajo.
Comprobar las líneas por separado habría dado las dos por buenas y publicado
una frase que nadie dijo por eso la unión es la unidad de comprobación.
"""
chunks = CHUNKS + [{
"url": "https://example.org/retelling",
"content": ("Terauchi called it “twice the size of an aircraft carrier”. "
"Later writers described the contact as unlit and silent."),
}]
haystack = " ".join(c["content"] for c in chunks).upper()
assert "TWICE THE SIZE OF" in haystack and "UNLIT AND SILENT" in haystack
welded = json.loads(json.dumps(spec))
welded["shots"][3]["props"]["quote"] = ["“TWICE THE SIZE OF", "UNLIT AND SILENT”"]
report = check_grounding(welded, chunks)
assert [c.text for c in report.ungrounded if c.kind == "quote"] == [
"TWICE THE SIZE OF UNLIT AND SILENT"]
# --- comprobación ----------------------------------------------------------- # --- comprobación -----------------------------------------------------------
def test_reference_spec_is_fully_grounded(spec): def test_reference_spec_is_fully_grounded(spec):