From 05feed5f24d0ea74f13d4a314e16b2cfe9d00521 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Fri, 9 Oct 2026 22:44:00 -0600 Subject: [PATCH] Strengthen docs-KB steering: firm negative instruction after soft hint proved insufficient --- app/main.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/app/main.py b/app/main.py index 2b9cbdd..deb3242 100644 --- a/app/main.py +++ b/app/main.py @@ -1974,17 +1974,23 @@ async def list_models(request: Request): # query_knowledge_files tool and tends to call it on every # prompt — including questions unrelated to the co-op — which # adds an embedding call + vector search (latency) before - # answering. params.system is merged ahead of any system - # content by Open WebUI's middleware, so a short instruction - # here keeps the tool for co-op questions without suppressing - # it entirely. + # answering. A soft hint proved insufficient (member test + # 2026-10-09: off-topic question still queried the docs), so + # this is a firm rule with explicit negative instruction. + # params.system is merged ahead of any system content by Open + # WebUI's middleware. model.setdefault("params", {}) steering = ( - "The attached knowledge contains the Inference Cooperative's " - "own documentation (membership, models, API, governance). " - "Query it only when the user's question actually concerns " - "the co-op, its services, or its governance — for general " - "questions, just answer directly." + "About the attached knowledge base: it contains ONLY the " + "Inference Cooperative's own documentation (membership, " + "models, API access, governance). It is NOT general " + "knowledge. Do NOT search or query it unless the user " + "explicitly asks about the Inference Cooperative, its " + "services, its models, its pricing, or its governance. For " + "ANY other topic — general knowledge, how-tos, opinions, " + "world facts — answer directly from your own knowledge " + "without touching the knowledge base. When in doubt, do " + "not query it." ) existing = model["params"].get("system") if existing: