Glossary · Term

Jinja

← all terms

Definition

Plain language

A common fill-in-the-blanks text templating tool, used here to format prompts.

As stated in the literature

A Python templating language used by most chat templates; unset variables silently render as empty or fall back to hard-coded defaults, which is how template-level differences leak into model outputs.

Also called: Jinja2

Why it matters: Because blanks that nobody filled in quietly disappear or get replaced by hard-coded defaults, a templating mistake can change what the model actually sees without anyone getting an error message.

For example, a Jinja template might say "insert the system prompt here, then each message in turn", and fill those blanks in every time a request arrives.

Heard on the show

“… different teams, in different languages: a Rust tokenizer sitting next to a hand-rolled Go one, and a Jinja template sitting next to something else entirely. …”
Episode 272 — How a Model Guesses Which Engine Is Running It, From a Wrong Date

Related terms