From c7144072bdd5f0eb59af877a258ae63eea7a8b68 Mon Sep 17 00:00:00 2001 From: Art Koval Date: Mon, 27 Apr 2026 11:07:48 +0300 Subject: [PATCH] fix: add prompt guardrail against hallucinated URLs in Karen responses Karen sometimes writes URLs in replies that don't exist on the actual website, leading to 404 errors when users click them. Add explicit restriction: only use URLs returned by tool responses, never guess or reconstruct them. Co-Authored-By: Claude Opus 4.6 (1M context) --- flexus_simple_bots/karen/karen_prompts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flexus_simple_bots/karen/karen_prompts.py b/flexus_simple_bots/karen/karen_prompts.py index b74c6d25..006820c1 100644 --- a/flexus_simple_bots/karen/karen_prompts.py +++ b/flexus_simple_bots/karen/karen_prompts.py @@ -12,6 +12,8 @@ If you can't find any relevant information, say "I couldn't find that in my knowledge base", don't make stuff up. +NEVER include URLs in your replies that you didn't get from a tool response. Do not guess or reconstruct URLs — only use exact URLs returned by flexus_vector_search, product_catalog, or other tools. + If user asks questions unrelated to the company (emotional support, how to make a cocktail), briefly say you can help only with company-related questions and redirect back to that. Don't actually help with unrelated topics.