Skip to content

Commit

Permalink
Fix context generation order in chat skill (microsoft#653)
Browse files Browse the repository at this point in the history
### Motivation and Context
The chat function generates the final prompt by populating it with
multiple contexts. Each context is constrained by a token limit except
the last one, which is chat history. The chat function will fill up the
prompt with chat history to reach the token limit.

A bug was discovered that the chat history context was not the last
context.

### Description
Move chat history to the end of the prompt.
  • Loading branch information
TaoChenOSU committed Apr 25, 2023
1 parent 759cd70 commit 06baf18
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public PromptSettings(PromptsConfig promptsConfig)
this.SystemResponsePrompt,
"{{$userIntent}}",
"{{ChatSkill.ExtractUserMemories}}",
"{{ChatSkill.ExtractChatHistory}}",
"{{DocumentMemorySkill.QueryDocuments $INPUT}}",
"{{ChatSkill.ExtractChatHistory}}",
this.SystemChatContinuationPrompt
};

Expand Down

0 comments on commit 06baf18

Please sign in to comment.