Skip to content

Commit f02c446

Browse files
committed
simplify prompt
1 parent b2002e1 commit f02c446

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

bugzooka/analysis/prompts.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,4 @@
6060
"Extract key error terms, component names, or operators from the log summary to search for similar issues. "
6161
"Include the top 3 most relevant JIRA issues in your final response under a 'Related JIRA Issues' section."
6262
),
63-
"user_suffix": (
64-
"\n- Related JIRA issues (search using search_jira_issues tool with OCPBUGS project "
65-
"and include the top 3 most relevant issues)"
66-
),
67-
"assistant_suffix": (
68-
"\n\n**Related JIRA Issues:**\n- <Top 3 relevant issues from JIRA search>"
69-
),
7063
}

bugzooka/integrations/gemini_client.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -179,29 +179,20 @@ async def analyze_log_with_gemini(
179179
if has_jira:
180180
logger.info("Jira MCP tools detected - injecting Jira prompt")
181181
system_prompt = prompt_config["system"] + JIRA_TOOL_PROMPT["system_suffix"]
182-
user_suffix = JIRA_TOOL_PROMPT["user_suffix"]
183-
assistant_suffix = JIRA_TOOL_PROMPT["assistant_suffix"]
184182
else:
185183
system_prompt = prompt_config["system"]
186-
user_suffix = ""
187-
assistant_suffix = ""
188184

189185
try:
190-
formatted_content = (
191-
prompt_config["user"].format(error_summary=error_summary) + user_suffix
186+
formatted_content = prompt_config["user"].format(
187+
error_summary=error_summary
192188
)
193189
except KeyError:
194-
formatted_content = (
195-
prompt_config["user"].format(summary=error_summary) + user_suffix
196-
)
190+
formatted_content = prompt_config["user"].format(summary=error_summary)
197191

198192
messages = [
199193
{"role": "system", "content": system_prompt},
200194
{"role": "user", "content": formatted_content},
201-
{
202-
"role": "assistant",
203-
"content": prompt_config["assistant"] + assistant_suffix,
204-
},
195+
{"role": "assistant", "content": prompt_config["assistant"]},
205196
]
206197

207198
# Convert LangChain tools to OpenAI format if provided

0 commit comments

Comments
 (0)