update
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user