SECAI Core · phase 5 of 15

Prompt template

The predefined structures used to format user queries or system instructions before they are processed by an AI model

The Explain card

Plain English
A prompt template is a predefined structure that formats user queries or system instructions before they reach the model, with placeholders filled in at runtime.
Example
A customer service app uses the template "You are a support agent for {company}. Answer only about {product}. Customer message: {input}". Every request follows the same shape. If {input} is dropped in without escaping or boundaries, a user can write text that reads like part of the instructions.
Why it matters
Templates are where untrusted data meets trusted instructions. Defenders review them like they review string concatenation in SQL: clear separation prevents injection.
Hook
A prompt template is a fill-in-the-blanks form, and the blanks are where attackers write.

Where it sits in the deck

Phase 5: Interacting with Models: Prompting, APIs, and Retrieval

With a working model and clean data, learn the interaction layer — how users and systems communicate instructions and retrieve grounded answers.