From 575558bcf8dfe831c7f72b72de2b6d32b9ac0974 Mon Sep 17 00:00:00 2001 From: Nuvic <78891638+nuvic@users.noreply.github.com> Date: Tue, 2 Apr 2024 01:32:59 -0700 Subject: [PATCH] feat: improve system and final user prompt for agentic workflow (#40) --- lua/codecompanion/actions.lua | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/lua/codecompanion/actions.lua b/lua/codecompanion/actions.lua index 8e25f231..f3a6f892 100644 --- a/lua/codecompanion/actions.lua +++ b/lua/codecompanion/actions.lua @@ -308,7 +308,7 @@ M.static.actions = { :workflow({ { role = "system", - content = "You are an expert coder and helpful assistant who can help outline, draft, consider and revise code for the " + content = "You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so. Always spend a few sentences explaining background context, assumptions, and step-by-step thinking BEFORE you try to answer a question. Don't be verbose in your answers, but do provide details and examples where it might help the explanation. You are an expert software engineer for the " .. context.filetype .. " language.", start = true, @@ -339,12 +339,7 @@ M.static.actions = { }, { role = "user", - content = "Thanks. Now let's revise the code based on the feedback.", - auto_submit = true, - }, - { - role = "user", - content = "For clarity, can you show the final code without any explanations?", + content = "Thanks. Now let's revise the code based on the feedback, without additional explanations.", auto_submit = true, }, }) @@ -362,7 +357,7 @@ M.static.actions = { :workflow({ { role = "system", - content = "You are an expert coder and helpful assistant who can help outline, draft, consider and revise code for the " + content = "You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so. Always spend a few sentences explaining background context, assumptions, and step-by-step thinking BEFORE you try to answer a question. Don't be verbose in your answers, but do provide details and examples where it might help the explanation. You are an expert software engineer for the " .. context.filetype .. " language.", start = true, @@ -393,12 +388,7 @@ M.static.actions = { }, { role = "user", - content = "Thanks. Now let's revise the code based on the feedback.", - auto_submit = true, - }, - { - role = "user", - content = "For clarity, can you show the final code without any explanations?", + content = "Thanks. Now let's revise the code based on the feedback, without additional explanations.", auto_submit = true, }, })