Guide to Custom Prompting
In the realm of Generative AI, prompts play a crucial role in guiding the output of language models like GPT. These prompts are the input text or instructions provided to the model, which can range from a single sentence to multiple paragraphs. By providing clear and relevant prompts, users can harness the power of GPT to generate text that aligns with their specific goals and requirements, tailoring the output to meet their needs.
At Engati, we support two types of prompts for an end-to-end conversational flow:
The Rephrase Custom Prompt refers to the instructions that guide the AI in understanding and rephrasing the user's query or input. This prompt helps the AI to comprehend the context of the conversation and rephrase the user's question in a way that can be effectively processed by the language model.
For example, let's say a user asks, "How do I return an item I bought online?" The Rephrase Custom Prompt could instruct the AI to rephrase the query as: "Provide information on the process for returning a product purchased through the e-commerce website."
The Q&A Custom Prompt, on the other hand, provides instructions to the AI on how to generate a response to the rephrased query. This prompt can include guidelines for the response layout, tone, and other characteristics, ensuring that the AI's output aligns with your brand's voice and meets your specific requirements.
Continuing the previous example, the Q&A Custom Prompt could instruct the AI to: "Using the information provided in the company's return policy document, generate a step-by-step guide on how to initiate and complete a product return, including any relevant timelines or conditions. The response should be presented in a clear, concise manner suitable for customers."
To ensure you create prompts that yield the desired results, follow this step-by-step approach:
- Define a clear goal or desired output for the prompt, and structure the instructions in a step-by-step, bulleted format.
- Provide sufficient context and be as specific as possible with your instructions, using precise language to avoid ambiguity.
- Consider including guidelines on tone, style, and level of technical detail required in the AI's response.
When creating prompts for the Generative AI, it's crucial to include certain terms to interpret and execute the instructions. Prompts need these specific terms to be present; their absence could lead to failures.
Here are the essential terms you should include in your prompts:
- Chat History: This refers to the previous conversation or dialogue that the user has had with the chatbot before the current query. Including {chat_history} in your prompt allows the AI to consider the context of the conversation.
- Context: This placeholder, represented as {context}, denotes the relevant information or content that has been matched to the user's query based on the documents or sources provided.
- Follow-up Question: If the user's query is a continuation or related to a previous question, you can include {follow-up question} to provide that context to the AI.
- Standalone Question: For prompts dealing with standalone questions that are not part of an ongoing conversation, you can include the term "Standalone question".
Mandatory Terms to include in your prompt are :
- Chat History: {chat_history}
- Follow-up question: {question}
- Standalone question
- Context: {context}
- Question: {question}
- Helpful Answer:
If you face any issues or queries please reach out to us at [email protected]