Llama 4Verified 2026-09-01

Meta

Open weights, and historically the family that made self-hosting mainstream. Worth understanding — but Llama 4 has not been updated since May 2025, so treat it as a known quantity rather than a current recommendation.

How to prompt it

Be detailed and explicit. Meta’s own guidance is that explicit instructions beat open-ended ones.

Combine four things: a role definition, the rules, the restrictions, and worked examples.

Forbid extra output explicitly — "return only the JSON object, no preamble and no explanation".

Keep durable rules in the system message and the request in the user message.

Follow the exact prompt template for your model version, including whitespace, when calling the raw model.

Ask for sources or supply context to reduce hallucination; Meta lists this as a named technique.

Strengths

  • Open weights: self-hostable, so prompts and data need never leave your own infrastructure.
  • Very large context on Scout, useful for whole-repository or whole-archive work.
  • Mixture-of-experts design keeps inference cost close to a much smaller dense model.
  • Native multimodal input, trained jointly on text and images.

Weaknesses

  • Prompt format is model-specific and unforgiving — Meta notes that where newlines are specified, they must be present.
  • Adds preamble and commentary unless you explicitly forbid it.
  • Behaviour varies between hosts and quantisations, so a prompt tuned on one deployment may not transfer.
  • Benefits from techniques the closed frontier models have largely absorbed, such as explicit chain-of-thought and self-consistency.

Models

Meta has published nothing newer than Llama 4 Scout and Maverick since May 2025. The prompting guidance below still holds for those models, but if you are choosing an open model to run today, the open-models page covers families that are actively maintained.

Llama 4 Scout

17B active parameters across 16 experts (109B total), with a 10M-token context window.

Context
10M
Max output

Good for: Very long inputs — full codebases, archives, transcripts — on hardware you control.

Watch out: A huge context window is not the same as attention across all of it; still put the instruction near the end.

Llama 4 Maverick

17B active parameters across 128 experts (400B total).

Context
Max output

Good for: General assistant and reasoning work where you want the stronger open model.

Watch out: Total parameter count drives memory requirements even though only a fraction is active.

Sources and grounding

  1. 1Prompt engineering (how-to guide)Meta (Llama developer docs)Meta’s prompting techniques, including explicit instruction, roles and restrictions, and limiting extraneous tokens.
  2. 2Llama 4 — model cards and prompt formatsMetaThe exact prompt template and special tokens per model version.
  3. 3Developer docs and resourcesMetaEntry point for the Llama documentation set.