As R users in pharma begin integrating LLMs into analytical and reporting workflows, a practical question keeps coming up: how do we check what goes into the model and what comes back, in a way that is transparent, auditable, and fits into how we already work in R? This talk presents {llmshieldr}, an open-source R package I've been developing as an attempt to fill that gap. It adds a transparent, model-agnostic guardrail layer that scans prompts, retrieved context, and model outputs before anything risky leaves or enters your workflow. The rule engine supports regex pattern matching, lightweight NLP intent detection, and optional semantic review using local LLMs, keeping sensitive data off third-party APIs entirely. Controls are mapped to the OWASP Top 10 for LLM Applications (2025), and every scan produces auditable findings with configurable policies and structured logging. I'll walk through the design with real examples, highlighting pharma-relevant scenarios. This is an experimental project, being built for open source. The goal is to share what's working, what's not, and start a conversation about what secure LLM usage in R focussed pharma teams should actually look like.
Indraneel Chakraborty
Independent Contributor
"Ignore All Previous Instructions" and Other Things Your LLM Shouldnt Do in Pharma: Applying GenAI Security Guardrails in R
As R users in pharma begin integrating LLMs into analytical and reporting workflows, a practical question keeps coming up how do we check what goes into the model and what comes back, in a way that is transparent, auditable, and fits into how we already work in R? This talk presents  llmshieldr , an open-source R package I've been developing as an attempt to fill that gap. It adds a transparent, model-agnostic guardrail layer that scans prompts, retrieved context, and model outputs before anything risky leaves or enters your workflow. The rule engine supports regex pattern matching, lightweight NLP intent detection, and optional semantic review using local LLMs, keeping sensitive data off third-party APIs entirely. Controls are mapped to the OWASP Top 10 for LLM Applications (2025), and every scan produces auditable findings with configurable policies and structured logging. I'll walk through the design with real examples, highlighting pharma-relevant scenarios. This is an experimental project, being built for open source. The goal is to share what's working, what's not, and start a conversation about what secure LLM usage in R focussed pharma teams should actually look like.