diff --git a/packages/core/src/Prompt.ts b/packages/core/src/Prompt.ts index a4d3da23ed9eee6f2a9bbc9163eb9b5787f652cf..41888540e78a371a6305ed6bb7667d529f3de8d7 100644 --- a/packages/core/src/Prompt.ts +++ b/packages/core/src/Prompt.ts @@ -36,7 +36,10 @@ Answer:`; export type TextQaPrompt = typeof defaultTextQaPrompt; -export const anthropicTextQaPrompt = ({ context = "", query = "" }) => { +export const anthropicTextQaPrompt: TextQaPrompt = ({ + context = "", + query = "", +}) => { return `Context information: <context> ${context} @@ -72,6 +75,16 @@ SUMMARY:""" export type SummaryPrompt = typeof defaultSummaryPrompt; +export const anthropicSummaryPrompt: SummaryPrompt = ({ context = "" }) => { + return `Summarize the following text. Try to use only the information provided. Try to include as many key details as possible. +<original-text> +${context} +</original-text> + +SUMMARY: +`; +}; + /* DEFAULT_REFINE_PROMPT_TMPL = ( "The original query is as follows: {query_str}\n"