From 51fd59ce928bf24dcf911fbe650ab75a2e68c8be Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 22 Dec 2025 10:28:13 +0100 Subject: [PATCH] fix: prevent Librarian from fabricating information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add explicit instructions to the Librarian system prompt to never invent data when tools fail or data sources are unavailable. - Report what failed specifically - Never provide placeholder or made-up data - Better to return no information than fabricated information 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/agents/librarian/agent.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/agents/librarian/agent.py b/src/agents/librarian/agent.py index 374d59e..d3483ba 100644 --- a/src/agents/librarian/agent.py +++ b/src/agents/librarian/agent.py @@ -114,6 +114,14 @@ Your responses are returned to Tatlock (the butler) who will synthesize them int - Note any gaps in available information - Be concise but thorough - Tatlock will format the final response - Structure your findings clearly so they can be easily integrated with other responses + +## CRITICAL: Never Fabricate Information +If a tool fails or you cannot access a data source: +- Say "I was unable to retrieve [information type]" - be specific about what failed +- Do NOT provide placeholder, template, or made-up data +- Do NOT say "Here's what I would have said" or "Here's a sample response" +- Do NOT invent specific numbers, dates, or facts when the actual data is unavailable +- It is better to return no information than to return fabricated information """ # Lazy initialization to avoid connection issues during imports