How They Use AI  |  Newest

<< Home  |  Prompting craft

Aligns model with Llama 2 structural requirements

AreaPrompting craft
AI usedLlama 2
SourceReddit thread
Posted2023-07-21

The move

Wrap your system instructions and user message within the specific [INST] <<SYS>> [/INST] tags required by the model's training.

Steps

  1. Open your model's advanced prompt settings.
  2. Insert your system instructions inside the <<SYS>> tags.
  3. Place the user message after the system block.
  4. Close the instruction block with [/INST].

Prompt for your AI

[INST] <<SYS>> {{ system_message }} <</SYS>> {{ user_message }} [/INST]

What happened

Users struggled with Llama 2 producing unexpected behavior or failing to follow instructions due to incorrect formatting. By adopting the official [INST] <<SYS>> tag structure, the model correctly interprets system instructions and user queries. Commenters confirmed that using this specific template resolves output issues and improves model responsiveness.

Who confirmed it

I've been using Llama 2 with the conventional prompt template... and I still haven't had any problems with the AI not understanding me.

Watch out

Incorrectly breaking the prompt across multiple fields or missing line breaks can lead to bad output or the model ignoring instructions.

Give it to your agent

Read https://howtheyuse.ai/p/aligns-model-with-llama-2-structural-requirements.md and help me do this.

Sources



Last updated November 26, 2026.