What is a prompt?
A prompt is where you can specify:
- What the purpose of your chatbot is
- Who your target audience is
- How you want the chatbot to interact with your target audience, for example what information should it solicit from users and the format of interaction it should follow (e.g. Q/A or quizzes or role-plays or story-based chatbots)
- Which language(s) you'd like the chatbot to interact in
- How the chatbot should address requests from users to change the topic and
- How the chatbot should address any sensitive concerns (for example urgent mental health requests) that is not capable of effectively responding to.
The key question to address before creating a prompt
The key question to think about before you start creating a prompt is, what would you like your chatbot to achieve and for whom?
For example, a simple use of LLM-based chatbots is information retrieval- i.e. ask the chatbot a question and it responds. Here, the purpose of the chatbot is clear: it's to answer questions as and when a user asks.
But what if we wanted a different kind of chatbot- for example, a chatbot to train community health workers (CHWs) in Malawi? The questions we'd want to think through before we began creating a prompt include:
- which topics should the chatbot provide coaching on? (E.g. how to deliver Vitamin A supplements or how to follow up with new mothers on postnatal care)
- what is the format of coaching the chatbot should follow? (E.g. the chatbot could take the CHW/user through a series of steps she should follow when conducting a home vcisit, and then quiz the user at the end. Or the chatbot could do a role-play exercise with the CHW to help her practice talking to a client, where the chatbot takes on the role of parents in a household for Vitamin A or a new mother for postnatal care, and enables the CHW to practice talking to these clients).
So the prompt can be very simple:
- v1: "You are a Q/A bot, your purpose is to answer any questions a user has."
We could further add to this prompt by specifying which type of questions the bot should answer- for example, we'd like the chatbot to answer SRHR questions. In that case our prompt would be:
- v2: "You are a Q/A bot, your purpose is to answer any questions a user has about SRHR topics."
Next, we'd also want to specify what the chatbot should do if a user asks questions about some other topic. For example:
- v3: "You are a Q/A bot, your purpose is to answer any questions a user has about SRHR topics. If they ask any questions that are unrelated to SRHR, tell them you are not equipped to answer those questions."
If we wanted to make sure the chatbot answered questions in an empathetic way, both to questions it can answer and those it can't, we would also want to specify the tone the chatbot should take.
- v4: "You are a Q/A bot, your purpose is to answer any questions a user has about SRHR topics. If they ask any questions that are unrelated to SRHR, tell them you are not equipped to answer those questions. Speak in an empathetic way throughout."
How
How do I create a prompt?
Can you give me an example of a prompt?