Engati - User Guide
Generative AI

Guide to Custom Prompting

7min

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: 

Rephrase Custom Prompt

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."

Q&A Custom Prompt

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."

Crafting Effective Prompts

To ensure you create prompts that yield the desired results, follow this step-by-step approach:

  1. Define a clear goal or desired output for the prompt, and structure the instructions in a step-by-step, bulleted format.
  2. Provide sufficient context and be as specific as possible with your instructions, using precise language to avoid ambiguity.
  3. Consider including guidelines on tone, style, and level of technical detail required in the AI's response.

Mandatory Words To Include

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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 : 

Rephrase Custom Prompt:

  • Chat History: {chat_history}
  • Follow-up question: {question}
  • Standalone question

Q&A Custom Prompt:

  • Context: {context}
  • Question: {question}
  • Helpful Answer:

If you face any issues or queries please reach out to us at [email protected]