feat: treat disputed extracted values as unverified in constructability and critic prompts
This commit is contained in:
@@ -47,6 +47,7 @@ class ConstructabilityAgent:
|
||||
"assertions": dumps(cluster["assertions"]),
|
||||
"clusters": dumps(slim_clusters([cluster])),
|
||||
"conflicts": dumps(scope.payload.get("conflicts") or []),
|
||||
"disputes": dumps(cluster.get("disputed_attributes") or []),
|
||||
}
|
||||
for key, value in substitutions.items():
|
||||
instruction = instruction.replace("{" + key + "}", value)
|
||||
|
||||
@@ -32,6 +32,16 @@ def _evidence_block(cluster: Dict) -> str:
|
||||
f"{a.get('attribute','')} = {a.get('value','')} | "
|
||||
f"\"{a.get('source_text','')}\""
|
||||
)
|
||||
disputes = cluster.get("disputed_attributes") or []
|
||||
if disputes:
|
||||
lines.append("")
|
||||
for d in disputes:
|
||||
lines.append(
|
||||
"DISPUTED VALUE (possible extraction misread): "
|
||||
f"attribute={d.get('attribute','')} "
|
||||
f"values={' | '.join(d.get('values') or [])} "
|
||||
f"(assertions {', '.join(d.get('assertion_ids') or [])})"
|
||||
)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
||||
+11
-1
@@ -410,6 +410,9 @@ What is NOT a conflict:
|
||||
- Anything not supported with drawing evidence.
|
||||
Be conservative:
|
||||
- Only flag genuine disagreements.
|
||||
- When a value is marked DISPUTED (possible extraction misread), verify it against
|
||||
the sheet images before relying on either reading; if the images do not resolve
|
||||
it, do not assert a conflict from one reading alone.
|
||||
- A clean cluster with no contradiction must return an empty conflicts array.
|
||||
- missing_element requires evidence that another discipline would reasonably be expected to show the missing item.
|
||||
For each conflict:
|
||||
@@ -545,6 +548,12 @@ Flag:
|
||||
Rules:
|
||||
- Only flag issues supported by drawing evidence.
|
||||
- Be specific about the location and why it is a constructability risk.
|
||||
- Assertions are machine-extracted from sheet images and may contain misread values,
|
||||
especially quantities and member sizes (e.g. "(2) 2x6" vs "(5) 2x6").
|
||||
- When the cluster lists disputed_attributes, or two evidence items disagree on a
|
||||
numeric value, do NOT assert a buildability conclusion from one reading. Report the
|
||||
ambiguity itself (category "detail_gap", confidence "low") and state that the value
|
||||
needs verification against the sheet.
|
||||
- Use plain ASCII only.
|
||||
Respond only with valid JSON."""
|
||||
|
||||
@@ -554,7 +563,8 @@ Respond ONLY with a valid JSON object - no markdown fences, no explanation:
|
||||
If no constructability issues are found, return: { "issues": [] }
|
||||
Extracted assertions: {assertions}
|
||||
Clusters: {clusters}
|
||||
Cross-discipline conflicts already found: {conflicts}"""
|
||||
Cross-discipline conflicts already found: {conflicts}
|
||||
Disputed extracted values in this cluster (possible vision misreads - treat as unverified): {disputes}"""
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user