Improved how the AI remembers its earlier tool calls (#1185)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Peer HogeterpandThorsten Sommer authored and GitHub committed 2026-11-12 19:57:28 +01:00
1 parent 0885862150
commit 382db4b8d0
22 files changed
+1323 -24

No files matched your search

@@ -15,8 +15,8 @@ namespace AIStudio.Dialogs;
/// <remarks>
/// Nobody types this prompt as it is sent. A chat template or an assistant whose conversation the chat
/// continues replaces the default, a profile, the
/// retrieved data of a data source, and the policy of the selected tools are added to it, and the
/// date goes in front. Each part stands under its own heading, in the order of the prompt, so a
/// retrieved data of a data source, the policy of the selected tools, and the explanation of the notes
/// in front of earlier answers are added to it, and the date goes in front. Each part stands under its own heading, in the order of the prompt, so a
/// person does not have to work out from the text alone where a paragraph came from.<br/><br/>
///
/// The parts are those ChatThread.BuildSystemPrompt recorded, so the dialog decides nothing about
@@ -112,6 +112,7 @@ public partial class SystemPromptDialog : MSGComponentBase
SystemPromptPartKind.RETRIEVED_DATA => new(T("Data from your data sources"), part.Text, this.NoticeWithRetrievedData),
SystemPromptPartKind.PROFILE => new(string.Format(T("Profile '{0}'"), part.SourceName), part.Text, string.Empty),
SystemPromptPartKind.TOOL_INSTRUCTIONS => new(string.Format(T("Instructions for your tools: {0}"), string.Join(", ", this.ToolNames)), part.Text, T("When the AI reaches the limit of tool calls for one answer, AI Studio adds one more instruction at the end: to answer with what the tools have returned so far.")),
SystemPromptPartKind.HISTORY_NOTES => new(T("Instructions for the notes on earlier answers"), part.Text, T("When an earlier answer in this chat used tools or sources, AI Studio puts a note in front of it which names them. Only the AI receives this note; you do not see it in the chat. These instructions tell the AI what the note means.")),
_ => new(string.Empty, part.Text, string.Empty),
};