Skip to content

Fix RCA agent confabulation via prompt restructuring - #550

Merged
OlivierTrudeau merged 2 commits into
mainfrom
fix/rca-confabulation-prompts
Jun 30, 2026
Merged

Fix RCA agent confabulation via prompt restructuring#550
OlivierTrudeau merged 2 commits into
mainfrom
fix/rca-confabulation-prompts

Conversation

@damianloch

@damianloch damianloch commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The agent was fabricating root causes because background_source_general.md forced "Identify root cause with evidence" as a mandatory step, overriding the conclusion_gate.md guidance that inconclusive is acceptable. This made the agent construct plausible narratives connecting real events to unconfirmed symptoms.

Changes:

  • background_source_general.md: Step 5 now allows confirmed, likely, or inconclusive outcomes (depth requirement of 15-20 tool calls unchanged)
  • conclusion_gate.md: Add classification task (CONFIRMED/LIKELY/INCONCLUSIVE) that must be resolved before narrative generation, with explicit guard that INCONCLUSIVE requires exhausting investigation first
  • evidence_standard.md: Reinforce that inconclusive is a valid outcome and confidence must match evidence

Summary by CodeRabbit

  • Bug Fixes
    • Improved incident summaries so root-cause statements better reflect the strength of available evidence.
    • Reduced misleading certainty by requiring clearer “confirmed,” “likely,” or “undetermined” wording when findings are incomplete.
    • Added clearer handling for cases where root cause cannot be verified, including reporting ruled-out possibilities and remaining unknowns.
    • Made summaries more consistent when evidence is missing or ambiguous, helping avoid overstatement.

The agent was fabricating root causes because background_source_general.md
forced "Identify root cause with evidence" as a mandatory step, overriding
the conclusion_gate.md guidance that inconclusive is acceptable. This made
the agent construct plausible narratives connecting real events to unconfirmed
symptoms.

Changes:
- background_source_general.md: Step 5 now allows confirmed, likely, or
  inconclusive outcomes (depth requirement of 15-20 tool calls unchanged)
- conclusion_gate.md: Add classification task (CONFIRMED/LIKELY/INCONCLUSIVE)
  that must be resolved before narrative generation, with explicit guard that
  INCONCLUSIVE requires exhausting investigation first
- evidence_standard.md: Reinforce that inconclusive is a valid outcome and
  confidence must match evidence
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@damianloch, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 667901dc-3198-428f-bab9-27dc2937af72

📥 Commits

Reviewing files that changed from the base of the PR and between 40b4f0c and 1ff8c2b.

📒 Files selected for processing (1)
  • server/chat/backend/agent/prompt/rca_sections/conclusion_gate.md

Walkthrough

The PR aligns RCA guidance and summarization prompts around confirmed, likely, and inconclusive conclusions, adds self-check and evidence-handling rules, and updates transcript-fallback wording to match the same certainty and anti-hallucination contract.

Changes

RCA certainty guidance

Layer / File(s) Summary
Guidance rubric and evidence rules
server/chat/backend/agent/skills/rca/background/background_source_general.md, server/chat/backend/agent/prompt/rca_sections/conclusion_gate.md, server/chat/backend/agent/prompt/rca_sections/evidence_standard.md
The RCA workflow instructions now define conclusion classes, require evidence-based self-checks, and tighten wording for unresolved findings and unsupported evidence.
Citation-based root cause wording
server/chat/background/summarization.py
The citation-based summary template now formats root-cause paragraphs differently for CONFIRMED, LIKELY, and INCONCLUSIVE findings, including hedged LIKELY wording and “Root cause undetermined.” for inconclusive cases.
Transcript fallback wording
server/chat/background/summarization.py
The transcript-fallback template applies the same conclusion classes and anti-hallucination rules, including inconclusive and hedged LIKELY wording.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Arvo-AI/aurora#414: Updates the same summarization prompt path around root-cause certainty and “Root cause undetermined.” wording.
  • Arvo-AI/aurora#439: Also changes server/chat/background/summarization.py prompt rules for confirmed vs. likely RCA conclusions and anti-hallucination phrasing.
  • Arvo-AI/aurora#445: Touches the same RCA guidance sections to tighten root-cause certainty and evidence-handling language.

Suggested reviewers

  • OlivierTrudeau

Poem

A rabbit peeks at RCA light,
With confirmed and likely set just right.
No phantom logs shall hop along,
No shaky guess will sound as strong,
"Undetermined" keeps the truth in sight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: restructuring RCA prompts to reduce confabulation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rca-confabulation-prompts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@damianloch
damianloch marked this pull request as ready for review June 26, 2026 19:44
@damianloch
damianloch requested a review from a team as a code owner June 26, 2026 19:44
arvo-ai-staging[bot]
arvo-ai-staging Bot previously approved these changes Jun 26, 2026

@arvo-ai-staging arvo-ai-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aurora Risk Review

Verdict: SAFE

No risks identified. This change looks safe to ship.


Aurora reviews PRs for incident prevention.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@server/chat/background/summarization.py`:
- Line 332: The summary text in summarization should use a plain hyphen instead
of an EN DASH in the “2-3 paragraph” range to match the rest of the file and
satisfy the lint rule. Update the prompt text in the affected summarization
content so the range uses HYPHEN-MINUS consistently, and keep the rest of the
instructions unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bd0c0cc9-ed0e-4951-b438-ad78bbe24225

📥 Commits

Reviewing files that changed from the base of the PR and between 0803c54 and 40b4f0c.

📒 Files selected for processing (4)
  • server/chat/backend/agent/prompt/rca_sections/conclusion_gate.md
  • server/chat/backend/agent/prompt/rca_sections/evidence_standard.md
  • server/chat/backend/agent/skills/rca/background/background_source_general.md
  • server/chat/background/summarization.py

Comment thread server/chat/background/summarization.py
OlivierTrudeau
OlivierTrudeau previously approved these changes Jun 30, 2026
Comment thread server/chat/backend/agent/prompt/rca_sections/conclusion_gate.md Outdated
Comment thread server/chat/background/summarization.py

@arvo-ai-staging arvo-ai-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aurora Risk Review — Latest changes

Verdict: SAFE

No new incident risk in the latest changes.


Aurora reviews PRs for incident prevention.

@sonarqubecloud

Copy link
Copy Markdown

@OlivierTrudeau
OlivierTrudeau merged commit 9f81aac into main Jun 30, 2026
20 checks passed
@OlivierTrudeau
OlivierTrudeau deleted the fix/rca-confabulation-prompts branch June 30, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants