ch22_prompt_types

show:
mock turns=3 · messages=0 · prompt_types_by_scenario=[['per_conversation'], ['design_time', 'per_conversation'], ['design_time', 'during_run', 'per_conversation']]
live turns=3 · messages=0 · prompt_types_by_scenario=[['per_conversation'], ['design_time', 'per_conversation'], ['design_time', 'during_run', 'per_conversation']]
scenario authored_per_conversation
scenario authored_per_conversation · 3.9ms
turn 1 · 3.7ms · responded with: Hello! How can I help you today?
model mock · 3.7ms · responded with: Hello! How can I help you today?
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanSay hello, briefly.
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]aiHello! How can I help you today?
classifications {"found": [{"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}]}
prompts {"types": ["per_conversation"]}
scenario authored_per_conversation · 1400.4ms
turn 1 · 1400.2ms · 48 in / 16 out · responded with: Hello! 👋
model live · 1400.2ms (model provider 1209.3 · library 190.8) · 48 in / 16 out · responded with: Hello! 👋
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanSay hello, briefly.
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (7)
temperature, max_tokens, top_p, stop, seed, tools, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length193
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "Say hello, briefly.",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:53:27 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 d18c8670421cff5c9fa297b260cb2814.cloudfront.net (CloudFront)
x-amz-cf-idlSvW1kd81MsVzMagUCctRYD5a_W3hVmYLN5fFVermfgoHpdP1h3iFw==
x-amz-cf-popDEN53-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idd589ed595e0e5d6ba41082cf59e7a53b
{
  "id": "4d9d89e9-3a7d-4d59-9c6b-9bd07e9fcbc4",
  "object": "chat.completion",
  "created": 1789336407,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! \ud83d\udc4b",
        "reasoning_content": "The user wants a brief hello. No tools needed."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 48,
    "completion_tokens": 16,
    "total_tokens": 64,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 11
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 48
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiHello! 👋
classifications {"found": [{"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}]}
prompts {"types": ["per_conversation"]}
scenario authored_at_design_time
scenario authored_at_design_time · 1.0ms
turn 1 · 1.0ms · asked for: price_of
model mock · 0.8ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.2ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
classifications {"found": [{"what": "tool description: price_of", "bucket": "design_time", "reviewed": "once, when the function was written -- or never, if a dependency wrote it"}, {"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}]}
prompts {"types": ["design_time", "per_conversation"]}
scenario authored_at_design_time · 1157.2ms
turn 1 · 1157.2ms · 328 in / 39 out · asked for: price_of
model live · 1156.7ms (model provider 1145.8 · library 10.9) · 328 in / 39 out · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length447
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:53:29 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 0ca89aa790ddfc1fc4c04f63c3cabae6.cloudfront.net (CloudFront)
x-amz-cf-id5XtbceEHP938ZeNaM6P3xbHxUg0R5UV_hWBxg7Hvn2X8Fjp80kqB-Q==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id40043e968a2080c79b8c5d587b0a09ef
{
  "id": "515a4c52-a924-4a9a-bda3-abc570727278",
  "object": "chat.completion",
  "created": 1789336408,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_xmPSJSAoGVVsYBwLzL5p8414",
            "type": "function",
            "function": {
              "name": "price_of",
              "arguments": "{\"item\": \"milk\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 328,
    "completion_tokens": 39,
    "total_tokens": 367,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 200
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.4ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
classifications {"found": [{"what": "tool description: price_of", "bucket": "design_time", "reviewed": "once, when the function was written -- or never, if a dependency wrote it"}, {"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}]}
prompts {"types": ["design_time", "per_conversation"]}
scenario authored_during_the_run
scenario authored_during_the_run · 0.5ms
turn 1 · 0.3ms · asked for: price_of
model mock · 0.2ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.1ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 0.2ms · responded with: Milk is 1.20.
model mock · 0.2ms · responded with: Milk is 1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiMilk is 1.20.
classifications {"found": [{"what": "tool description: price_of", "bucket": "design_time", "reviewed": "once, when the function was written -- or never, if a dependency wrote it"}, {"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "the model's own prior reply", "bucket": "during_run", "reviewed": "never, by anyone -- the model itself has moved on"}, {"what": "tool result", "bucket": "during_run", "reviewed": "never, by anyone"}]}
prompts {"types": ["design_time", "during_run", "per_conversation"]}
scenario authored_during_the_run · 2210.2ms
turn 1 · 964.2ms · 328 in / 39 out · asked for: price_of
model live · 963.6ms (model provider 955.4 · library 8.2) · 328 in / 39 out · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length447
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:53:30 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 59b91fa5bb1f56f1a653604439afb430.cloudfront.net (CloudFront)
x-amz-cf-id2C34QOeypPPMgDetfWc1wz8bpjXml5vFYHqRH0MBEzZZJkMyhztCcw==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id7461a47f450f2883eeb12564f0648e21
{
  "id": "b42179c3-f1e0-426c-a702-c9b09f908173",
  "object": "chat.completion",
  "created": 1789336410,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_GshirHg80vabxjtSwgdY6212",
            "type": "function",
            "function": {
              "name": "price_of",
              "arguments": "{\"item\": \"milk\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 328,
    "completion_tokens": 39,
    "total_tokens": 367,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 200
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.6ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 1246.0ms · 384 in / 9 out · responded with: Milk is £1.20.
model live · 1245.9ms (model provider 1236.5 · library 9.5) · 384 in / 9 out · responded with: Milk is £1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length722
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_ET_GshirHg80vabxjtSwgdY6212",
          "function": {
            "name": "price_of",
            "arguments": "{\"item\": \"milk\"}"
          }
        }
      ]
    },
    {
      "content": "1.20 for milk",
      "role": "tool",
      "tool_call_id": "call_00_ET_GshirHg80vabxjtSwgdY6212"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:53:31 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 c11dc3a4786e038ddffb5e925a892302.cloudfront.net (CloudFront)
x-amz-cf-idLY4aARvMlHSdJraExRM4ExVWjoIwen--aGBUS71N_TkXu1hN3zBcWg==
x-amz-cf-popDEN52-P3
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id0a82fce90c1c882dfb6c5a80a485dfdc
{
  "id": "c23ae1c3-c340-4035-9527-67fbf063fb24",
  "object": "chat.completion",
  "created": 1789336411,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 384,
    "completion_tokens": 9,
    "total_tokens": 393,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 256
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20.
classifications {"found": [{"what": "tool description: price_of", "bucket": "design_time", "reviewed": "once, when the function was written -- or never, if a dependency wrote it"}, {"what": "system message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "human message", "bucket": "per_conversation", "reviewed": "as it was written"}, {"what": "the model's own prior reply", "bucket": "during_run", "reviewed": "never, by anyone -- the model itself has moved on"}, {"what": "tool result", "bucket": "during_run", "reviewed": "never, by anyone"}]}
prompts {"types": ["design_time", "during_run", "per_conversation"]}