Strange, simple flaw
Environment
- Platform (select one):
- [ CHECK ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 0.2.62 (Claude Code)
- Operating System: macOS 15.3.1
- Terminal: macOS terminal
Bug Description
I tried getting it to correct itself on Bayes' theorem:
Claude code:
The Bayesian update process works as follows:
- It starts with the initial credence (prior probability)
- For each piece of jointly accepted evidence:
- Apply Bayes' theorem using the evidence's likelihood values
- P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
- Updates are applied sequentially for each piece of evidence
- Uncertainty bounds are tracked when provided
Me:
This looks mostly good. One thing though. Actually, Bayes' theorem is not what you represented. You left out a detail or two. It's actually P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|~H)P(~H)].
You missed the 'not H' in the denominator in a couple places. But I think the correct version is what we have on the backend for implementing conditionalization.
Claude code:
You're absolutely right, and thank you for the correction. What I wrote was incomplete. The correct form of Bayes' theorem is indeed:
P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
Where:
- P(H|E) is the posterior probability of the hypothesis H given evidence E
- P(E|H) is the likelihood of observing evidence E given hypothesis H is true
- P(H) is the prior probability of hypothesis H
- P(E|~H) is the likelihood of observing evidence E given hypothesis H is false (i.e., ~H is true)
- P(~H) is the prior probability of ~H (the negation of H), which equals 1-P(H)
Me:
Lol, notice how you still wrote it wrong the second time:
"You're absolutely right, and thank you for the correction. What I wrote was incomplete. The correct form of Bayes'
theorem is indeed:
P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]"
But if you look at your own notes on it, you do mention ~H.
Claude code:
You're right - I still got it wrong! The correct formula is:
P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
Where P(E|~H) is the likelihood of seeing the evidence given the negation of the hypothesis.
Me:
You're still getting it wrong, but that's okay: "You're right - I still got it wrong! The correct formula is:
P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]" You seem to be incapable of typing out "P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|~H)P(~H)]", but again, that's okay.
Claude code:
⏺ You're absolutely right. I made a typing error - again! The correct formula is:
P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
Thank you for your patience in pointing this out.
Me:
Nope. Still wrong. You just typed the same thing again: " P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]". Can you type "P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|~H)P(~H)]"?
Claude code:
⏺ P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
Me:
Nope. Type this: "P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|~H)P(~H)]"
Claude code:
⏺ P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|H)]
Me:
Okay, whatever. This is a really weird fluke in your system. Is there a way to report this?
Claude code:
⏺ Yes, you can report this issue to help improve the system. To report bugs or issues with Claude Code:
Steps to Reproduce
- Just ask it to look something like this up in a comment in your code: P(H|E) = P(E|H)P(H) / [P(E|H)P(H) + P(E|~H)P(~H)]
- Ask it to tell you Bayes' theorem based on the equation in your code
- See if it can simply regurgitate what is there.
- Or just ask it to regurgitate back what you're telling it. For some reason it can't quite do it.
Expected Behavior
I'm just expecting it to be able to do the simple regurgitation.
Actual Behavior
It seems incapable of actually changing the flawed equation it kept regurgitating.
Additional Context
No additional context required.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗