How does cursor inject "Rules for AI" into the prompt to the LLM?

Hi all,

Does anybody know how the “rules for AI” are used to compose the prompts being sent to let’s say Sonnet3.5? Is it something like prompt= rules + user_query, or more like prompt= user_query + rules? I ask this because at several points in Anthropic’s prompting guides 1, 2 it is kind of implied that having the user_query before the instructions to solve said query, might enable an enhanced chain of thought behavior and reduces hallucinations. This is also useful to know if the rules should be written like “solve the above query by following these rules” or more like “use these rules to solve the query below”. One more thing, are the rules being fed into the system message or the user message?

Cheers

I don’t know the answer to this for certain, but I would hazard to guess that they put it into the system prompt, not the user message.

1 Like

You shouldn’t need to discuss or mention the rules anywhere in your own prompts as we do that for you. Just ask away to the AI as normal and we do the rest!