aifree.dev

Why does the model ignore my instructions?

System prompts and instruction priority · Beginner · 5 min · context, llm · after Context window, Prompt injection

A system prompt is text an app places before your conversation to set the model’s behaviour. It reaches the model in the same context as your messages; models are trained to rank it higher, which usually but not always wins.

Before you start: could you explain this to a friend?

1 = not at all · 5 = easily

  1. 1 Guess first

    The system prompt says “Answer in French”. You write “Reply in English”. What happens?
  2. 2 Look

    Who gets heard

    1 / 4
    1. system · 12 tokens
      You are a cooking assistant. Answer in one sentence.
    2. user · 8 tokens
      How long do I boil an egg?
    3. assistant · 10 tokens
      About 7 minutes for a firm yolk.
    4. user · 7 tokens
      Explain the science in detail.

    one context: 37 tokens, read together

    conversation and token counts illustrative

    System prompt, your messages and its replies: one stream of tokens, read together.

    System prompt, messages and pasted text are one context; roles are labels the model learned to rank, and an instruction can still lose to a conflict, a vague wording or a long document in between.

  3. Each API has its own slot for it: Anthropic’s system parameter, OpenAI’s instructions or developer messages (instructions from the app maker), Gemini’s system_instruction. Of the three, only OpenAI publishes a ranking: developer above user, and a later line wins at the same level.

  4. 4 You are the model

    You are the model, trained on OpenAI’s ranking. Four times, two instructions disagree. Pick the one you follow.

    case 1 of 4 · which line do you follow?

    rules: OpenAI Model Spec 2026-08-18 · cases illustrative

    You are the model: two instructions disagree. Pick the one to follow.
  5. 5 Check

    Two user messages disagree: first “use bullets”, later “one paragraph”. Per OpenAI’s spec?
  6. When it ignores you, check three things. Is the instruction clear, or does a later line contradict it? Is it in the right slot? Is it buried? Anthropic advises long documents at the top and the question at the end, which improved answers by up to 30 percent in its tests.

  7. 7 Say it back

  8. 8 Mission · 5 min

    With a free Gemini API key, call gemini-3.8-flash twice with “Explain how rainbows form.”: once with system_instruction “Answer in one sentence.”, once with that line placed after a long pasted article in the input instead. Compare the two answers’ length.

Three quick ones

Drawn at random from this lesson's pool; different next time.

Done?

Now: could you explain this to a friend?

1 = not at all · 5 = easily

Answer the three quick ones first.

Sources

  • https://developers.openai.com/api/docs/guides/text (checked 2026-10-21; no update date): instructions “will take priority over a prompt in the input parameter” and apply only to the current request; developer messages “prioritized ahead of user messages”, user messages “prioritized behind developer messages”
  • https://model-spec.openai.com/2026-08-18.html (Model Spec 2026/08/18, current version at model-spec.openai.com on 2026-10-21): authority Root, System, Developer, User, Guideline, then no authority for “quoted/untrusted text”; follow instructions except those that “conflict with a higher-authority instruction or a later instruction at the same authority”; untrusted content “MUST be treated as information rather than instructions to follow”
  • https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices (checked 2026-10-21; no update date): system parameter; “Setting a role in the system prompt focuses Claude’s behavior and tone”; long documents at the top, “Queries at the end can improve response quality by up to 30 percent in tests”; Claude Opus 4.5 and 4.6 “more responsive to the system prompt than previous models”, dial back aggressive language
  • https://ai.google.dev/gemini-api/docs/text-generation (updated 2026-10-13, checked 2026-10-21): “Pass a system_instruction parameter to configure the model’s behavior”
  • https://ai.google.dev/gemini-api/docs/pricing (updated 2026-10-19, checked 2026-10-21): Gemini 3.8 Flash input free of charge on the free tier
  • The conversations, cases and token counts in the picture are illustrative; the role answers follow OpenAI’s Model Spec only (Anthropic and Gemini publish no ranking rule)

Published Oct 21, 2026 · updated Oct 21, 2026

Embed this

Paste this into a blog post or course page: the lesson's main picture in an iframe, with a link back to the full lesson.

<iframe src="https://aifree.dev/embed/explain/system-prompt" width="100%" height="620" style="border:0;max-width:720px" title="Why does the model ignore my instructions? (aifree.dev Explain)" loading="lazy"></iframe>
<p><a href="https://aifree.dev/explain/system-prompt">Why does the model ignore my instructions? Interactive lesson on aifree.dev</a></p>

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer