passdrill
AI & LLM Engineering · Building with LLM APIs · Card 014/024 easy

A developer comparing Anthropic's Messages API to some other chat-style LLM APIs notices a structural difference in how the system prompt is supplied. How does Anthropic's Messages API handle the system prompt?

  1. Anthropic's Messages API accepts a top-level `system` parameter, kept separate from the `messages` array, to carry the system prompt, whereas some other chat-style APIs instead embed the system prompt as a message with a system or developer role placed inside the same messages list
  2. Anthropic requires the system prompt to be the first entry in the `messages` array with a role of `system`, exactly matching how some other chat-style APIs structure a request
  3. Anthropic's Messages API has no mechanism for supplying a system prompt at all; instructions can only be embedded inside the first user message
  4. the `system` parameter selects which dated model snapshot handles the request, and has nothing to do with supplying instructions to the model
Next card → Shuffle