AndresCarreon commited on
Commit
db1aa38
·
verified ·
1 Parent(s): 40f373b

disable flaky LLM judge layer (default-denied every clean wish on llama.cpp); wordlist layers 1-2 remain the gate

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -153,9 +153,15 @@ def _default_wiring(traces_dir: Path) -> dict[str, Any]:
153
  backend = make_backend("mock")
154
  backend_name = "mock"
155
  planner = Planner(backend)
156
- # Layer 3 (LLM yes/no judgment) runs through the same backend; layers 1-2 are
157
- # the sync precheck the POST handler uses as its fast path.
158
- moderator = Moderator(judge=lambda text: judge_fn(text, backend))
 
 
 
 
 
 
159
 
160
  def fast_check(text: str) -> Optional[str]:
161
  verdict = moderator.precheck(text)
 
153
  backend = make_backend("mock")
154
  backend_name = "mock"
155
  planner = Planner(backend)
156
+ # Moderation layers 1-2 (charset/length + a thorough wordlist with
157
+ # confusable/leetspeak/skeleton folding) are the reliable gate and run on
158
+ # EVERY wish. Layer 3 (an LLM yes/no judge through the same model) is opt-in:
159
+ # on llama.cpp its grammar-constrained verdict often fails to parse and then
160
+ # DEFAULT-DENIES every clean wish (June 12: "found a town" rejected as
161
+ # 'uncertain'). Off by default; GODSEED_JUDGE=on re-enables it.
162
+ use_judge = os.environ.get("GODSEED_JUDGE", "").strip().lower() in ("1", "on", "true")
163
+ judge = (lambda text: judge_fn(text, backend)) if use_judge else None
164
+ moderator = Moderator(judge=judge)
165
 
166
  def fast_check(text: str) -> Optional[str]:
167
  verdict = moderator.precheck(text)