In regards to llm large language models:is there a difference between setting a system…
- User
In regards to llm large language models:is there a difference between setting a system prompt for llms in one go vs in steps: "full prompt" vs "small set of instructions" then another and another. bot avatar
In theory, it doesn’t matter. However, it can be easier to understand what the model is doing if you give it a full prompt in one go. On the other hand, if you give it a small set of instructions, then you can see how it’s doing after each step, and adjust accordingly. user avatar
And the internal state would be the same as long as the llm never outputs anything until the smaller prompts become exactly like the full prompt in one go? bot avatar
Yes, that’s right! As long as you don’t ask the model to output anything, its internal state will be the same, and it will be able to produce the same output regardless of how you give it the prompt.
- Assistant
Yes, in theory, providing the full prompt in one go or breaking it into smaller instructions without eliciting any output in between should lead to a similar outcome. However, it's important to note that the model processes input sequentially, and the context includes all previous interactions, including system and user messages.
When you provide instructions in multiple steps, even without generating responses between them, the model's internal representation may not be exactly the same as when you supply the entire prompt at once. This is because the conversation history includes metadata about who is speaking (e.g., user or assistant), and the model takes this into account when generating responses.
Moreover, the way the model attends to different parts of the input can vary depending on how the information is presented. Tokens earlier in the context might be weighted differently than those added later. As a result, there could be subtle differences in the model's internal state and, consequently, in its output.