LESSON 211 / 215·2 min readIntermediate

Security and guardrails

ReferenceReference guide
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

Guardrail
A check or control that limits unsuitable inputs, actions or outputs. Important rules should also be enforced by application code.
LLM
A model trained to work with language. It can write or summarize text, but its answer still needs checking against reliable information.
Grounding
Connecting an answer to supplied evidence, such as a policy document or a verified database result.
More words from this lesson
Schema
A description of the fields and value types that data should contain. It helps check that an answer has the expected shape.
Authorization
Checking what that identity is allowed to read or do. Being logged in does not grant access to every record.
Tenant
A customer or organization whose data must stay separate from other customers in a shared application.
PII
Information that can identify a person, such as a name, address or identity number.
Trace
A linked record of the steps in one request, including model calls, retrieval and tools. It helps locate delays or failures.

Secure action flow: LLM proposal → allowlisted tool → identity/authorization → schema + rules → limits → business service → minimal result.

Attack surface: user prompts, PDFs, websites, email, memory, tool descriptions/results, arbitrary URLs, caches, traces, and exposed local-model endpoints.

Controls: least privilege, tenant/object/action checks, trusted tool catalogs, secure uploads/parser isolation, constrained egress, PII minimization, runtime schemas, output grounding, safe rendering, quotas, reviewed writes, and retention/deletion across derived data.

Guardrail distinction: schemas check shape; moderation checks product policy; PII checks support minimization; business rules enforce domain validity; authorization controls access; approval permits a concrete action. None alone replaces all the others.

PAUSE & RECALL

Can you explain it without the notes?

Security and guardrails

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Secure action flow: LLM proposal → allowlisted tool → identity/authorization → schema + rules → limits → business service → minimal result.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Evaluation and observability

Adapted from 13_AI.MD · “Security and guardrails”. Examples are study fragments; framework behavior can depend on your version.