AI Brain

Prompting Generative AI Correctly: A Guide

The Evolution of Artificial Intelligence 

The concept of Artificial Intelligence (AI) was born in the 1950s, when pioneers like Alan Turing began to theorise about machines capable of mimicking human thought. Turing’s famous ‘Turing Test,’ first published in the paper “Computing Machinery and Intelligence” in 1950, a method to determine if a machine can exhibit intelligent behaviour indistinguishable from a human, set the stage for decades of exploration in the field of AI. During the early days, the focus of AI research was on logic-based reasoning and symbolic processing. Early AI systems like the Logic Theorist (1956) and General Problem Solver (1959) demonstrated limited but effective problem-solving capabilities. 

Through the 1970s and 1980s, AI research faced several obstacles, often referred to as the “AI winters.” Elevated expectations were not met due to computational limitations and the complexities of natural language understanding, reasoning, and learning. However, things began to change in the late 1990s and 2000s with advancements in machine learning, fuelled by the rise of big data, improved hardware (such as GPUs), and more sophisticated algorithms. 

Image Source: AIWS

By the 2010s, deep learning became the key driver of modern AI, leading to innovations like autonomous vehicles, speech recognition systems, and powerful AI assistants. In the last few years, AI models like ChatGPT, DALL-E, and Microsoft CoPilot have revolutionised how humans interact with machines, allowing us to generate text, fix code, and even create images from simple prompts. This surge of generative AI has made it crucial to understand how to interact effectively with these systems to extract the best results. 

In this article, we will explore how to prompt generative AI systems correctly and get the most out of their capabilities. We will focus on three powerful AI platforms: ChatGPT, Microsoft CoPilot, and DALL-E, and provide best practices for achieving high-quality outcomes. 

Best Practices for Prompting Generative AI Systems 

ChatGPT: Getting the Best Answers

ChatGPT, a language model developed by OpenAI, has transformed human-machine communication by generating human-like responses to a wide array of queries. Whether you want an AI-generated article, a story, or help with technical tasks, prompting the system correctly can significantly improve the quality of responses. 

  • Be Specific and Clear: Vague questions may result in generic, irrelevant, or inadequate responses. To combat this, providing detailed context or constraints to the prompt will help guide the model to a preferred response.  
     
    For example: rather than asking “Tell me about climate change.” it would be better to ask, “Explain the impact of climate change on global agriculture over the last 30 years, including the economic impact on developing nations.” 
     
    This more focused approach allows ChatGPT to generate a more informative and targeted response.
  • Provide Examples: Generative AI learns patterns, so offering examples in prompts can lead to more precise outcomes. 
     
    Building on the previous prompt, this could like: “Write a paragraph on climate change so that a primary school student could understand.” This would allow the program to tailor the result to incorporate language that the demographic could comprehend. 
     
  • Ask for Step-by-Step Explanations: For more complex queries, requesting a breakdown of the information can improve clarity.  
     
    This could look like “Explain quantum computing in simple terms, with examples.” This will allow ChatGPT to generate a response that includes tangible examples, and listed steps to provide further explanation. 
  • Reiterate and Refine: If the first output is not what you expected, refine the prompt by adding or clarifying details, or ask the AI to rewrite the result in a different format, tone, or style. 

Microsoft CoPilot: Maximising for Code Assistance 

Microsoft CoPilot is an AI powered companion software, that integrates with a variety of Microsoft products to enhance the user experience and provides real-time suggestions for the user to implement. CoPilot can integrate with development environments such as Visual Studio Code to aid on code writing or fixing errors and bugs. For developers, correctly prompting CoPilot can boost productivity. 

  • Write Meaningful Comments: Comments in your code can guide CoPilot to generate better suggestions. The clearer and more descriptive your comments are, the more relevant the code generated will be. 
     
    The following examples will be written in Python: 
     
    # Function to calculate factorial of a number 
    def factorial(n):  
    # CoPilot will generate the correct implementation based on this comment 
     
    From this CoPilot can understand that you want to calculate a factorial and automatically generate a loop or recursive implementation.  
  • Be Descriptive in Function Names: Instead of using generic names like func(), descriptive names like calculate_sum_of_list() help CoPilot predict the task better. 
  • Iterate with CoPilot’s Suggestions: CoPilot may generate several suggestions. If the first output is not perfect, explore alternate suggestions or refine your comments to get a more accurate solution. 

DALL-E: Creating Visuals

DALL-E, also developed by OpenAI, is an image-generating AI that creates pictures based on text descriptions. The key to generating accurate and creative visuals with DALL-E lies in the detail and specificity of the prompts. 

  • Describe the Scene in Detail: The more details you provide, the closer DALL-E will match your desired output.


    An example of this could be rather than asking “Generate a picture of a city” to suggesting “Generate a picture of a futuristic city with towering skyscrapers, flying cars, and a sunset sky filled with vibrant colours.”  
     

     
    As you can see, being much more specific garners results that would more closely match.
     
  • Specify Art Styles or Eras: If you want a particular artistic style or era, clearly specify it in the prompt. 
     
    For example: “Generate an 18th century European-style portrait of a royal woman wearing a gold dress, with a background of a lavish palace.” 
     

     
  • Fine-tune: Much like prompting with other AI tools, if the image generated is not exactly what you are looking for, either refine your description to better match, or add elements in the prompt. 

Conclusion: The Art of Prompting Generative AI 

Generative AI tools like ChatGPT, Microsoft CoPilot, and DALL-E are only as effective as the prompts you provide. Understanding how to craft clear, detailed, and context-rich prompts is essential to maximising their capabilities. Whether you are asking for technical help, code generation, or visual art, focusing on specificity and clarity will lead to the most successful outcomes. As these AI systems evolve, mastering the art of prompting will become an increasingly valuable skill in leveraging the full potential of generative AI technologies. 

If you are looking for assistance with anything AI or would like to see how your business could benefit from its use, please give us a call on 01603 517404 or email us at hello@lvl1.co.uk

One comment

  1. Really enjoyed this article, it has made me reconsider my approach when using DALL-E. I’ve gone back through some of my previous iterations now and got better results using this guide. Thank you for the great article!

Leave a Reply

Your email address will not be published. Required fields are marked *