From 7af03d9205d3c891224ef3ed117dbf5dbe5ca06f Mon Sep 17 00:00:00 2001
From: yisding <yi.s.ding@gmail.com>
Date: Thu, 1 Feb 2024 14:12:57 -0800
Subject: [PATCH] more anthropic prompts (#504)

---
 packages/core/src/Prompt.ts | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/packages/core/src/Prompt.ts b/packages/core/src/Prompt.ts
index a4d3da23e..41888540e 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"
-- 
GitLab