Prompting DeepSeek
Use current reasoning controls, choose the hosted model, and preserve tool conversation state.
Model selection
| Model or service | Use case | Model ID or access |
|---|---|---|
| DeepSeek V4 Pro | Higher-capability reasoning and coding | deepseek-v4-pro |
| DeepSeek V4.1 Flash | Latency-sensitive tasks and tool workflows | deepseek-flash |
Which model to choose
Use the supported model identifier on your provider. Compare Pro and Flash on successful task completion and output length with the same inputs.
Using the chat or local app
Check the chat surface's active search and thinking controls. Supply the source text for factual extraction and request a conclusion with the facts it uses.
Using the API
Thinking is enabled by default. In Chat Completions configure thinking and reasoning_effort, and preserve returned reasoning_content while continuing a tool turn. The deepseek-flash application APIs can run web search and URL reading server-side; enabling a tool is separate from asking for fresh facts in prose.
POST https://api.deepseek.com/chat/completions
{
"model": "deepseek-flash",
"messages": [
{
"role": "user",
"content": "Extract the stated total and currency from {{invoice}}."
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "high"
}Prompting advice
- Test the actual mode before changing sampling parameters.
- Add examples of unknown values when extracting structured records.
- For current research, specify dates and preferred sources, enable the corresponding search tool, then inspect the returned citations.
Example prompt template
From {{invoice text}}, extract the invoice number, currency and total. Quote the supporting text for each field. Write null for a field that is absent.