forked from FlowiseAI/Flowise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request FlowiseAI#580 from FlowiseAI/feature/Conversationa…
…lQAChain-Prompt Bugfix/SystemMessage For Different Chain Type
- Loading branch information
Showing
2 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/components/nodes/chains/ConversationalRetrievalQAChain/prompts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export 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:` | ||
|
||
export const qa_template = `Use the following pieces of context to answer the question at the end. | ||
{context} | ||
Question: {question} | ||
Helpful Answer:` | ||
|
||
export const default_map_reduce_template = `Given the following extracted parts of a long document and a question, create a final answer. | ||
If you don't know the answer, just say that you don't know. Don't try to make up an answer. | ||
{summaries} | ||
Question: {question} | ||
Helpful Answer:` | ||
|
||
export const map_reduce_template = `Given the following extracted parts of a long document and a question, create a final answer. | ||
{summaries} | ||
Question: {question} | ||
Helpful Answer:` | ||
|
||
export const CUSTOM_QUESTION_GENERATOR_CHAIN_PROMPT = `Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language. include it in the standalone question. | ||
Chat History: | ||
{chat_history} | ||
Follow Up Input: {question} | ||
Standalone question:` |