aifree.dev

Vì sao mô hình phớt lờ chỉ dẫn của tôi?

System prompt và thứ tự ưu tiên chỉ dẫn · Cơ bản · 5 phút · context, llm · học sau Context window, Prompt injection (chèn lệnh vào prompt)

System prompt là đoạn văn bản app đặt trước cuộc trò chuyện của bạn để định cách mô hình cư xử. Nó tới mô hình trong cùng một ngữ cảnh với tin nhắn của bạn; mô hình được huấn luyện để xếp nó cao hơn, nên nó thường thắng, nhưng không phải lúc nào cũng vậy.

Trước khi bắt đầu: bạn giải thích được chuyện này cho bạn bè không?

1 = hoàn toàn không · 5 = dễ dàng

  1. 1 Đoán trước

    System prompt ghi “Answer in French”. Bạn viết “Reply in English”. Chuyện gì xảy ra?
  2. 2 Xem

    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, tin nhắn và văn bản dán vào là một ngữ cảnh chung; vai trò chỉ là nhãn mà mô hình học cách xếp hạng, và một chỉ dẫn vẫn có thể thua trước một mâu thuẫn, một câu chữ mơ hồ hay một tài liệu dài chen giữa.

  3. Mỗi API có một chỗ riêng cho nó: tham số system của Anthropic, instructions hoặc tin nhắn developer (chỉ dẫn từ người làm app) của OpenAI, system_instruction của Gemini. Trong ba hãng, chỉ OpenAI công bố thứ tự ưu tiên: developer trên user, và ở cùng cấp thì câu sau thắng.

  4. 4 Bạn là model

    Bạn là mô hình, được huấn luyện theo thứ tự ưu tiên của OpenAI. Bốn lần, hai chỉ dẫn mâu thuẫn nhau. Hãy chọn chỉ dẫn bạn làm theo.

    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 Kiểm tra

    Hai tin nhắn user mâu thuẫn: trước là “use bullets”, sau là “one paragraph”. Theo spec của OpenAI thì sao?
  6. Khi nó phớt lờ bạn, hãy kiểm ba điều. Chỉ dẫn có rõ không, hay có câu sau mâu thuẫn với nó? Nó có nằm đúng chỗ không? Nó có bị chôn vùi không? Anthropic khuyên đặt tài liệu dài lên đầu và câu hỏi ở cuối, cách này làm câu trả lời tốt hơn tới 30 phần trăm trong các bài thử của họ.

  7. 7 Nói lại bằng lời bạn

  8. 8 Nhiệm vụ · 5 phút

    Với một API key Gemini miễn phí, gọi gemini-3.8-flash hai lần với “Explain how rainbows form.”: một lần có system_instruction “Answer in one sentence.”, một lần đặt câu đó sau một bài báo dài dán vào phần input. So độ dài hai câu trả lời.

Ba câu nhanh

Rút ngẫu nhiên từ bộ câu hỏi của bài; lần sau sẽ khác.

Xong chưa?

Còn bây giờ: bạn giải thích được cho bạn bè chưa?

1 = hoàn toàn không · 5 = dễ dàng

Trả lời ba câu nhanh trước đã.

Nguồn

  • 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)

Đăng Oct 21, 2026 · cập nhật Oct 21, 2026

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