Thursday, 7 September 2023

Leveraging Generative AI

What is GAN (Generative something Network)?

Artificial Intelligence - smart robots that can sense

Machine Learning - something is improved (uses statistics) E.g. Spam filter.

Data + predictions = Machine Learning (Features - data we give it, Label - the prediction)

This is called supervised learning.

EG Captcha human test (choose pictures with bicyles)

Deep Learning - (uses 'neural network') eg Google Lens, Noise surpression on Zoom calls

Generative AI - uses neural networks to 'create' new/novel content.

Data (collection of facts): sturctured/unstructured/semi structured

Publicly available data sets: https://www.kaggle.com/

Feed data into Teachable Machine (or TEnsor flow)

Sure, here is a lesson plan to teach students about machine learning using Teachable Machine:

Lesson Objectives:

  • Students will be able to define machine learning.
  • Students will be able to explain the difference between supervised and unsupervised learning.
  • Students will be able to use Teachable Machine to create a machine learning model.

Materials:

  • Computer with internet access
  • Teachable Machine website
  • Images or videos of the objects or activities that students want to classify

Procedure:

  1. Begin by asking students what they know about machine learning. What is it? How does it work?
  2. Explain that machine learning is a type of artificial intelligence that allows computers to learn without being explicitly programmed. There are two main types of machine learning: supervised learning and unsupervised learning.
  3. In supervised learning, the computer is given a set of labeled data. The labels tell the computer what the data is about. For example, if the computer is being trained to classify images of cats and dogs, the labeled data would include images of cats with the label "cat" and images of dogs with the label "dog".
  4. In unsupervised learning, the computer is not given any labeled data. The computer must learn to find patterns in the data on its own. For example, if the computer is being trained to cluster images of animals, it would need to find patterns in the images to determine which images belong to the same cluster.
  5. Introduce students to Teachable Machine. Explain that Teachable Machine is a web-based tool that makes it easy to create machine learning models.
  6. Have students choose an object or activity that they want to classify. For example, they could choose to classify images of cats and dogs, or they could choose to classify audio recordings of different musical instruments.
  7. Have students collect images or videos of the objects or activities that they want to classify.
  8. Have students use Teachable Machine to create a machine learning model. Teachable Machine will guide students through the process of creating a model.
  9. Have students test their machine learning model. They can do this by feeding the model new data that it has not seen before.
  10. Have students discuss the results of their experiment. How well did their machine learning model perform? What could they do to improve their model?

Assessment:

  • Students will be assessed on their ability to define machine learning, explain the difference between supervised and unsupervised learning, and use Teachable Machine to create a machine learning model.

Differentiation:

  • For students who are struggling, provide them with more scaffolding. For example, you could provide them with pre-labeled data or you could walk them through the process of creating a machine learning model step-by-step.
  • For students who are ahead, challenge them to create a more complex machine learning model. For example, they could try to classify images of different breeds of dogs or they could try to classify audio recordings of different musical instruments.

I hope this lesson plan is helpful!

https://mycomputerbrain.net/


When we don't have labels, this is unsupervised machine learning.


Thumbs up or thumbs down in ChatGPT/Bard is the Measure effectiveness. This 'Supervised Learning' helps confirm the 'unsupervised learning' model.

"Put people in the room into two categories" (tall/short, male/female, ethnicity, fat/thin....)

Example of mis categorisation - Gorrillas (problem in 2015 so removed gorilla label, algorithms still can't pick up gorilla's...)




Link to Slide Deck for using AI in Engineering process






The overall message of the graphic organizer is that Maori people need to take control of their own data and protect their language from colonization. This can be done by identifying where their data is stored, developing their own data storage and processing systems, and creating copyright laws to protect their code. It is also important to work together to push boundaries and ensure that Maori perspectives are taken into account in the development of AI technologies.





Prompt Engineering  - produced desired outcome utilising the patterns these models have learned on.

Cha 1: Role (name)
Cha 2: Feature (input)
Cha 3: Label (output)

You are XXX [name], you are a  xxxxx {Role/Task/Personal]. I'll give you YYYY {feature} and your task is to YYYYY [label]. If you understand this request, please say yes.

Persona | Reverse Persona (AI prompts us) | One-shot Learning (give examples to sort)

You are AI super student, you are a student studying Artificial Intelligence. . I'll give you a topic and your task is to provide a summary of this topic. If you understand this request, please say yes.

Yes, I understand. I am AI Super Student, a student studying Artificial Intelligence. I will do my best to provide a comprehensive and informative summary of any topic you give me.

Please note that I am still under development, and I may not be able to answer all of your questions perfectly. However, I will try my best to provide you with the most accurate and up-to-date information possible.

Prompt engineering

Prompt engineering is the process of designing and optimizing prompts for generative AI models. Generative AI models are a type of artificial intelligence that can generate text, images, code, and other creative content. Prompts are the instructions that are given to these models to guide their output.

Prompt engineering is important because it can help to improve the quality and relevance of the output generated by generative AI models. It can also help to reduce the amount of trial and error required to generate the desired output.

There are a number of different techniques that can be used in prompt engineering. Some of the most common techniques include:

Using clear and concise language: Prompts should be written in clear and concise language that is easy for the generative AI model to understand.
Providing examples: Providing the generative AI model with examples of the desired output can help it to better understand what you are trying to achieve.
Using negative examples: Providing the generative AI model with negative examples of the undesired output can help it to avoid generating similar output.
Using special modifiers: Some generative AI models support special modifiers that can be used to control the output. For example, you can use a modifier to specify the style of the output, the tone of the output, or the length of the output.
Prompt engineering is a powerful skill that can be used to unlock the full potential of generative AI models. It is still a relatively new field, but it is rapidly evolving. As more people learn about prompt engineering and develop new techniques, it is likely to become an increasingly important part of the generative AI workflow.

Here are some examples of how prompt engineering can be used:

A writer can use prompt engineering to generate ideas for new stories or articles.
A designer can use prompt engineering to generate new design concepts.
A software developer can use prompt engineering to generate code snippets or to test new algorithms.
A teacher can use prompt engineering to generate personalized learning materials for their students.
Prompt engineering is a powerful tool that can be used for a wide variety of tasks. As generative AI models continue to improve, prompt engineering is likely to become even more important in the future.

Reverse Persona


Template: You are XXXXX[Name]. I would like you to ask me questions to achieve XXXXXX [feature]. You should ask questions until you have sufficient information on YYYYYY [label]. If you understand this request, please ask the first question

Google Bard prompt

You are an expert in teaching independent student projects. I would like you to ask me questions to achieve creating a template for a process journal that has clear instructions for students. You should ask questions until you have sufficient information to produce a template for this process journal. Ask me one question at a time. If you understand this request, please ask the first question

Eventual output


Sure. Here are some examples of specific questions that students could answer in their journal at each stage of the independent student project:

Identifying the problem

  • What is the problem that you want to solve?
  • Why is this problem important?
  • Who is affected by this problem?
  • What are the consequences of the problem?
  • What are the challenges involved in solving the problem?

Understanding the problem

  • What are the root causes of the problem?
  • What are the different factors that contribute to the problem?
  • What research has been done on this problem?
  • What are the different perspectives on the problem?
  • What are the potential solutions to the problem?

Coming up with ideas to solve the problem

  • What are some creative ways to solve the problem?
  • What are the benefits and drawbacks of each potential solution?
  • Which solution is most feasible and sustainable?
  • How will you implement your solution?
  • What are the potential risks and challenges involved in implementing your solution?

Creating the solution that will have impact

  • How will you measure the success of your solution?
  • How will you ensure that your solution has a positive impact on the people or community that it is designed to help?
  • What are the next steps for your project?

In addition to these specific questions, students could also be encouraged to reflect on their learning and growth throughout the project. This could include questions like:

  • What have I learned about myself during this project?
  • What challenges have I faced and how have I overcome them?
  • How has my understanding of the problem changed over time?
  • What am I most proud of in terms of my work on this project?
  • What would I do differently if I had the chance to do this project over again?

Act as a Socratic seminar


I want you to act as Socrates. You must use the Socratic method to questioning my beliefs, looking for logical weakness. I will make a statement and you will attempt to further question every statement in order to test my logic. My first claim is “justice is necessary in a society”. Ask me one question at a time.

View other drafts

Named Persona

Important so users can go back to it again and again.

Use a perfect prompt example and get AI to create subseqent prompts


One shot Learning



  • One-Shot Learning
    • Model learns from a single example
  • Few-Shot Learning
    • Model learns from a small dataset of examples (i.e about 50-100)
  • Effective for tasks:
    • Categorising (e-mails)
    • Labelling (reviews)
    • Following patterns (repetitive tasks)
Prompt

You are XXXXX[Name]. Your goal is to YYYYYYY [Goal]. To aid with your goal, you’ll be given some examples [EXAMPLE] which contains [INPUT] and [OUTPUT]. Your task is to generate [OUTPUT] based on the learned [EXAMPLE]. You’ll be given a [INPUT] to begin with. If you understand reply with a yes and ask for [EXAMPLES]

Then you’ll provide some examples with [EXAMPLE] and then finally, you’ll give an [INPUT]


Chain of thought


You can use this type of prompt if trying to confirm a one shot learning model and make is avoid haveing hallucinations (see linked video example)

"Identify and behave as three different experts that are appropriate to answer why [TOPIC] was marked as college basketball earlier. All experts will write down the step and their thinking about the step, then share it with the group. Then, all experts will go on to the next step, etc. At each step, all experts will score their peers’ responses between 1 and 5, 1 meaning it is highly unlikely, and 5 meaning it is highly likely. If any expert is judged to be wrong at any point then they leave. After all experts have provided their analysis, you then analyse all 3 analyses and provide either the consensus solution or your best guess solution."

Include in your prompt: "Think carefully and logically, explaining your answer"







No comments:

Post a Comment