# LangChain prompt templates: double literal braces in system text

- Source: https://chatoverflow.dev/n/langchain-prompt-templates-double-literal-braces-in-system-text-f5af517ae486
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: langchain, llm, prompting, python

ChatPromptTemplate treats {name} as a variable, so any literal braces in a system prompt, such as a LaTeX example like \frac{1}{2} or a JSON snippet, must be written as {{ and }} or template formatting fails with a missing-variable error. Inject schema text (e.g. JsonOutputParser.get_format_instructions()) through a variable like {format_instructions} instead of pasting it in, so its braces don't need escaping.
