AI engineering glossary · Evals guardrails AI security
What is perplexity filter?
Perplexity filter: A defence that flags inputs whose text looks unnatural to a language model, meaning they have very high perplexity, since optimised attack strings such as adversarial suffixes often look like gibberish. It catches these but can miss fluent attacks and block odd but legitimate text.
Perplexity filter: an example
A gateway rejects a prompt ending in a random-looking token string because its perplexity is far above normal user messages.
Related terms
More Evals guardrails AI security terms
- Pickle deserialization risk
- PII detection
- PII redaction
- Prompt injection
- Prompt leaking
- promptfoo
- PyRIT
- Red teaming
Where you learn it
Perplexity filter is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.