A versioned, parameterised prompt structure with named variable slots and optional examples, filled at request time.
A prompt template is a reusable, parameterised prompt: a fixed structure with named slots for variables, a system message, and places for few-shot examples, ready to be filled at request time. It is the difference between an instruction someone typed once into a chat box and an instruction a product sends ten thousand times a day. The structure is the asset; the filled-in text is just one rendering of it.
Parameterised text long predates language models, from printf format strings to email mail-merge. What changed is that the filled-in string now drives a probabilistic system whose behaviour is sensitive to wording, ordering, and example choice. A template that names its variables explicitly, {{customer_name}} or {{ticket_body}}, turns an ad-hoc prompt into something a team can reason about and reuse.
Alto's treatment of this shift is the most direct practitioner account of what a template gains over a bare prompt. Working through LangChain's PromptTemplate — a class that takes named input variables and renders them into a fixed string at call time — she argues that a parameterised structure is the correct unit of work for any application that sends the same intent to a model repeatedly. The named slots are not cosmetic; they are the seam at which application logic and model instruction meet, and making that seam explicit is what allows a prompt to be tested, versioned, and swapped independently of the code that calls it.
The practice matured into prompt management as products moved prompts out of source code and into dedicated stores. Tooling such as Langfuse and others popularised the split between the template, the editable structure, and its versions, the immutable snapshots. The mantra that prompts are code drove the rest: templates get reviewed, tested, and deployed through staged environments rather than edited live in production.
The current debate is where a template should live and who owns it. Keeping prompts in code couples them to releaseReleaseProduct SpecificationA shipped version of the productView reference → cycles, which slows iteration; moving them to a hosted store lets non-engineers edit them, which raises the riskRiskComplianceA risk to the product or businessView reference → of an unreviewed change reaching users. Most teams settle on a template held outside the binary but governed by the same review and versioning discipline as code.
A support tool defines one prompt template for ticket triage: a system message stating the assistant's role, two few-shot examples of correctly categorised tickets, and slots for {{ticket_body}} and {{customer_tier}}. Every incoming ticket renders the same template with different values, so 4,000 tickets a day share one auditable structure. When the product later adds a billing category, the team edits the template once, in one place, and every request picks up the change. Had the prompt been hardcoded at each call site, the same edit would mean hunting through the codebase and risking drift between copies.
In the Unified Product Graph, Prompt TemplateAI & Machine LearningA reusable prompt template lives in the prompt_templateai domain and sits early in its creation sequence, right after AI ModelAI & Machine LearningAn AI or ML model used within the productView reference →. Its versions hang off it through ai_modelprompt_version_evolves_prompt_template, the feature it serves connects through Prompt TemplatepowersFeaturecross-domain, and the product that calls it links via prompt_template_powers_featureproduct_prompted_via_prompt_template. A content calendarContent CalendarContent & KnowledgeA content publication calendarView reference → can even schedule a template through content_calendar_schedules_prompt_template. Modelling the template as the durable parent and versions as its children is what enforces the domain's anti-pattern against prompts without versioning: an unversioned template is a visible gap in the graph, not a silent one in the code.
Type-specific fields on BaseNode
use_casestringIntended use case for the prompt
variablesstring[]Variable names expected by the template
versionstringVersion identifier of the template
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
4 phases, initial: draft · template: PUBLISHING
3 edge types connected to this entity.
ai_model_defines_prompt_templateprompt_template_contains_prompt_versionprompt_template_powers_feature