All you need to learn about Generative AI

What is Generative AI?

As we embark on this journey into the world of Generative AI, let’s first establish a clear understanding of what it is. Do not be scared by a bit of technical explanation of it below. They are not meant to turn you into an AI developer. But rather to just describe how GenAI works.

At its core, Generative AI is a subset of artificial intelligence technologies that are capable of producing something new, original, and in some instances, indistinguishable from creations by humans. This could be anything from a piece of music, a poem, or a piece of art to a block of text or even an entirely new design for a machine part.

While traditional AI (also called discriminative AI) models primarily focus on understanding and interpreting data, Generative AI goes a step further by creating new data instances โ€” an imaginative process akin to human thinking. It achieves this through complex machine learning techniques such as Generative Adversarial Networks (GANs), Variational Auto Encoders (VAEs), and Transformer models. 

GANs, for instance, consist of two distinct neural networks: a generator and a discriminator. As briefly described in the first chapter, neural networks are inspired by the structure and function of the human brain, specifically the interconnected network of neurons. Think of them as machines programmed to think like the human brain, using its neural networks. 

The generator neural network in GANs creates new data instances, while the discriminator neural network evaluates them for authenticity, i.e., whether they resemble an instance from the actual data distribution. Through an iterative process, the generator becomes progressively better at creating believable data, and the discriminator becomes better at determining its authenticity.

On the other hand, VAEs are a type of auto-encoders, a class of neural networks trained to reproduce their input data. However, VAEs introduce a probabilistic spin to the process, generating a distribution of values instead of a fixed value for each encoded latent attribute, which leads to the creation of new, original content.

Finally, transformer models, such as the famous GPT-3 developed by OpenAI, use large-scale machine learning and the power of attention mechanisms to generate human-like text, making them especially popular for natural language processing tasks.

These three components together help the GenAI solution to learn from existing content (also known as training the algorithm), and build what is called a โ€˜foundation modelโ€™. This model is then utilized to create new creations (called generation) when a user provides โ€˜promptsโ€™ and asks the GenAI to do so. A new creation is done by generating a content and then comparing the new generation with the sample data upon which the model has been trained to find the most similar generation which minimizes the error.

Click here to display content from YouTube.
Learn more in YouTubeโ€™s privacy policy.

Generative AI, Reference: Google

What are Prompts and Generations?

In the world of Generative AI, ‘Prompts’ and ‘Generations’ are two terms that hold significant importance. They form the fundamental elements of the interactive process between the user and the AI system.

A ‘Prompt’ is essentially an input given by the user to the AI system. It acts as a guide or a starting point for the AI system to produce output, or ‘Generation’. If you’re familiar with search engines, consider prompts as the search terms you enter. Only instead of returning existing information from the Internet, a Generative AI model takes the prompt and uses it as a creative seed from which it generates something new.

Prompts can be explicit instructions, questions, phrases, or even a single word. In other words, they are the problem statement or tasks assigned to the AI system. The intricacy of the prompt can vary widely based on the task at hand and the desired complexity of the output.

Moving on to ‘Generations’, this term refers to the output produced by the AI system in response to the prompt. It is what the AI system ‘creates’ or ‘generates’ based on the instructions or clues provided in the prompt. These generations can be a block of text, a piece of art, a melody or any form of output, depending on the nature of the Generative AI model.

The relationship between prompts and generations significantly shapes the Generative AI experience. The prompt acts as the ’cause’, and the generation is the ‘effect’. The AI system uses its training and inherent algorithms to interpret the prompt and generate an output that aligns with the context and intent of the prompt.

It is crucial to understand that the AI’s responses are not simply a result of deterministic code execution. Instead, they are a product of statistical inference based on the patterns the AI has learned from its training data. As such, the quality of the generation can greatly depend on the specificity and clarity of the prompt, highlighting the importance of effective communication with the AI system. It is also worth noting that the same prompt can generate a different outcome each time it is entered, as the GenAI model creates a novel generation every time it is prompted.

This interaction between prompts and generations brings us closer to a new paradigm of working with AI, where human creativity and AI’s generative capabilities collaborate to produce extraordinary outcomes, to a level that the term ‘prompt engineering’ has emerged to refer to this competence. In the following sections, we’ll explore what Generative AI can do and how it can be utilized in professional and everyday work. In Chapter 4, we will investigate prompt engineering as an emerging competence further.

Copilot Prompting Toolkit from Microsoft

5 new strategies to get powerful results with your prompts


1. Write clear instructions

โ€ข Include details in your prompt to get more relevant answers

โ€ข Specify the steps required to complete a task

โ€ข Provide examples

2. Provide reference text

โ€ข Instruct ChatGPT to answer using a reference text, such as a link to a PDF or a website

โ€ข Instruct ChatGPT to answer with citations from a reference text

3. Split complex tasks into simpler subtasks

โ€ข Since there is a limit on how much text you can insert into ChatGPT, summarize long documents piece by piece to stay within the limit

โ€ข For prompts that involve multiple instructions, try breaking the prompts into smaller chunks

4. Give ChatGPT some time to think

โ€ข Instruct ChatGPT to work out its own solution before rushing to a conclusion

โ€ข Ask ChatGPT if it missed anything on previous passes

5. Test changes systematically

โ€ข Evaluate ChatGPTโ€™s outputs with reference to gold-standard answers

Source: OpenAI

https://platform.openai.com/docs/guides/prompt-engineering/six-strategies-for-getting-better-results?utm_source=www.superhuman.ai&utm_medium=newsletter&utm_campaign=openai-s-6-strategies-to-write-powerful-promots

What can GenAI do?

GenAI is often seen as a revolutionary technology due to its remarkable ability to generate, evaluate, and automate. The world of GenAI is vast and continuously expanding, characterized by an ever-growing range of types and applications. While it’s difficult to capture the full extent of its capabilities in a single section, we will give a glimpse of the broad strokes, setting the stage for more detailed discussions later in this chapter.

One of the primary use cases of GenAI is creating content. Instead of the daunting task of staring at a blank page, users can leverage GenAI to generate initial ideas in multiple formats, such as text, images, audio, video, software code, and more. The AI can serve as an inspiring muse, bringing forth novel ideas that you can further develop and refine. This way, GenAI is making an impact in boosting productivity through text generation. Whether you’re drafting emails, reports, articles, or even code, GenAI can generate initial drafts or suggestions, greatly reducing the time and effort required to get started. This kind of support not only expedites work processes but also stimulates creativity, as AI-generated content can inspire new ideas and perspectives.

Furthermore, GenAI is revolutionizing various tasks related to text content, such as translation, summarization, transcription and media creation. For instance, AI-based translators can now provide real-time, context-aware translations, breaking down language barriers like never before. Similarly, AI summarizers can distill lengthy documents into concise summaries, while transcription services can convert speech into text with remarkable accuracy. On the media front, AI tools are being developed to generate original audio and video content, opening up exciting possibilities for multimedia creation.

GenAI is not only about creation but also about evaluation. It can be used to review content, identify areas for improvement, and even audit and enhance structures. Its ability to find common trends and insights that you might not be aware of can be a game-changer, especially in complex fields where subject matter expertise is crucial.

Another pivotal shift facilitated by GenAI revolves around the way we search for information. In the traditional web era, search engines primarily pointed us towards the address of webpages, i.e., URLs that might contain the answers we were looking for. However, in the GenAI era, the focus is gradually shifting from URLs to direct answers. AI algorithms can now sift through vast amounts of data to generate concise and accurate responses to our queries, fundamentally transforming the nature of search and information retrieval.

Beyond the realm of content, GenAI is also making inroads into automating tasks and processes. Imagine if routine or repetitive parts of your job could be automated, freeing up your time for more strategic, creative, or personally fulfilling tasks. That’s the promise of GenAI. 

However, GenAI is not just about efficiency and productivity but also about discovery. It can help you explore areas you may not have considered, revealing new insights, questions and opportunities. This can boost creativity processes and help tap into subjects that could not be possible, without a subject matter expert in the room.

These applications only scratch the surface of what GenAI can do. In the coming sections, we will delve deeper into some of these areas, exploring how GenAI is being used in professional work, daily tasks, business strategy, and beyond. From generating PowerPoint slides to coding software applications, you’ll see that the possibilities are as wide as they are exciting. In each case, we’ll provide specific examples, tools and practical tips on how you can start leveraging GenAI today. Continue to the next section to explore.

Learn More

1. Microsoft GenAI Basics

https://www.linkedin.com/learning/what-is-generative-ai/generative-ai-is-a-tool-in-service-of-humanity

2. Introduction to Generative AI – Art of the Possible by Amazon

The Introduction to Generative AI – Art of the Possible course provides an introduction to generative AI, use cases, risks and benefits. With the help of a content generation example, we illustrate the art of the possible.

By the end of the course, learners should be able to describe the basics of generative AI, its risks and benefits. They should also be able to articulate how content generation can be used in their business.

  • Course level: Beginner
  • Duration: 1 hour

https://explore.skillbuilder.aws/learn/course/external/view/elearning/17176/introduction-to-generative-ai-art-of-the-possible

3. Microsoft Azure AI Fundamentals: Generative AI

https://learn.microsoft.com/en-us/training/paths/introduction-generative-ai

4. Generative AI for Everyone by DeepLearning.ai

Learn how generative AI works, and how to use it in your life and at work

  • Learn directly from Andrew Ng about the technology of generative AI, how it works, and what it can (and canโ€™t) do
  • Get an overview of AI tools, and learn from real-world examples of generative AI in use today
  • Understand the impacts of generative AI on business and society to develop effective AI strategies and approaches

https://www.deeplearning.ai/courses/generative-ai-for-everyone

4. What are Transformers (Machine Learning Model)?

Transformers? In this case, we’re talking about a machine learning model, and in this video Martin Keen explains what transformers are, what they’re good for, and maybe … what they’re not so good at for.

Click here to display content from YouTube.
Learn more in YouTubeโ€™s privacy policy.

5. Your Guide to Generative AI by Learnprompting.org

https://learnprompting.org

6. ChatGPT Prompt Engineering for Developers (short course by DeepLearning.ai)

https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers

7. Foundations of Prompt Engineering by Amazon

In this course, you will learn the principles, techniques, and the best practices for designing effective prompts. This course introduces the basics of prompt engineering, and progresses to advanced prompt techniques. You will also learn how to guard against prompt misuse and how to mitigate bias when interacting with FMs.

  • Course level: Intermediate
  • Duration: 4 hours

Activities

This course includes eLearning interactions.

Course objectives

In this course, you will learn to:

  • Define prompt engineering and apply general best practices when interacting with FMs
  • Identify the basic types of prompt techniques, including zero-shot and few-shot learning
  • Apply advanced prompt techniques when necessary for your use case
  • Identify which prompt-techniques are best-suited for specific models
  • Identify potential prompt misuses
  • Analyze potential bias in FM responses and design prompts that mitigate that bias

Intended audience

This course is intended for:

  • Prompt engineers, data scientists, and developers

Prerequisites

We recommend that attendees of this course have taken the following courses:

  • Introduction to Generative AI – Art of the Possible (1 hour, digital course)
  • Planning a Generative AI Project (1 hour, digital course)
  • Amazon Bedrock Getting Started (1 hour, digital course)

Course outline

Introduction

  • Introduction
  • Basics of Foundation Models
  • Fundamentals of Prompt Engineering

Prompt Types and Techniques

  • Basic Prompt Techniques
  • Advanced Prompt Techniques
  • Model-Specific Prompt Techniques
  • Addressing Prompt Misuses
  • Mitigating Bias

Conclusion

  • Course Summary

Lesson descriptions

Lesson 1: Basics of Large Language Models

In this lesson, you will develop a fundamental understanding of foundation models (FMs), including an understanding of a subset of FMs called large language models (LLMs). First, you will be introduced to the basic concepts of a foundation model such as self-supervised learning and finetuning. Next, you will learn about two types of FMs: text-to-text models and text-to-image models. Finally, you will learn about the functionality and use cases of LLMs, the subset of foundation models that most often utilize prompt engineering.

Lesson 2: Fundamentals of Prompt Engineering

In this lesson, you are introduced to prompt engineering, the set of practices that focus on developing, designing, and optimizing prompts to enhance the output of FMs for your specific business needs. This lesson first defines prompt engineering and describes the key concepts and terminology of prompt engineering. Then, the lesson uses an example prompt to show the different elements of a prompt. Finally, the lesson provides a list of general best practices for designing effective prompts.

Lesson 3: Basic Prompt Techniques

In this lesson, you will learn about basic prompt engineering techniques that can help you use generative AI applications effectively for your unique business objectives. First, the lesson defines zero-shot and few-shot prompting techniques. Then, the lesson defines chain-of-thought (CoT) prompting, the building block for several advanced prompting techniques. This lesson provides tips and examples of each type of prompt technique.

Lesson 4: Advanced Prompt Techniques

In this lesson, you will be introduced to several advanced techniques including: Self Consistency, Tree of Thoughts, Retrieval augmented generation (RAG), Automatic Reasoning and Tool-use (ART), and Reasoning and Acting (ReAct). Examples are provided to show each technique in practice.

Lesson 5: Model-specific Prompt Techniques

In this lesson, you will learn how to engineer prompts for a few of the most popular FMs including Amazon Titan, Anthropic Claude, and AI21 Labs Jurassic-2. You will learn about the different parameters you can configure to get customized results from the models. Next you will learn about prompt engineering best practices for each of the models.

Lesson 6: Addressing Prompt Misuses

In this lesson, you will be introduced to adversarial prompts, or prompts that are meant to purposefully mislead models. You will be learning about prompt injection and prompt leaking, two types of adversarial prompts. You will be provided with examples of each.

Lesson 7: Mitigating Bias

In this lesson, you will learn how bias is introduced into models during the training phase and how that bias can be reproduced in the responses generated by an FM. You will learn how biased results can be mitigated by updating the prompt, enhancing the dataset, and using training techniques.

Keywords

  • GenAI
  • Generative AI

https://explore.skillbuilder.aws/learn/course/external/view/elearning/17763/foundations-of-prompt-engineering

8. Creating better prompts for ChatGPT

https://groove.ai/case-study-6

9. Generative AI Learning Plan for Decision Makers by Amazon

A Learning Plan pulls together training content for a particular role or solution, and organizes those assets from foundational to advanced.   Use Learning Plans as a starting point to discover training that matters to you.

 This learning plan is designed to introduce generative AI to the business and technical decision makers. The digital training included in this learning plan will provide an overview of generative AI, and the approach to plan a generative AI project and to build a generative AI-ready organization.

 Are you wondering why your completion percentage has changed when you havenโ€™t completed any new training? It changes as you complete training, and when we add, remove, and update training content.

https://explore.skillbuilder.aws/learn/public/learning_plan/view/1909/generative-ai-learning-plan-for-decision-makers

Comments

Leave a Reply

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