Measuring Quality and Safety in LLM Applications

Introduction Before adding controls to an LLM application, you need to know what is happening. Quality and safety measurement gives you that visibility. This course focuses on metrics and monitoring rather than runtime blocking. It uses chat datasets, WhyLogs, LangKit, custom UDFs, model-based scoring, and active monitoring patterns to inspect hallucinations, data leakage, toxicity, refusals, and prompt injection. The useful lesson is practical: do not treat “the model seems fine” as evidence. Log the interactions, compute signals, inspect critical examples, and evaluate filtered subsets. ...

May 7, 2026 · 6 min · Miguel Lameiro (lameiro0x)

Building Guardrails for RAG Applications

Introduction RAG applications are easy to prototype and hard to make reliable. A chatbot can retrieve documents, pass them to an LLM, and answer questions in a few lines of code. The hard part is making sure it does not invent unsupported details, drift off-topic, leak personal data, or violate business rules. This course frames guardrails as a secondary validation layer around LLM inputs and outputs. Prompting, fine-tuning, RLHF, and RAG help, but they do not remove the need for runtime checks. ...

May 10, 2026 · 6 min · Miguel Lameiro (lameiro0x)

Practical LLM Guardrails: Hallucination, Topic, PII, and Competitor Controls

Introduction The guardrails course becomes most useful when it moves from a simple keyword detector to specialized validators. The material covers four practical controls: hallucination detection with Natural Language Inference, topic restriction with zero-shot classification, PII detection with Microsoft Presidio, competitor mention detection with exact matching, NER, and vector similarity. Each control protects a different failure mode. Together they show the right engineering pattern: use small, task-specific models and validators around the LLM instead of expecting the LLM to police itself. ...

May 12, 2026 · 7 min · Miguel Lameiro (lameiro0x)