Skip to content

Instructions being inserted before System Prompt #2423

@strawgate

Description

@strawgate

Initial Checks

Description

It appears that for several providers (at least OpenAI and Google) that the instructions are being inserted into the system prompt for the conversation and more specifically they are being inserted at the beginning of the system prompt when the conversation is sent to the LLM.

I would generally expect instructions to be in the messages/content part of the conversation and not the system_prompt and if messages were to be part of the system prompt, I would expect them to be provided after the system prompt and not before the system prompt.

Example Code

Python, Pydantic AI & LLM client version

Latest 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions