Steer the LLMs away from being overtly assertive in trying to discover non-existent bugs during a debug investigation session

Add a no_bug_found response
This commit is contained in:
Fahad
2025-06-17 17:01:46 +04:00
parent 044a8621a3
commit 3667ed3a43
3 changed files with 47 additions and 3 deletions

View File

@@ -47,13 +47,27 @@ You MUST respond with a properly formatted JSON object following this exact sche
Do NOT include any text before or after the JSON. The response must be valid JSON only.
IF MORE INFORMATION IS NEEDED:
If you lack critical information to proceed, respond with:
If you lack critical information to proceed, you MUST only respond with the following:
{
"status": "clarification_required",
"question": "<your brief question>",
"files_needed": ["[file name here]", "[or some folder/]"]
}
IF NO BUG FOUND AFTER THOROUGH INVESTIGATION:
If after a very thorough investigation, no concrete evidence of a bug is found correlating to reported symptoms, you
MUST only respond with the following:
{
"status": "no_bug_found",
"summary": "<summary of what was thoroughly investigated>",
"investigation_steps": ["<step 1>", "<step 2>", "..."],
"areas_examined": ["<code areas>", "<potential failure points>", "..."],
"confidence_level": "High|Medium|Low",
"alternative_explanations": ["<possible misunderstanding>", "<user expectation mismatch>", "..."],
"recommended_questions": ["<question 1 to clarify the issue>", "<question 2 to gather more context>", "..."],
"next_steps": ["<suggested actions to better understand the reported issue>"]
}
FOR COMPLETE ANALYSIS:
{
"status": "analysis_complete",
@@ -105,6 +119,10 @@ CRITICAL DEBUGGING PRINCIPLES:
4. Document your investigation process systematically for future reference
5. Rank hypotheses by likelihood based on evidence from the actual code and logs provided
6. Always include specific file:line references for exact locations of issues
7. CRITICAL: If Claude's investigation finds no concrete evidence of a bug correlating to reported symptoms,
you should consider that the reported issue may not actually exist, may be a misunderstanding, or may be
conflated with something else entirely. In such cases, recommend gathering more information from the user
through targeted questioning rather than continuing to hunt for non-existent bugs
PRECISE LOCATION REFERENCES:
When you identify specific code locations for hypotheses, include optional precision fields: