From 538b69cf0088eee95079c35984d24b37349608ac Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Sat, 30 May 2026 14:25:02 +0400 Subject: [PATCH] Revert "RAG: silence external prefetch model when chunks off-topic" This reverts commit 1eab0783116e0781fb29729600836b16ef10a092. --- studio/frontend/src/features/chat/api/chat-adapter.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.ts index 9a3bf067b5..e4fad142f8 100644 --- a/studio/frontend/src/features/chat/api/chat-adapter.ts +++ b/studio/frontend/src/features/chat/api/chat-adapter.ts @@ -1809,12 +1809,8 @@ export function createOpenAIStreamAdapter(): ChatModelAdapter { const chunkXml = formatRagChunksXml(result.hits); const injected = "Use the document excerpts below to answer the question, and " + - "cite each excerpt you use as `[N]` using its `id`. " + - "If they are not relevant to the question, IGNORE them " + - "silently and answer normally — do NOT mention the " + - "excerpts, do NOT say they are irrelevant, do NOT refer to " + - "any search or retrieval. Just answer the question " + - "directly as if no excerpts were provided.\n\n" + + "cite each excerpt you use as `[N]` using its `id`. If they " + + "are not relevant, answer normally.\n\n" + chunkXml; // Send-only mutation: the displayed user bubble comes from the // runtime message store, not outboundMessages, so the injected