From 673cc029bd0c57a921a5d0d88e00b41eb7777cb0 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 18 Jul 2023 01:22:20 +0100 Subject: [PATCH] update conversational retrieval qa chain prompt --- .../ConversationalRetrievalQAChain.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.ts b/packages/components/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.ts index 24b40d481..eeebe1ec3 100644 --- a/packages/components/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.ts +++ b/packages/components/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.ts @@ -7,14 +7,14 @@ import { BaseChatMemory, BufferMemory, ChatMessageHistory } from 'langchain/memo import { PromptTemplate } from 'langchain/prompts' import { ConsoleCallbackHandler, CustomChainHandler } from '../../../src/handler' -const default_qa_template = `Use the following pieces of context to answer the question at the end, in its original language. If you don't know the answer, just say that you don't know in its original language, don't try to make up an answer. +const default_qa_template = `Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. {context} Question: {question} Helpful Answer:` -const qa_template = `Use the following pieces of context to answer the question at the end, in its original language. +const qa_template = `Use the following pieces of context to answer the question at the end. {context}