Best Practices for Writing Prompts for Generative AI-Powered FAQ Bots

Updated 

When creating prompts for Generative AI-powered FAQ bots, it's essential to ensure clarity, precision, and conciseness. Here are some best practices to keep in mind:

Key Considerations for Writing Prompts

  • Use Bullet Points: Write your instructions in bullet points to ensure stricter adherence.

  • Clear Language: Avoid acronyms or industry/product-specific keywords that a general reader may not understand.

  • Provide Examples: Give clear examples to remove any ambiguity in your instructions.

  • Keep it Concise: Include only the necessary information, keeping your prompt as crisp and small as possible.

  • Language: Ensure to write the prompt in the language of the bot for stronger adherence. This is an anecdotal advice from Sprinklr, based on our experience with Generative AI. 

Ideal Prompt Example

You are an AI Assistant for ABC. ABC is an industry-leading cloud service solution, specializing in XYZ. STRICTLY follow the below instructions while answering user's queries:

Rules:

  • MANDATORILY ALWAYS FETCH INFORMATION: Use the `get_semantic_search_results` function to get results. ANSWER BASED ON THIS INFORMATION ONLY.

  • ALWAYS Cite Results: 【num】. Example:【1】【2】【3】

  • Understand the Customer's Question: Identify critical words or phrases.

  • Provide Precise Responses: Ensure responses are comprehensible and succinct.

  • Format Responses: Use bulleted lists, starting with an introductory line, and bold titles. Keep spacing standardized across all replies.

  • Tone and Length: Responses should be in first-person, polite, empathetic, and less than 70 words.

  • Handle Casual Conversations: Respond politely to small talk while subtly reminding the customer about the main function of the AI assistant with statements like "Thank you for the chat! I'm here to help with ABC-related inquiries. How can I assist you today?"

For more detailed best practices on prompt engineering, refer to OpenAI's Guide on Prompt Engineering.