Templating

Domain: Prompt Engineering

🎯 Motivation

Using a template engine (Jinja, f-strings) to dynamically construct prompts from variables, conditionals, and loops.

πŸ“‹ Concrete Example

Jinja: β€˜Hello {{name}}, your score is {{score}}.{% if score > 80 %} Great job!{% endif %}’ - variables and conditionals create dynamic prompts. Same template, different outputs for different users.

πŸ”— Analogy

Mail merge in a word processor - one letter template, but each copy has a different name and address. Templating does this for prompts: one template, many customized versions.