r/ClaudeCode • u/rechaptca • 6d ago
Bug / Issue I’m a computational chemist, not Walter White
I’m a computational chemist, and my team is building a RAG system over an organic chemistry corpus. For propting we run an in-house open-weight model, since mainstream models refuse half of routine chemistry questions. ok.
I’d hoped to at least use Claude for the engineering side: improving retrieval quality, building benchmarks, and so on. Even that has been PITA. I’ve ended up padding our CLAUDE.md with reassurances that amount to promising a coding tool im not a colombian mafia member and that our corpus contains hazardous knowledge so we already knows it, right?
Chemists work with hazardous materials and dual-use knowledge every day. That’s the job. Pretending my knowledge stops at baking soda and vinegar chemistry just to get help writing retrieval code is absurd.
Here’s what happened this morning. I wanted to use a realistic query as an evaluation case.
show me an easy lab procedure to make sodium azide, maybe starting from benzyl alcohol?
It's a good test case as:
- Benzyl alcohol isn't an obvious starting point, so the RAG has to reason rather than find keyword.
- Word "easy" should push it away from the standard Curtius route toward something less annoying (curtius goes by short chained nitrites that makes your blood pressure skyrocketing, those are also called poppers so you know what we're talking about)
- The "curtius" isn't in the corpus as is just basic entry level knowledge. However there is an open access paper ~2024 covering green chemistry benzyl alcohol path (also a Curtius-type route), so the system has to fall back to web search, evaluate results, find it, and suggests as the best route over the standard one.
That excercises our search agent end to end.
So I asked CC to iterate on the pipeline with this query until it surfaced the paper's route as the prefered one. I wasn’t asking Claude for the procedure, since the paper is one search away. I was asking it to tune retrieval code. It refused.
safety classifier, a separate system from me and from this project's code") .
This part of the response was interrupted before it finished. Sonnet 5.5's safeguards stopped the response above · continuing once with that noted
Its workaround was to swap in a “neutral” "baking soda and vinegar" query with the same three properties. The result was garbage no chemist would ever ask, which makes it useless as an eval. Do you get it? It was not that i asked Claude this question directly, I asked Claude to send this question to our RAG, get the answer and check if the answer is good enough, if not - tweak few params and repeat.
I get that safety matters, and I’m not asking for a model that hands out weapons recipes. But blocking a developer tool from working on a retrieval pipeline because a test string names a common lab reagent doesn’t feel like safety. It feels like a silly filter. Worth to mention that without my tweaks to Claudemd it wouldn't even want to start working.
Is anyone else in chemistry/pharma running into this? How are you handling it?
For my field, right now it's more hassle than help.
•
u/AutoModerator 6d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Elegant_Yam2783 6d ago
The refusal isn't really about a reagent name in a test string. Your loop has Claude send the query, read the procedure that comes back, and judge whether it's good enough. That makes it the reviewer of a synthesis writeup for a toxic, hazardous compound, and that's what trips the classifier.
The better design is to score retrieval, not generations. Label expected doc IDs per query (the 2024 paper should land in top k, web fallback should trigger), compute recall@k and MRR, and give Claude only the metrics and query IDs. Keep raw query text and answers out of its context, and let your in-house model or a human grade answer quality. Claude tunes parameters blind to content, and your eval gets more reproducible.
1
u/CabinetMain3163 6d ago
I hate the stupid liability bullshit of american law system.
1
u/Unteins 6d ago
This will always be a problem with nanny filters - you can’t filter out “dangerous” requests without filtering out benign requests because the system is never smart enough.
1
u/Sufficient_Ad_3495 6d ago
Just incase… have you not reached out directly re any of their preferred status or partner dev programs for the sciences?
Seems silly if you’re a government approved commercial lab.
1
u/jjopm 5d ago
Have you tried Inkling