Menu

1 / 2

Why DeepSeek V3.2 Tool Calls Can Drift from Ordered System Instructions

DEV Community·Beamlaka·6 months ago
#TgFkWup1
#agents#ai#llm#opensource#tool
Reading 0:00
15s threshold

When my partner asked this question, it sounded very specific—but it exposed a broad engineering issue many of us hit in production agent systems:

When DeepSeek V3.2 selects a tool via tool_choice="auto", what tokens are actually generated, how is that different from older special-token function-calling formats or strict structured calling, and what does that do to ordered system-instruction adherence?

I expected a simple “function-calling behavior” answer.

What I found is more useful: this is not just a model question. It is a protocol + parser + orchestration question.

The core insight

For open-weight DeepSeek V3.2 workflows, tool calling in auto mode is typically:

model emits textual wrapper content (DSML-like blocks),

runtime/parser extracts tool calls from that text,

runtime normalizes into tool_calls[] objects.

So the system is often text-generation first, structure recovery second.

That differs from strict constrained function-calling stacks where decoding itself is grammar/schema…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.