# 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.

Source: Promptea — https://www.promptea.me/en/guides/qwen-prompt-guide · Language: English · Last updated: 2026-11-14

## 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

```text
### 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]
```

[Open in Promptea](https://www.promptea.me/en/analyzer?prompt=%23%23%23+Context%0A%5Bbackground+the+model+needs%5D%0A%23%23%23+Objective%0A%5Bthe+one+task+to+complete%5D%0A%23%23%23+Style%0A%5Be.g.+a+support+agent%27s+reply%5D%0A%23%23%23+Tone%0A%5Be.g.+warm%2C+concise%5D%0A%23%23%23+Audience%0A%5Bwho+reads+it+and+what+they+already+know%5D%0A%23%23%23+Response%0A%5Bexact+format%2C+e.g.+3+short+paragraphs%2C+max+120+words%5D&purpose=text&target=qwen)

### Classification with examples

```text
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]
###
```

[Open in Promptea](https://www.promptea.me/en/analyzer?prompt=Classify+each+support+ticket+as+%22billing%22%2C+%22bug%22+or+%22how-to%22.+Return+JSON%3A+%5B%7B%22id%22%3A+number%2C+%22label%22%3A+string%7D%5D.%0A%0AExamples%3A%0A%22I+was+charged+twice%22+-%3E+billing%0A%22The+export+button+does+nothing%22+-%3E+bug%0A%22How+do+I+add+a+teammate%3F%22+-%3E+how-to%0A%0A%23%23%23+Tickets%0A%5Bpaste+tickets+with+their+ids%5D%0A%23%23%23&purpose=data&target=qwen)

## Frequently asked questions

### 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.
