Going Deeper with AI: Prompting
More context helps the model generate quality output.
Since the LLM is able to receive the entire conversation – whether they have the window to read ALL the messages is a different story – each message tend to have role defined.
Roles
From my own observation during prompting, these are the common roles:
systemuser
system
When the message contains role system, it’s usually intended to set the behaviour of the model or the guideline for the model to follow during the conversation.
user
A message containing user role indicates that the user is conversing with the model, either asking or requesting or admitting.
Practices to apply when prompting
- Be specific
- Be deliberate and orderly
- Define a persona e.g. esteemed software engineer, a Jeffrey Archer enthusiast
- Be positive over negative