Campus safety · 2026
LiveRudy, the Cal Poly EHS assistant
A safety chatbot that answers from a verified corpus or says it does not know.
Go to the proof
- Adversarial checks
- 301
- Document recall@5
- 83.7%
- Emergency routing checks
- 25/25
Deployment
Rudy is live and public on Cal Poly’s Environmental Health and Safety site. It is an embeddable chat widget, and it shipped in July 2026. I built and shipped it as the Data Systems and Cloud Infrastructure Engineer for Cal Poly EHS and Risk Management, and I have kept iterating on it since, most recently through version 3.5. All of the Cal Poly tools are set to extend to the Solano campus next, and to Maritime after that.
Problem
EHS had no self-service way to answer routine safety questions. Staff and students had to dig through PDFs or wait on an email reply. The harder problem was trust. Any AI-generated answer could hallucinate hazmat guidance or point someone to the wrong contact during an emergency, and a safety tool cannot afford that kind of mistake.
Build
Rudy is a vanilla JavaScript widget that runs inside a Shadow DOM, with no runtime dependencies. Retrieval blends a lightweight BM25F score with an offline LSA layer through Reciprocal Rank Fusion, then adds Damerau-Levenshtein fuzzy matching so a typo still finds the right passage. Rudy never writes an answer from scratch. It composes responses only from a verified, crawled knowledge base. Every response lands in one of three confidence bands: answer, clarify, or fallback. When Rudy is not confident, it asks a follow-up question or hands off to a human instead of guessing.
I added two safety gates on top of that design. A build-time check fails the deploy outright if any emergency phone number in the knowledge base cannot be verified against the source documents. An optional server-side layer, backed by the Claude API, re-checks every phone number, email, and URL in a drafted answer against the retrieved context before it reaches the screen. Feedback is logged to Supabase, insert-only, behind row-level security.
The code is client-owned and private; the walkthrough above is the public record.
Proof
The knowledge base grew through successive retrieval and safety reviews. Rudy now passes 301 adversarial regression checks, up from 117 across several hardening passes. Retrieval recall@5 sits around 70%, with document recall@5 at 83.7%. A tuning pass moved the answered-and-correct rate from 52.6% to 61.5%. Emergency-intent routing hit 25 out of 25, with zero false escalations. EHS staff started calling the assistant Rudy, and the name stuck well enough that it became the product’s name.
What I would do next
I would push the answered-and-correct rate higher before adding any new feature, since that number matters more than anything else. I would also build a small admin view so EHS staff can see which questions Rudy falls back on, so the knowledge base grows from real gaps instead of my guesses.



