Crafting Strategic Prompts Can Make AI Assistant Fetch Optimal Results

ChatGPT Plus Custom instructions feature allows you to add preferences or requirements that you’d like ChatGPT to consider when generating its responses.

The model will consider the instructions every time it responds, so you won’t have to repeat your preferences or information in every conversation. 

For example, a teacher crafting a lesson plan no longer has to repeat that they're teaching 3rd grade science. A developer preferring efficient code in a language that’s not Python – they can say it once, and it's understood.

The always-innovating brainiac & Data Scientist S Anand considers ChatGPT to be his favorite team member. He generously shares his creative tricks and hacks. Recently, he blogged about how he has been able to get ChatGPT to work better with him through the following ChatGPT Custom Instructions:

  1. Be terse. Speak directly. 
  2. Avoid unprompted advice or clarifications.
  3. Do NOT hedge or qualify. Do not waffle.
  4. Never apologize.
  5. Suggest follow-up prompts for open-ended inputs.
  6. When sharing multiple options, be diverse.
  7. When comparing, use multiple perspectives.
  8. For vague prompts, ask clarifying question(s).
  9. When unsure, say so and ask questions.
  10. Think step by step. Explain your reasoning.
It's great that many community-minded AI enthusiasts are sharing their prompts that worked for them and can save time for others. Here's one about making an AI Assistant play Devil's Advocate.
Image generated by Bing Chat & DALL-E
High quality prompts can be time consuming, so spend your time on prompts you can reuse. - LLM Prompts for Educators 

The Party Rock app Prompt Doctor has this interesting prompt to rewrite your prompt based on effective prompt design guidelines, best practices and specific scenarios. It will generate the rewritten prompt and include a short explanation (diagnostics) -

Here are some generic best practices and examples of a good prompt design 

- Clarity and Conciseness

Poor: "Tell me something about dogs."

Better: "List three common breeds of dogs and their main characteristics."

- Context and Examples

Poor: "Write about technology."

Better: "Write a 300-word article about the latest advancements in renewable energy technology, focusing on solar panels and wind turbines."

- Testing and Refinement

Initial Prompt: "Provide a summary of global warming."

Refined Prompt: "In two paragraphs, summarize the causes of global warming and its impact on polar ice caps."

- Explicitness

Poor: "Tell me about the benefits of exercise."

Better: "List five benefits of regular exercise, focusing on cardiovascular health and mental well-being."

- Prompt Tuning

Initial Prompt: "Explain quantum computing."

Tuned Prompt: "In simple terms, suitable for high school students, explain the basic principles of quantum computing and its potential applications."

- Avoid Negative Instructions

Poor: "Write a travel guide but don’t include prices or hotel names."

Better: "Write a travel guide focusing on local attractions and activities, avoiding specific details about accommodation and costs."

- Leverage Intent Recognition

Poor: "I need help with writing."

Better: "I'm writing a science fiction story and need assistance with developing a plot involving time travel."

-Use of Role Prompting and Shot Prompting

Role Prompting: "As a nutritionist, provide a one-week meal plan for someone with a gluten allergy."

Shot Prompting: "What are the three primary colors used in painting?"

- Iterative Development

Initial Prompt: "How to reduce carbon footprint?"

Iterative Prompt: "What are five effective ways for individuals to reduce their carbon footprint, specifically in urban settings?"

- Awareness of AI Limitations

Poor: "Write a complete and accurate history of the internet."

Better: "Provide a brief overview of the internet's development, noting that some historical details might be approximate."

- Structure and Order of Information

Poor: "List the benefits and drawbacks of remote work."

Better: "Start with three benefits of remote work, followed by three potential drawbacks."

- Alternative Paths or Instructions

Poor: "Write a detailed essay on a topic you know."

Better: "Write a detailed essay on renewable energy. If you lack information, provide a summary of key concepts in renewable energy."

Additionally, here are some specific scenarios examples 

- Logical Reasoning - Chain-of-Thought (CoT) Prompting: Encourage LLMs to reveal intermediary reasoning steps for complex tasks. Example: "Let's think step by step. If I have 5 apples and give away 2, how many are left?"

- Factual Questions - Zero-Shot Prompting: Suitable for simple tasks where the model is expected to use its extensive knowledge without prior examples​​. Single-Shot Prompting: Demonstrating a single instance of task execution, leveraging the model's In-Context Learning feature​. Example: (Few-Shot Prompting): "Here are two examples of animal classifications. 

- Creative Generation - Create prompts that are specific enough to guide the creative output but not so rigid as to stifle creativity. Example: "Write a short story about a detective in 1920s New York, focusing on the mystery element."

- Multilingual Tasks: "Translate the following sentences into French: 'Hello, how are you?'"

First analyze [Input Prompt] and determine which of the following scenarios is the most appropriate and then rewrite [Input Prompt] based on the generic guidelines and any scenario specific examples that might be appropriate. Prefix the rewritten prompt with "**Rewritten Prompt:**". Finally provide a short explanation of the guidelines or scenarios referenced above.Prefix the explanation with "**Prompt Diagnostics:**" Do not include any other reasoning other than the "Prompt Diagnostics:" section in the output.

Comments