Strengthen docs-KB steering: firm negative instruction after soft hint proved insufficient

This commit is contained in:
Inferencebot committed 2026-10-09 22:44:00 -06:00
1 parent 2eab2abb0d
commit 05feed5f24
1 file changed
+15 -9
+15 -9
View File
@@ -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: