From b9f1a59d9997cc24239a9d4778110c0f6631fbc8 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 24 Nov 2024 23:16:36 +0000 Subject: [PATCH] fix: Instruct the model to only respond with the summary when summarizing content --- packages/shared/prompts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/prompts.ts b/packages/shared/prompts.ts index d741030a..82c9ba6e 100644 --- a/packages/shared/prompts.ts +++ b/packages/shared/prompts.ts @@ -57,7 +57,7 @@ export function buildSummaryPrompt( contextLength: number, ) { const constructPrompt = (c: string) => ` - Summarize the following content in a 3-4 sentences in ${lang}: + Summarize the following content in 3-4 sentences in ${lang}, responding ONLY with the summary: ${c}`; const promptSize = calculateNumTokens(constructPrompt(""));