fix: Nebenpfade behalten Kontext – Gegenprobe, --von, --resolve, UNDERSTAND_RETRIES=-1
- UNDERSTAND_RETRIES=-1 (A/B-Arm der Verstehensstufe) stürzte seit dem Ablehnungstor ab - Unlösbar-Gegenprobe bekommt Verständnis, Datenprofil und Datendateien; ihre Lösung durchläuft dieselbe Abnahme (_assess_run) - --von pruefung behält Verständnis, Abbildungen und Datenprofil - --resolve überschreibt frühere Befunde nicht mehr (nur Zulässigkeit neu) - --daten wirkt auch mit --resolve und --von - Prüfung und Korrektur sehen das Datenprofil - Reparaturmeldung nennt alle Befundarten zugleich - Test der Balkenhöhe prüft die Höhe tatsächlich; unbenutzte Imports entfernt Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
8bd3c2e7e1
commit
3c4d2fb92c
1 changed files with 182 additions and 59 deletions
|
|
@ -35,7 +35,7 @@ def text_to_model(session: LLMSession, task: str,
|
|||
|
||||
def revise_model(
|
||||
session: LLMSession, task: str, spec: OptimizationModelSpecification, review: AssumptionReview,
|
||||
issues: List[CheckIssue] = (),
|
||||
issues: List[CheckIssue] = (), data_prompt: str = "",
|
||||
) -> OptimizationModelSpecification:
|
||||
errors = [i for i in issues if i.severity == CheckSeverity.ERROR]
|
||||
check_text = "\n".join(f"- [{i.code}] {i.message}" for i in errors) or "keine"
|
||||
|
|
@ -43,6 +43,7 @@ def revise_model(
|
|||
# sollen sie mit behoben werden – sonst erreicht z. B. unerklärter Fachjargon das LLM nie.
|
||||
hinweise = [i for i in issues if i.severity == CheckSeverity.WARNING]
|
||||
hinweis_text = "\n".join(f"- [{i.code}] {i.message}" for i in hinweise) or "keine"
|
||||
aufgabe = f"{task}\n\n{data_prompt}" if data_prompt else task # Datenprofil wie bei der Extraktion
|
||||
return session.create(
|
||||
OptimizationModelSpecification,
|
||||
[
|
||||
|
|
@ -50,7 +51,7 @@ def revise_model(
|
|||
{
|
||||
"role": "user",
|
||||
"content": (
|
||||
f"AUFGABENTEXT:\n{task}\n\n"
|
||||
f"AUFGABENTEXT:\n{aufgabe}\n\n"
|
||||
f"BISHERIGE MODELLSPEZIFIKATION:\n{spec.model_dump_json(indent=2)}\n\n"
|
||||
f"PRÜFBERICHT:\n{review.model_dump_json(indent=2)}\n\n"
|
||||
f"FEHLER DER AUTOMATISCHEN KONSISTENZPRÜFUNG:\n{check_text}\n\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue