diff --git a/backend/config.py b/backend/config.py index 94357e0..4921fb9 100644 --- a/backend/config.py +++ b/backend/config.py @@ -150,7 +150,7 @@ EVIDENCE_CTX_LINES = 15 # context lines around a cited source position # Registry mit Suchraum: backend/train_params.py). QA-/Detektor-Konstanten bleiben bewusst in # qa.py/guide_qa.py — die Messlatte darf nie Teil des Suchraums sein. ───────────────────────── SUBBLOCK_MAX = 40 # chunk cap -RESEARCH_BATCH = 20 # crawl pages per batch +RESEARCH_BATCH = 1 # eine Seite pro Reader — er kann nichts übersehen (Vollständigkeit) RESEARCH_READERS = 2 # reader agents per batch/section (consensus ≥2) RESEARCH_THEMA_AGENTS = 5 # web mode (source "thema") RESEARCH_SECTION_CHARS = 12000 # uni/projekt section size (lost-in-the-middle guard) diff --git a/backend/qa.py b/backend/qa.py index 2d05010..fdf9ca4 100644 --- a/backend/qa.py +++ b/backend/qa.py @@ -97,9 +97,15 @@ def _corpus_texts(topic: str) -> dict[str, str]: out = {} for f in sorted(folder.glob("*.txt")): try: - out[f.name] = f.read_text(encoding="utf-8") + text = f.read_text(encoding="utf-8") except OSError: continue + # QUELLE:-Header (Metadata, kein Lerninhalt) strippen — sonst bildet er bei großen + # Seiten einen isolierten, block-losen Abschnitt = False-Positive-Lücke. + lines = text.splitlines() + if lines and lines[0].startswith("QUELLE:"): + text = "\n".join(lines[1:]).lstrip("\n") + out[f.name] = text return out diff --git a/frontend/src/components/BlockFocus.vue b/frontend/src/components/BlockFocus.vue index 6d4d297..63dc087 100644 --- a/frontend/src/components/BlockFocus.vue +++ b/frontend/src/components/BlockFocus.vue @@ -200,8 +200,6 @@ watch(() => `${props.block.title}|${props.block.md}|${props.block.compact || ''}