Qwen prompt guide: Alibaba's six-part framework, delimiters and JSON mode

How to write prompts for Qwen3.8 Max, Qwen3.7 Plus and Qwen3.8 Flash, following Alibaba Cloud Model Studio's own prompt guide and API docs.

Last updated: · Markdown version

What Alibaba recommends

  • Build the prompt from six parts: context, objective, style, tone, audience and response. Each one answers a question the model would otherwise guess; leave out the ones the task does not need.
  • Response is the exact output form: a list, a table, JSON with named fields, a word limit.
  • Separate blocks of material with distinctive markers such as ### or ===, so the boundaries are unmistakable.
  • Give examples when the format matters: they let the model imitate the format, terms and tone, and make answers more consistent. For structured output, pair a format template with sample data.

Settings that change the prompt

  • Thinking is on by default on Qwen3.8 Max, Qwen3.7 Plus and Qwen3.8 Flash. Turn it off with enable_thinking for quick answers, or cap it with thinking_budget.
  • JSON mode: with response_format json_object, the word 'JSON' must appear in the prompt or the request fails. json_schema with strict enforces a schema.
  • Web search is a parameter (enable_search), not something to ask for in prose. On Qwen3.8 Max it is available in the Beijing and Singapore regions.
  • All three take text, image and video input with a 1M-token context, so long documents fit — but say which part of them matters.

Templates

Six-part brief

### Context
[background the model needs]
### Objective
[the one task to complete]
### Style
[e.g. a support agent's reply]
### Tone
[e.g. warm, concise]
### Audience
[who reads it and what they already know]
### Response
[exact format, e.g. 3 short paragraphs, max 120 words]
Opens the analyzer with the prompt prefilled.

Classification with examples

Classify each support ticket as "billing", "bug" or "how-to". Return JSON: [{"id": number, "label": string}].

Examples:
"I was charged twice" -> billing
"The export button does nothing" -> bug
"How do I add a teammate?" -> how-to

### Tickets
[paste tickets with their ids]
###
Opens the analyzer with the prompt prefilled.

FAQ

Why does my JSON-mode request fail?
With json_object, Model Studio requires the word 'JSON' in the prompt. Add it (for example 'Return JSON with these fields…') or switch to json_schema.
Is there a Qwen coder model?
Alibaba's docs now point coding work to the latest general-purpose model, so use Qwen3.8 Max or Qwen3.7 Plus with clear acceptance criteria.