A guard model is a compact classifier that labels prompts or outputs as benign or malicious, forming a protective layer around larger language models. It filters jailbreak attempts, prompt injections, policy violations, hallucinations, or unsafe generations before they reach users. section 7.6 section 7.1
Guard models provide a practical safety layer with several design properties:
- Use encoder-based classifiers such as Llama Guard or Prompt Guard 2 to return binary or categorical labels quickly, without full text generation. section 7.6
- Deploy them in real-time pipelines where larger generative models handle reasoning while the guard model performs fast filtering or verification. section 7.1 section 7.6
- Curate training data and calibrate decisions carefully because broad or noisy datasets can overblock benign prompts. section 7.6
Distinguishing harmful and benign prompts
A classifier may flag a prompt containing “attack” even when it discusses cybersecurity defense. This illustrates the trade-off between blocking unsafe requests and preserving legitimate use. section 7.6
Use the pipeline figure to trace how a small guard model operates as an auxiliary protective component around a larger generative system. section 7.1
