AI Engineering
Learn LLMs, RAG, agents, secure tools, and production AI through practical insurance examples.
Input, output, and tool guardrails
Input guardrails check requests and incoming content. Output guardrails check generated answers or data. Tool guardrails check proposed operations before execution and validate their results afterward.
Schema validation: Zod and Pydantic
Schema validation verifies data shape, types, required fields, and declared constraints at runtime. Zod is commonly used in TypeScript; Pydantic serves a similar role in Python. These validators check structure, not whether facts are true or actions are…
Moderation and PII detection
Content moderation categorizes content that may violate a product policy. PII detection identifies potentially private identity-linked information for masking, routing, or restricted handling. Both can use rules and models, and neither is perfectly accurate.
Hallucination mitigation, business rules, and approval
Hallucination mitigation reduces unsupported model claims using evidence, constraints, validation, and abstention. Business-rule validation checks authoritative domain requirements. Human approval permits a specific action after a person reviews its concrete…
What is a guardrail?
A check limiting unsafe or invalid behavior at input, output, or tool boundaries. Examples include schemas, content checks, evidence validation, rate limits, business rules, and approval gates.
Does valid structured output mean safe output?
No. A valid object can contain false facts or unauthorized action arguments. I validate shape, then check business meaning, ownership, evidence, and required approval independently.
What should fail closed?
Permission, approval, and critical business-rule checks should block action when they cannot establish validity. For uncertain content or model availability, I use an appropriate clarification, template, search result, or human escalation rather than silently…
A moderation check rejects legitimate injury descriptions. What do you do?
I inspect domain-specific false positives, refine the policy and calibration dataset, and provide a permitted review path. Insurance support must handle legitimate sensitive content while minimizing private data and enforcing access.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.