Rajpal notes the rapid growth of AI applications, but says AI-first companies had lower one-month retention than traditional software companies in the data she cites. She attributes unreliable behavior to machine learning’s nondeterminism: the same prompt can produce different answers, and errors can compound when systems depend on earlier outputs.
Trust, but Verify
Speaker
Shreya Rajpal, co-founder and CEO of Guardrails AI, presents “Trust, but Verify” at an AI Engineer event, explaining how to verify generative AI outputs before using them in applications.
Rajpal says flexible LLMs need correctness checks for high-value applications, where users cannot simply ignore an incorrect answer. Her proposed pattern sends every model output through a verification suite tailored to the application, checking risks such as sensitive information, profanity, competitor mentions, executable code, and whether text is grounded in a trusted source.
Guardrails AI lets developers define checks using specifications such as XML or RAIL, Pydantic models, or strings, then wraps the LLM call at runtime. When an output fails, developers can re-ask the model, filter or programmatically fix the result, use a fallback, refrain from answering, or log the failure without taking action.
Rajpal argues that prompt engineering and retrieval-augmented generation do not guarantee compliance, citing an experiment that returned different benchmark numbers across five identical runs at zero temperature. She recommends choosing checks for the problem: ground code generation in a runtime or database sandbox, use rules for simple formats, and use smaller classifiers for tasks such as toxicity detection.
Rajpal demonstrates a health-center chatbot that must avoid hallucinations, profanity, and competitor mentions. A provenance validator checks whether each answer is supported by the provided source; in her password-help example, it detects a made-up setting and prompts the model to correct its response using the context.
Takeaways
- Treat each LLM response as unverified until it passes checks tied to your application’s risks.
- Set a latency and token budget for retries, and define a fallback or refusal when checks still fail.
- Use deterministic rules or smaller classifiers for constraints they can check reliably.
- For generated code or SQL, validate against the actual runtime, database, or schema when possible.
- Track model and prompt changes because commercial model updates can affect previously working validations.
Mentioned in this talk
Search inside this talk
What was claimed 7
- foundedShreya Rajpal founded
Guardrails AI“one of the co-founders and the CEO of Guardrails AI”
YouTube Verified4 sources· Talk, Web· archived
- builtopen-source framework
“Guardrails AI, the open-source framework that implements this”
YouTube Verified2 sources· Talk, Web· archived
- ceo ofShreya Rajpal CEO of
Guardrails AICEO“the CEO of Guardrails AI”
YouTube Unverified1 source· Talk
- previously atShreya Rajpal previously at Precismachine learning infrastructure lead
“I was the machine learning infrastructure lead at Precis”
YouTube Unverified1 source· Talk
- featuregoverned actions: Wraps LLM calls with validation checks and configurable failure policies
“at runtime the guard surrounds your LLM callable”
YouTube Unverified1 source· Talk
- featuregoverned actions: Provides custom validators and a catalog of commonly used validators
“lets you create custom validators”
YouTube Unverified1 source· Talk
- featuregoverned actions: Compiles verification requirements into prompts
“a specification language that lets you compile your requirements into a prompt”
YouTube Unverified1 source· Talk











