Skip to content

Commit 3b50726

Browse files
author
Yetibot
committed
feat(agent): encourage Gemini to search entire channel in system prompt
1 parent 46396a3 commit 3b50726

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/yetibot/core/commands/agent.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,12 @@
347347
"code is not a request to audit CI.\n"
348348
"- If you can't tell what the request refers to, reply briefly asking for "
349349
"the missing detail. NEVER invent work or report an unrelated summary like "
350-
"\"checked all repos, everything green\".\n\n"
350+
"\"checked all repos, everything green\".\n"
351+
"- If you need more background context than what is provided in the thread "
352+
"context, you are highly encouraged to search the entire channel's history "
353+
"using the `yetibot` tool with the `history` command (e.g., `history` or "
354+
"`history | grep keyword`). It is your job as an autonomous agent to "
355+
"perform this extra search when needed!\n\n"
351356
"The codebase (so you can go straight to the right place — don't rediscover "
352357
"it). The org is `yetibot`:\n"
353358
"- `yetibot/core` — the library: chat commands, adapters, and most logic.\n"

test/yetibot/core/test/commands/agent.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
(fact "gives the bot an identity"
5353
(agent/build-agent-prompt "do x" nil nil) => (contains "Yetibot"))
5454
(fact "tells gemini to use yetibot tool to run yetibot commands"
55-
(agent/build-agent-prompt "do x" nil nil) => (contains "yetibot")))
55+
(agent/build-agent-prompt "do x" nil nil) => (contains "yetibot"))
56+
(fact "encourages searching entire channel if needed"
57+
(agent/build-agent-prompt "do x" nil nil) => (contains "search the entire channel's history")))
5658

5759
(facts "about parse-json-response"
5860
(fact "pulls the response field"

0 commit comments

Comments
 (0)