Qwen-Sharp arrow β€” agent chat templates

Jinja chat templates for Qwen3.6-format models, built for agent harnesses (tool use, multi-step work). Plain chat is unchanged from Qwen-Sharp v22.5.0; with tools, arrow turns the model's reasoning into action.

File For
chat_template_sharp-v22.5.0-arrow4.0.jinja Qwen3.6-format models
chat_template_sharp-v22.5.0-arrow4.0-nex.jinja Nex-N2.5 (Nex reasoning-level opener, see below)
chat_template_sharp-v22.5.0-arrow4.0-minicpm.jinja MiniCPM-V 4.7 (openbmb's multimodal content format: bare <|image_pad|>, parts joined by a newline)
llama-server -m <model>.gguf --jinja --chat-template-file chat_template_sharp-v22.5.0-arrow4.0.jinja

How it works

Lineage: Qwen official β†’ froggeric/Qwen-Fixed-Chat-Templates (thinking retention, reasoning effort, XML/JSON tool formats, error coaching) β†’ peculiar-ragdoll/Qwen-Sharp v22.5.0 (terse block) β†’ arrow (ours). Both upstreams are Apache-2.0; what arrow changes is stated here.

How the prompt is built β€” one system block, in this order:

  1. Reasoning-effort line (only at low / xhigh; none at the default medium).
  2. # Tools list and tool-call format rules β€” upstream text, verbatim (format-critical).
  3. The harness's own system prompt.
  4. .arrow project-memory rules (only when file or shell tools exist).
  5. Agent rules (tools present) or Sharp's terse answer rules (no tools) β€” last, closest to the conversation.
  • Plain chat is untouched: with no tools, arrow4.0 renders byte-identical to Sharp v22.5.0.
  • Agent rules: think once, then act; seen once = known; live evidence beats memory; deliver once evidence is enough; smallest change that tests it; stay in scope (project root β€” a mentioned path is context, not a target); check where things live (paths, URLs, ports) in live config; long jobs in the background with a log; build only needed targets; fix in place; result-first replies in the user's language.
  • Per tool batch: at most one short note on the result that needs it (repeated call, same error, empty searches, probe loops, timeouts, writes outside scope, skill churn, stalls) plus a STATUS line β€” goal | scope | calls since last change | read / missing / changed | next move. Pressure rises with inaction: next β†’ overdue β†’ STALLED.
  • Think cadence: thinking opens at decision points β€” a user message, an error, a corrective note, every 8th turn; other turns open with the think block closed, so the model acts directly. Computed from the history alone, so it also works when the harness drops past reasoning.
  • Modes from the request: a question β†’ answer from evidence, no building; "plan first, ask before starting" β†’ present the plan, no changes before approval; the approval reply clears it.
  • Hand-back: 36 calls without a change (18 on a question) β†’ the reply is pre-started as a report (done, blocker, options) and control returns to the user.
  • .arrow project memory: .arrow/memory (decisions, commands, traps) and .arrow/plans (goal, - [ ] steps, verify) at the project root β€” created on first contact, ticked as work lands, re-read after a context summary.
  • Prompt cache: every note and STATUS line is computed from earlier messages only, so past renders never change and the prefix cache holds.

Switches (chat_template_kwargs, default in brackets): reasoning_effort [medium] Β· enable_thinking [true] Β· think_cadence [true] Β· act_streak [8] Β· status_line [true] Β· deliver_at / deliver_at_question [36 / 18, 0 = off] Β· arrow_memory [true; false = off, "always" = also without file tools] Β· decisive [true; false drops the agent rules] Β· terse [true] Β· tool_call_format [xml].

Reasoning level for Nex

Nex was trained on its own chat template, where the reasoning level is set by how the reply opens: a bare <think> means adaptive (medium), <think> + newline means always think (high). The -nex file opens replies the Nex way; the generic file always opens with <think> + newline. Reasoning level passed by the harness β†’ Nex mode:

  • none β†’ no thinking
  • low / minimal β†’ adaptive, with a "keep thinking brief" instruction
  • medium (default) β†’ adaptive: the model decides whether and how much to think
  • high / xhigh / max β†’ always think

Changes since arrow.3.1

  • Think cadence: thinking at decision points only; routine turns act directly.
  • STATUS line after every tool batch, with rising pressure on inaction.
  • Scope: project root anchor; approvals and writes outside it are flagged.
  • Question and plan-first modes, read from the request; approval clears the plan gate.
  • Hand-back report after a long stall; escalating notes instead of repeated ones.
  • Tool timeouts and probe loops recognized; long jobs moved to the background.
  • .arrow rhythm: plan ticks, plan close, memory updates before answering.
  • English-only template text; replies follow the user's language.

Used in

License

Apache-2.0. Derived from froggeric/Qwen-Fixed-Chat-Templates and peculiar-ragdoll/Qwen-Sharp-Chat-Templates, both Apache-2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including gbuzhf/Qwen-Sharp-Arrow-Chat-Templates