feat: baseline experts + --baseline A/B mode (raw LLM)

Per Emili 2026-10-16: the draft experts are baseline experts - the LLM answers each subquestion directly from its own knowledge (no verification yet; engines replace the baseline path per expert later). ExpertSignature no longer forbids weights-based answers; source_quote now means verbatim from GIVEN evidence, empty when answering from weights. Evidence rows record source: model_weights | given_evidence. --baseline mode: the same LM answers the whole question in ONE raw call - the A/B control against the loop's many small directed calls. Also: pyproject fixed (name floop, hatchling backend, package floop/) - uv_build expected src/ layout; runner docs now uv-first; uv.lock regenerated.
This commit is contained in:
2026-10-16 16:51:25 +02:00
parent b627c34967
commit aecaac01eb
7 changed files with 102 additions and 40 deletions
+13 -1
View File
@@ -37,5 +37,17 @@ def configure_lm() -> dict:
"api_key": os.environ.get(p.get("api_key_env", ""), "empty"),
}
lm = dspy.LM(**kwargs)
global _ACTIVE
_ACTIVE = lm
dspy.configure(lm=lm)
return {"provider": provider, "model": p["model"], "base_url": p["base_url"]}
return {"provider": provider, "model": p["model"], "base_url": p["base_url"]}
_ACTIVE: "dspy.LM | None" = None
def active_lm() -> "dspy.LM":
"""The configured dspy.LM, configuring it lazily if needed (baseline mode uses it raw)."""
if _ACTIVE is None:
configure_lm()
return _ACTIVE