Glossary

Prompt Template

A prompt with blanks in it. The application fills the blanks with the user’s question, retrieved documents or account details on every call, which makes the prompt testable, versionable and, if done carelessly, injectable.

General definition

A Prompt Template separates the fixed part of an instruction from the parts that change per request. Instead of building a prompt by string concatenation in application code, a team writes something like “You are the support assistant for {{company}}. Answer the question using only the documents below. Documents: {{documents}}. Question: {{question}}” and the application substitutes values at run time. Most agent frameworks ship a templating layer, and the same idea appears at a lower level in the chat templates bundled with open models, which define how system, user and assistant turns are serialised into tokens.

  • Consistency: every request to the model follows the same structure, so behaviour is predictable and comparable
  • Versioning: templates live in source control with a version number, so a change in model behaviour can be traced to a change in wording
  • Testing: a template can be run against a fixed set of inputs and scored, which is the basis of LLM evaluation and regression testing
  • Reuse across models: the same template can be sent to different models to compare quality and cost, provided each model’s own chat template is applied correctly underneath

The risk is in the substitution. Any value that comes from a user, a document or an external system is untrusted text, and once it is interpolated into the prompt the model cannot reliably tell it apart from your instructions. This is prompt injection. A template reduces the risk but does not remove it: keep instructions in the system prompt role and user data in the user role, wrap inserted content in clear delimiters and tell the model it is data, limit the length of what is inserted, and enforce any real access rule in code rather than in the template.

Good templates are also short on cleverness and long on specifics. State the task, the format and the boundaries, add one or two few-shot examples if the output shape matters, and treat every edit as a code change that goes through review and a test run.

Want to try it yourself? Build an AI agent that answers from your own pages and documents with the Ethora no-code AI agent builder. No coding is needed and it is free to start.

In the Ethora ecosystem

In the Ethora AI SDK the per-agent system prompt is the template’s fixed part. You write the persona, rules and output format once per agent, and the platform assembles the variable parts around it on every turn: the relevant passages retrieved from the agent’s knowledge base, the per-room transcript memory and the incoming message. Because the retrieved text and the user’s message arrive as context rather than being pasted into your instructions, the separation that a template is meant to provide is built into the way the agent runs.

Treat the system prompt field like code. Keep a copy of each version in your own repository, note which agent and app it belongs to, and keep a short list of representative questions to re-run after an edit. In regulated deployments the prompt is also where a reviewer looks first, so a clear, versioned prompt per agent is part of the audit story alongside the Trust and Safety rules that the server enforces independently of what the prompt says.

Get started

Build your own AI agent, no code needed

Train an agent on your pages and documents, test it in minutes, then put it on your website or in your app.

Free tier available Enterprise SLA No vendor lock-in