From 5572ea0eec72852d842d11ee012c847c4fb79230 Mon Sep 17 00:00:00 2001 From: Jessie Young <jessieyoung@gitlab.com> Date: Fri, 29 Mar 2024 16:50:47 -0700 Subject: [PATCH] Duo Chat: Use "Action Input" not "ActionInput" in example * I observed that Claude 2 still returns "Action Input" most of the time because that is what we tell it to return in the system prompt. But when I started working on Claude 3, I noticed that it was following this example and returning "ActionInput" instead. This broke our chain of thoguht parsing, which has a regex that matches on "Action Input" (with a space) * This text without a space was added here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/146634 * MR where Claude 3 work is happening: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148223 --- ee/lib/gitlab/llm/chain/tools/ci_editor_assistant/executor.rb | 2 +- ee/lib/gitlab/llm/chain/tools/epic_reader/executor.rb | 2 +- ee/lib/gitlab/llm/chain/tools/gitlab_documentation/executor.rb | 2 +- ee/lib/gitlab/llm/chain/tools/issue_reader/executor.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ee/lib/gitlab/llm/chain/tools/ci_editor_assistant/executor.rb b/ee/lib/gitlab/llm/chain/tools/ci_editor_assistant/executor.rb index bcca00679f703..45c32353c3df6 100644 --- a/ee/lib/gitlab/llm/chain/tools/ci_editor_assistant/executor.rb +++ b/ee/lib/gitlab/llm/chain/tools/ci_editor_assistant/executor.rb @@ -23,7 +23,7 @@ class Executor < Tool Thought: You have asked a question related to deployment of an application or CI/CD pipelines. "CiEditorAssistant" tool can assist with this kind of questions. Action: CiEditorAssistant - ActionInput: Please create a deployment configuration for a node.js application. + Action Input: Please create a deployment configuration for a node.js application. PROMPT PROVIDER_PROMPT_CLASSES = { diff --git a/ee/lib/gitlab/llm/chain/tools/epic_reader/executor.rb b/ee/lib/gitlab/llm/chain/tools/epic_reader/executor.rb index 06c9d94e5f7c9..252e95a48e55f 100644 --- a/ee/lib/gitlab/llm/chain/tools/epic_reader/executor.rb +++ b/ee/lib/gitlab/llm/chain/tools/epic_reader/executor.rb @@ -23,7 +23,7 @@ class Executor < EpicIdentifier::Executor The question is about an epic, so you need to use "EpicReader" tool. Based on this information you can present final answer. Action: EpicReader - ActionInput: Please identify the author of &123 epic. + Action Input: Please identify the author of &123 epic. PROMPT PROVIDER_PROMPT_CLASSES = { diff --git a/ee/lib/gitlab/llm/chain/tools/gitlab_documentation/executor.rb b/ee/lib/gitlab/llm/chain/tools/gitlab_documentation/executor.rb index b3bdd666582e9..07e40cee31f34 100644 --- a/ee/lib/gitlab/llm/chain/tools/gitlab_documentation/executor.rb +++ b/ee/lib/gitlab/llm/chain/tools/gitlab_documentation/executor.rb @@ -22,7 +22,7 @@ class Executor < Tool Thought: Question is about inner working of GitLab. "GitlabDocumentation" tool is the right one for the job. Action: GitlabDocumentation - ActionInput: How do I set up a new project? + Action Input: How do I set up a new project? PROMPT def perform(&_block) diff --git a/ee/lib/gitlab/llm/chain/tools/issue_reader/executor.rb b/ee/lib/gitlab/llm/chain/tools/issue_reader/executor.rb index 97da793076fab..550416aa45f36 100644 --- a/ee/lib/gitlab/llm/chain/tools/issue_reader/executor.rb +++ b/ee/lib/gitlab/llm/chain/tools/issue_reader/executor.rb @@ -24,7 +24,7 @@ class Executor < IssueIdentifier::Executor Question is about the content of an issue, so you need to use "IssueReader" tool to retrieve and read issue. Based on this information you can present final answer about issue. Action: IssueReader - ActionInput: Please identify the author of #123 issue + Action Input: Please identify the author of #123 issue PROMPT PROVIDER_PROMPT_CLASSES = { -- GitLab