Introduction
Welcome to the first skill of the AI Vibe Coding & Security: ChatGPT, Cursor & TDD course! In this course, we'll explore the main types of AI at a practical level, so you understand what's really happening behind the scenes when you Vibe Code. Don't worry, we'll define vibe coding later, but for now, this is when you describe what you want, the AI drafts, and together, you refine the code. It's about understanding enough to steer the vibe, not just copy the code blindly.
We'll also dive into prompt engineering, the art of communicating clearly with AI. Think of it as learning to ask the right question, in the right way, so you get a meaningful, reliable output from your coding assistant.
This course is made up of six skills where you'll move from understanding how AI thinks to building your own web projects step by step with HTML, CSS, and JavaScript.
Knowledge Check
This AI mini course 'AI Vibe Coding & Security: ChatGPT, Cursor & TDD' is focused on teaching how to code from scratch
- AThe course 'AI Vibe Coding & Security: ChatGPT, Cursor & TDD' is focused on teaching how to code from scratch.
- BFALSE
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
What is AI?
In this video, we explore what Artificial Intelligence really is and how it fits into different categories of technology. Together, we will look at how AI systems learn from data, how Machine Learning and Deep Learning connect, and where generative AI fits in. By building a simple mental model, we will begin to understand how these ideas relate to the tools we use for Vibe Coding with AI and why thinking about security from the start is imperative.
Knowledge Check
Which of the following is a subset of machine learning that uses layered neural networks for tasks such as vision, speech, and language?
- ADeep learning
- BGenerative AI
- CSupervised learning
- DReinforcement learning
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Understanding Karpathy’s Software Evolution Framework
In the following video, we explore how programming has evolved from writing traditional code to communicating with AI through plain language. Together, we will look at Andrej Karpathy’s framing of Software 1.0, 2.0, and 3.0 to understand how each stage changes the way behavior is created - first through explicit rules, then through learning from data, and finally through prompts.
Knowledge Check
What is the primary characteristic of Software 1.0?
- ADeterministic and precise
- BNon-deterministic and flexible
- CLearns from data and adjusts behavior
- DProgrammed using plain language prompts
- ERelies on neural networks and weights
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Software 1.0
In this video, we explore the foundations of software 1.0, where every action a program takes is defined by the code itself. We will see how explicit logic using clear rules and structures shapes predictable behavior in traditional programming. Through simple examples, we will begin to understand how writing and adjusting code forms the basis of how computers follow instructions.
Colab Notebook:
Number Game:
import random
import sys
import time
BANNER = r"""
____ _ _ _ _
/ ___| _ _ ___ ___ ___| |_ | \ | | ___ _ _ _ __ ___| | ___ _ __
\___ \| | | |/ __/ _ \/ __| __| | \| |/ _ \| | | | '__/ _ \ |/ _ \| '__|
___) | |_| | (_| __/\__ \ |_ | |\ | (_) | |_| | | | __/ | (_) | |
|____/ \__,_|\___\___||___/\__| |_| \_|\___/ \__,_|_| \___|_|\___/|_|
"""
def slow_print(text, delay=0.01):
for c in text:
print(c, end="")
sys.stdout.flush()
time.sleep(delay)
print()
def choose_difficulty():
print("\nChoose difficulty:")
print(" 1) Easy (1–50, 10 guesses)")
print(" 2) Normal (1–100, 10 guesses)")
print(" 3) Hard (1–200, 8 guesses)")
print(" 4) Insane (1–1000, 12 guesses, but hotter/colder only)")
while True:
choice = input("Enter 1/2/3/4: ").strip()
if choice in {"1","2","3","4"}:
if choice == "1": return (1, 50, 10, True)
if choice == "2": return (1, 100, 10, True)
if choice == "3": return (1, 200, 8, True)
if choice == "4": return (1, 1000, 12, False)
print("Invalid choice. Try again.")
def get_hint(target, guess, last_diff=None, show_direction=True):
diff = abs(target - guess)
direction = ""
if show_direction:
direction = "Too high!" if guess > target else "Too low!"
# qualitative heat hint
if diff == 0:
heat = "Exactly right!"
elif diff <= 3:
heat = "Scorching! 🔥"
elif diff <= 7:
heat = "Hot! ♨️"
elif diff <= 15:
heat = "Warm 🙂"
elif diff <= 30:
heat = "Cool 😐"
else:
heat = "Cold 🧊"
colder_or_warmer = ""
if last_diff is not None:
if diff < last_diff:
colder_or_warmer = " Warmer ↑"
elif diff > last_diff:
colder_or_warmer = " Colder ↓"
else:
colder_or_warmer = " Same distance →"
parts = [p for p in [direction, heat + colder_or_warmer] if p]
return " | ".join(parts), diff
def play_round():
low, high, tries, show_direction = choose_difficulty()
target = random.randint(low, high)
used = 0
last_diff = None
print(f"\nI'm thinking of a number between {low} and {high}.")
print(f"You have {tries} guesses. Good luck!\n")
while used < tries:
raw = input(f"Guess {used+1}/{tries}: ").strip()
if raw.lower() in {"q","quit","exit"}:
print("Exiting to menu.")
return None # user quit this round
if not raw.lstrip("-").isdigit():
print("Please enter an integer.")
continue
guess = int(raw)
if guess < low or guess > high:
print(f"Stay within range {low}–{high}.")
continue
used += 1
if guess == target:
print(f"🎉 Correct! The number was {target}. You used {used} guesses.")
return used
hint, last_diff = get_hint(target, guess, last_diff, show_direction)
print(hint)
print(f"\nOut of guesses! 😢 The number was {target}.")
return tries + 1 # penalty bigger than any win
def main():
print(BANNER)
slow_print("Welcome to Guess The Number!\n", delay=0.005)
best = None
while True:
result = play_round()
if result is None:
# user returned early to menu
pass
else:
if result <= 12: # arbitrary cap: only count reasonable wins
if best is None or result < best:
best = result
print(f"🏆 New personal best: {best} guesses!")
else:
print("Keep at it—you've got this!")
again = input("\nPlay again? (y/n): ").strip().lower()
if again not in {"y","yes"}:
if best is not None:
print(f"\nYour best this session: {best} guesses. Thanks for playing!")
else:
print("\nThanks for playing!")
break
print("\n" + "-"*60 + "\n")
if __name__ == "__main__":
main()Knowledge Check
When writing a program in Software 1.0, what must a developer do to change how it responds to new input?
- ARetrain the model with more examples.
- BAdjust the prompt wording.
- CRewrite or edit the underlying code.
- DCollect feedback to update the weights.
- EAdd unlabeled data to improve accuracy.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Software 2.0
In this video, we explore Software 2.0, where programs learn patterns from data instead of relying on hand-written rules. Together, we will see how a model can be trained to recognize examples using Google’s Teachable Machine and how this approach represents a shift from coding logic to guiding learning through data.
Knowledge Check
What is a key characteristic of Software 2.0?
- APrograms learn patterns from data instead of relying on hand-written rules.
- BPrograms rely heavily on if-else statements and loops.
- CPrograms are primarily written in assembly language.
- DPrograms require manual updates for every new data input.
- EPrograms do not use any form of machine learning.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Software 3.0
In this video, we explore Software 3.0, where we program with plain language prompts instead of writing code or retraining models. We will also note how this approach differs from Software 1.0 and Software 2.0 for a clear foundation for the upcoming quick overview of prompt engineering.
Knowledge Check
What best describes the main difference between Software 2.0 and Software 3.0 in the context of Vibe Coding?
- ASoftware 2.0 writes explicit rules while Software 3.0 learns from labeled data.
- BSoftware 2.0 learns from data through training, while Software 3.0 uses prompts in plain language to steer model behavior.
- CSoftware 2.0 and Software 3.0 both require retraining models for every task.
- DSoftware 2.0 replaces coding with visual interfaces for programming
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Challenge 🎉
Congrats on making it to the end of the skill and to the challenge! Your task is to answer the questions below to ensure you understand key concepts about how AI systems progress from traditional coding to data-driven learning and modern prompting. Take a moment to reflect on what connects each stage before moving on to the next skill.
Knowledge Check
Which of the following are considered subdomains or types of Artificial Intelligence (AI)? (Select three)
- AMachine Learning
- BDeep Learning
- CGenerative AI
- DBlockchain
- EQuantum Computing
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Knowledge Check
Which of the following statements about AI and its subdomains are true? (Select three)
- AMachine learning is a subset of AI that learns patterns from data using algorithms.
- BDeep learning is a subset of machine learning that uses neural networks.
- CGenerative AI is built on deep learning and focuses on generating content.
- DAI is solely about chatbots like ChatGPT.
- EDeep learning does not involve neural networks.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Knowledge Check
Which of the following statements are true about Software 1.0, 2.0, and 3.0 as described by Andrej Karpathy? (Select three)
- ASoftware 1.0 involves traditional programming with explicit rules.
- BSoftware 2.0 allows computers to learn rules from data through training and fine-tuning.
- CSoftware 3.0 involves programming using plain language prompts.
- DSoftware 1.0 is non-deterministic and can produce different outputs for the same input.
- ESoftware 2.0 requires explicit coding of every behavior.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Knowledge Check
Which of the following statements about Software 1.0 and programming in Python are true? (Select three)
- AIn software 1.0, program behavior is defined by explicit rules written in code.
- BPython is designed to be more human-readable compared to languages closer to machine code.
- CTo change a program's behavior in software 1.0, you must edit the code.
- DSoftware 1.0 programs learn from data to change behavior.
- EPython is primarily used for low-level machine programming.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Knowledge Check
Which of the following statements about Software 2.0 and the use of Google's Teachable Machine are true? (Select three)
- ASoftware 2.0 learns patterns from data instead of relying on hand-written rules.
- BGoogle's Teachable Machine can create models using images, audio, or video.
- CBias in training data can affect the fairness of the model's predictions.
- DSoftware 2.0 requires writing if-else statements and loops by hand.
- ETeachable Machine only works with image data.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
Knowledge Check
Which of the following statements about Software 3.0 and vibe coding are true? (Select three)
- ASoftware 3.0 involves programming with plain language prompts.
- BPrompts in Software 3.0 do not retrain the model but steer its behavior in real-time.
- CVibe coding uses prompts to condition the model's short-term behavior
- DSoftware 3.0 requires writing traditional code.
- EPrompts in Software 3.0 change the internal weights of the model.
Verify your team's readiness — Request a Demo to verify practice assessments, completion reporting, and CSV / SCORM exports on the Team plan.
View Transcript
Introduction
0:00Hello and welcome to the first skill in the AI Vibe Coding and Security with
0:06ChatGPT, Cursor and TDD course. In this course, we'll explore the main types of
0:13AI at a practical level so you can understand what's really happening
0:18behind the scenes when you vibe code. And don't worry, we'll define vibe coding
0:23later. But for now, this is when you describe
0:26what you want, the AI drafts, and together you refine the code.
0:31It's about understanding enough to steer the vibe, but not just copy and paste
0:37the code blindly. That's why we have security in the title of this course.
0:43You'll see how tools like ChatGPT and Cursor use different kinds of AI to
0:48reason, generate, and assist, and why understanding that helps you write
0:54safer, smarter prompts. But first, I do want to let you know that this course
0:59is part of an AI series of mini courses. And we are here, AI Vibe Coding and
1:06Security. The recommended path is to take this first because we'll learn
1:12prompt engineering in depth. We do cover prompt engineering in the AI Vibe
1:18Coding and Security, but it's just a mini crash course.
1:21Ideally, you would have AI prompt engineering under your belt, but if not,
1:26you can definitely start with AI Vibe Coding. And then you can move on to
1:31AI agentic coding, which we get much deeper into the different tools,
1:35including Cloud Code and Copilot. If you're working with Microsoft products,
1:41you might enjoy this course, AI Essentials with Microsoft Copilot.
1:45But if you're looking for an ecosystem agnostic approach to AI, then you might
1:51consider AI Productivity for Professionals. If you're trying to launch a
1:55product, this is a great one, Artificial Intelligence for Executives and Leaders.
2:00And these two courses go hand in hand, depending on your background.
2:03If you're a developer, then the AI Compliance, Privacy, and Copyright for
2:08Developers is a great course to take. Conversely, you can take the HR, Legal,
2:14and IT, which is for non-technical audiences. And together, all of these
2:19courses give you a great foundation on using AI right away.
2:24But first, what's in this course and what is not in this course?
2:28In scope, we'll identify the differences between main types of AI. The takeaway
2:34here is that AI isn't just one thing, and it's not just chat GPT. There are
2:39many different approaches, and we'll explore that in this first skill.
2:43In the next skill, we'll dive into understanding basic prompt engineering
2:47for vibe coding. Again, in this case, we're really thinking about a mini
2:52crash course. If you want the full course, it's still a mini course, but at
2:57least it's all about prompt engineering. And even in that mini course, we're
3:02just scratching the surface. So this is a great skill to have.
3:05And finally, we'll plan, build, and test code with chatbots like chat GPT and
3:11later, agentic tools such as Cursor. But here is what is out of scope. We're
3:16not learning how to code. I highly recommend learning how to code, and
3:21doing so with a chatbot or maybe an agentic tool like Cursor is an
3:26incredible way to learn, and it's a faster way to learn. In fact, I'm
3:31jealous that you get to learn how to code if that's your path. I had to do it
3:35the hard way without AI at all, and it was a lot of reading documentation, a
3:40lot of reading books, and so on and so forth, trial and error, making
3:44mistakes. But with AI, you can learn at lightning speeds. And there are no
3:50tutorials on how to build your own AI chatbots. I do have courses that give
3:55you the foundation for that, but that is not in this course. For those, check
4:00out TensorFlow developer course and the introduction to machine learning and
4:04introduction to deep learning courses. We also will not use APIs. API just
4:10means no use of computer to computer connections. And that's how you build
4:14chatbots, by the way. So again, we're not going into those. Although exciting,
4:19it's not part of this course. Now a little bit about me. I'm Jonathan
4:23Barrios, and I teach data science, machine learning and deep learning.
4:27Previously, I was a full stack developer and have worked with AI and built
4:32SAS applications, AI applications and streaming platforms. I'm a veteran
4:37trainer, and I've been teaching for a while at top platforms such as
4:41Treehouse, Thinkful and Chag. And now I'm happy to be part of the CBT Nuggets
4:46team. You can find me on LinkedIn at Jonathan-Barrios-AI and at my website,
4:52JonathanBarrios.com. And then finally here at X at AI underscore data
4:58underscore science. And this is a great example of what my field is called.
5:02At least that's what I call it. AI data science. That is my background. I have
5:0750% AI engineering and 50% data science and combined. I just call it AI data
5:13science. And one note on X. A lot of people either love it or hate it. But if
5:20you're into AI like me, it's a great resource. And I only follow people who
5:26talk about AI and machine learning. And turns out that's where the community is.
5:31Everybody else, quite frankly, I ignore. And that's because I consider social
5:35media to be a waste of time. Time is very, very valuable. And whatever time
5:40that I do have left after all of the work that I do with AI, I'm not going to
5:44spend it on social media. So if you want to follow me and other people that talk
5:50about AI, you can learn so much and stay apprised of all the upcoming changes of
5:56all of the new developments, which happen almost daily. And that way it's better
6:01than a newsletter. All right. In this course, we're going to explore the AI
6:06behind vibe coding tools. And we'll also dive into prompt engineering, which is
6:11the art of communicating clearly with AI. As you'll learn, I really see prompt
6:17engineering as programming in plain language. This will make sense by the end
6:24of this skill. When you're thinking about all of the six skills that you'll take
6:28in this course, I can break it down like this. We'll start with how AI thinks to
6:34help build your own projects step by step. First, we'll start with AI and
6:40prompt engineering, and then we'll use CodePen to try out code without AI. And
6:47then we'll introduce it with chat GPT. And then we'll add cursor to the mix,
6:52which is an AI agentic tool. And each one of these work together to help us plan
6:58build and debug our apps. And when you look at TDD, if you're wondering what this
7:03is, this is test driven development. That means test your code like the
7:09professionals do. Even if you're using AI, you'll learn why that is very, very
7:14powerful. And then we'll take what you learned in prompt engineering and apply
7:19it with code. So code plus prompt engineering. And we'll apply that with
7:25HTML, CSS, and JavaScript. And finally, we'll take everything that we learned and
7:31add version control, which is GitHub. But then we'll launch a website using
7:36GitHub pages. I should say that skills one and two are here. And this is skill
7:42three, skill four, skill five, and then skill six. So that's how these six skills
7:48are distributed. AI and prompt engineering are the first two. So I kind
7:52of lumped them in the first one. I just wanted to clear that up. Now let's take
7:56a look at what we're going to cover in this skill. And just remember that this
8:00course is a mini course. So we're only going to scratch the surface. So if you
8:05want a full course on vibe coding or any of the other mini courses, just let us
8:10know in the comments. That is precisely the data that we need in order to make
8:15the courses that you want. For example, there's so much more that we can get
8:19into, like replit, lovable, V zero. These are all different tools that are great
8:25for five coding. We're just going to get into GitHub pages and just really focus
8:30on this mini course. All right. Now that we've gotten that out of the way in this
8:35skill, we're going to explore what is AI really? It isn't just one thing. And
8:41number two, AI can be super confident, plus super wrong at the same time. And
8:48this is why prompt engineering and testing is so important. And then we're
8:52going to break down AI into a mental model. This mental model is going to be
8:57very simple because you need to think about this as you're working with AI. So
9:02we're going to break it down into three types of software, 1.0, 2.0 and 3.0. This
9:10is going to be a very powerful, but very simple mental model. And then we'll
9:15apply each one, meaning we're going to build in software 1.0, which is
9:20traditional programming. Just give you a preview there. Then we're going to use
9:24deep learning to build our own neural network. If that sounds intimidating,
9:30don't worry. It's going to be super easy and we'll use no code to build that
9:34model. And finally, 3.0 is generative AI. That just means chat GPT. So we're
9:40going to tour the different types of AI, but thinking about them as types of
9:45software, which makes it a much simpler task to build our mental model that
9:50we'll use as a foundation for the entire course. And by the end of this skill,
9:56you'll know what AI really is, why it sometimes fails in a spectacular manner
10:02and how to talk to it like a tool instead of a human. All right. I will see
10:07you in that very first video. What is AI really and how it's more than just
10:12generative AI.
What is AI?
0:00Welcome back.
0:01For this course, you don't need a programming background.
0:04You can be a beginner.
0:06And that's why vibe coding is so powerful and fun.
0:10And that's why I love vibe coding,
0:12because it really democratizes programming for everybody.
0:16However, security becomes a key component.
0:20And the way that we can mitigate this
0:22is by building a mental model
0:24to truly understand what AI is.
0:26And the most important thing that I want you to take away
0:29is that AI isn't one thing.
0:32It's a whole umbrella of different technologies
0:35that learn, adapt, and even create.
0:38And at the broadest level,
0:40these AI systems learn patterns from data
0:43and use them to make predictions, decisions,
0:45and even content.
0:47And if you're like many people,
0:49you think that chat is AI, which is not wrong,
0:52but it's not the complete picture.
0:55For example, when you're vibe coding
0:57with tools like ChatGPT or Cursor,
1:00meaning you are working with AI in some way
1:03to generate code with a chat bot,
1:06you're working with something called generative AI
1:09that's built on top of other AI technologies.
1:13So gen AI or generative AI is what ChatGPT is,
1:18but that's not what AI is,
1:20or at least that is not all that AI is.
1:24Everybody thinks, oh, AI is ChatGPT.
1:27Those chat bots that seem human.
1:29And while that does make complete sense,
1:32it's partially true.
1:34So now we build our mental model.
1:36Let's try to understand the main components of AI
1:40and then distill them into different types of software.
1:44And this is the essential core
1:45that you need to become a vibe coder
1:48that also navigates safety
1:51so that you create code and understand it
1:54and don't create security vulnerabilities,
1:57which is super easy to do
1:59if you don't have a programming background.
2:01So under the umbrella term AI,
2:04there are rules, search, machine learning,
2:07deep learning, generative AI.
2:08There are many different things,
2:10but for our context of this course,
2:13we're gonna simplify this to the main domains.
2:17So we know that the umbrella term here
2:20is artificial intelligence,
2:22but inside of that,
2:23we have different kinds of technologies
2:26that can learn on their own,
2:28meaning that they learn from the data.
2:30And while we could go into this,
2:32which many courses do,
2:33they'll talk about supervised and unsupervised,
2:36self-supervised and reinforcement learning.
2:39These are the different types of learning.
2:41They're not super helpful
2:43unless you're gonna become an engineer or a data scientist,
2:47or maybe even a deep learning engineer.
2:49Those are the nuances that you need,
2:52but for AI vibe coding with security in mind,
2:55we just need to understand that machine learning
2:57and deep learning are types of AI that learn from data.
3:02These are the main subsets.
3:04So machine learning.
3:06These models learn patterns from data,
3:08like predicting stock prices.
3:11Maybe they can detect spam or make video recommendations,
3:15but they're using algorithms.
3:17So machine learning is a subset of AI,
3:21and deep learning is a subset of machine learning.
3:24So what is deep learning?
3:26Deep learning uses layered neural networks
3:29for vision, speech, and language tasks.
3:32It's very similar to machine learning
3:35in that they both learn from data.
3:37But the main distinction is that machine learning
3:40learns from algorithms,
3:42and deep learning uses neural networks.
3:46So what does that mean?
3:47Well, it's software modeled after the brain.
3:50So much like the human brain that has neurons
3:53that are connected together to form these neural networks,
3:57we've created software that mimics the human brain,
4:00and that's why ChatGPT seems so powerful
4:04and pretty much like you're talking to a human.
4:07We've learned to mimic that process.
4:09But ChatGPT isn't really called deep learning.
4:12It's called generative AI,
4:15and this is the new kid on the block.
4:17These are the models like ChatGPT,
4:19Claude, Grok, or Gemini,
4:22that can create text that seems so lifelike
4:25that it's hard to tell the difference
4:27between a person and a model.
4:29It also generates code,
4:31and that's why we're using it for vibe coding,
4:34but it can also generate images and even music.
4:37So generative AI is just one slice of the AI pie.
4:43And as you can imagine, this can be confusing
4:45because it can be applied to vision, speech, text,
4:49or natural language processing.
4:51It can make recommendation.
4:52It can be used with robotics,
4:54which is pretty much self-driving cars,
4:56and on and on and on.
4:57So we need to simplify this so that we can use this.
5:01When we're thinking about AI and its subdomains
5:04like machine learning and deep learning,
5:07in gen AI, let's add them here.
5:10In AI, let's add them here.
5:12We could talk about supervised learning,
5:14which is like using flashcards
5:16where the model learns from labeled examples.
5:19We could do that, but instead of doing that
5:22and then trying to tie them
5:23to all of these different applications or use cases of AI,
5:27we're gonna use a hamburger and a hot dog.
5:30These two are gonna be our labeled examples,
5:33and we're gonna build a deep learning model
5:35so you can understand how that works,
5:38but we're not gonna call it supervised learning.
5:40I mean, I've told you that's what it is,
5:42but it's not directly helpful to get into that detail.
5:46What's more important is to build this mental model,
5:48and we're gonna use three types of software.
5:50When we're talking about machine learning and deep learning,
5:53we're talking about software 2.0,
5:56but now I'm getting ahead of myself.
5:58I'll be sure to explain exactly
6:00what software 1.0, 2.0, and 3.0 mean,
6:04but now let's look at these use cases
6:07and try to identify what types of AI are being used here.
6:11So when you see something like facial recognition,
6:14this is often deep learning,
6:16but depending on how you use it,
6:18it could also incorporate machine learning.
6:20When you're looking at computer vision and robotics,
6:24this is also deep learning
6:26because the robots use deep learning to see
6:29and to classify objects,
6:31much like you would in facial recognition
6:33or even computer vision for cars.
6:36You need to identify, okay, that's a car.
6:39This is a tree.
6:40That's a person.
6:41That's a sign.
6:42These are all deep learning use cases.
6:44Fantastic for neural networks,
6:47but again, that's not the important part.
6:49The takeaway really is that AI isn't just one thing.
6:54It's these three main subdomains
6:57that can be used in all kinds of ways.
6:59For example, when we're doing
7:01intelligent document processing,
7:03that could be Gen AI because we're dealing with text,
7:06it could also be deep learning or machine learning
7:10or all three at the same time.
7:13And fraud detection,
7:14this is a classic machine learning problem
7:17that finds different kinds of outliers.
7:20Oh, wow, that expense is 10 times the average
7:24of all the other expenses for the last 10 years.
7:27Maybe that is some kind of a outlier.
7:30Let's flag it as fraud.
7:32So that's a classic example of using an algorithm
7:35with machine learning to detect these outliers
7:38for fraud detection.
7:40And in the next video,
7:41we're gonna dive into software 1.0, 2.0, and 3.0,
7:47and here's why.
7:48This is a much easier way to think about
7:50all of the different types of AI and how they work.
7:53We're gonna go through each one of these examples
7:55and we're gonna try it out ourselves.
7:57For example, software 1.0, that's programming.
8:01I'll show you the if this,
8:03then that behavior of traditional programming.
8:06Software 2.0 is where the models learn from data.
8:10And we'll do that together
8:12so that we can classify the hot dog and the hamburger.
8:16We'll use deep learning for that
8:18because it's really good at identifying these
8:20or classifying these types of images with labeled data,
8:24which again is called supervised learning
8:26because it has labels.
8:28But again, that's not super important for our needs,
8:30but if you do hear it, now you know what it means.
8:33And then finally, we'll get into generative AI,
8:36which is the new kid on the block,
8:38meaning that it's built on deep learning,
8:41but it's really focused for generating content,
8:44not so much classifying.
8:46It generates text, images.
8:49It can do that with video.
8:50It can do that with sound, which includes music.
8:53It's pretty amazing.
8:54So I'll see you in that next video
8:55and we'll tackle each one of these together.
Understanding Karpathy’s Software Evolution Framework
0:00Welcome back. Before we get into the different types of software to help us
0:04build our mental model,
0:05what do I mean by "Carpathy Framing?" That means Andre Carpathy is the person
0:12that came up with
0:13these different types of software 1.0, 2.0, and 3.0, and they always have
0:19really amazing content
0:20on X. So if you are on X and you're just using it to follow people on X for AI
0:28and machine learning
0:29to keep up with the developments in AI, then definitely follow Carpathy at ARPA
0:36THY. Here's why.
0:37They have this pinned tweet here that says the hottest new programming language
0:42is English.
0:44So what do they mean by that? And that's software 3.0 where you're doing
0:48programming with plain
0:49language or English. And here this is the term that Andre Carpathy came up with
0:55, vibe coding.
0:56There's a new kind of coding I call "vibe coding" where you fully give into the
1:01vibes,
1:02embrace exponentials, and forget the code even exists. It's possible because LL
1:08Ms,
1:08which is a kind of generative AI, are getting too good. Then it gets a little
1:12technical.
1:13And that's the thing to keep in mind. Andre Carpathy will post amazing things,
1:18but often they're pretty technical. And rightfully so, this is the person that
1:23helped
1:24found OpenAI. They helped Tesla with autonomous vehicles and so on. They're
1:29really one of the
1:30best in the field. So it's going to be a little bit more technical, but I'm
1:34going to break it down
1:35for you. And we're going to use three simple types of software to build our
1:40mental model.
1:41We'll start with software 1.0. This is the classic software programming. So the
1:47word coding,
1:48that's software 1.0. Vibe coding is software 3.0. But we'll get to that. I'm
1:53getting ahead of
1:54myself. This is the if this or if X, then why. And this is traditional
2:00programming. So the code
2:02creates the behavior. So we use statements, loops, and functions to tell the
2:07computer
2:08exactly what to do. The behavior comes from the explicit code. It's not going
2:13to just think
2:14something else, right? When you're talking to chat GPT, well, it's non deter
2:19ministic,
2:20meaning the output, you can ask it the same question, but that output may not
2:24be the same
2:25every time. However, once you write a program with code like Python, and you
2:30run it, let's say
2:31one plus one equals two, it's always going to equal two. If you say print, and
2:36then you add
2:36your name, it's always going to print your name. It's not going to just think
2:40something else,
2:41or phrase it in a different way, like chat GPT would, because software 1.0 is
2:47deterministic.
2:48So that's a nice way to compare these software 1.0 is programming, traditional
2:53programming,
2:54the stuff that we use before AI showed up. And now when we're talking to a chat
2:59bot,
2:59it kind of has variations, right? And sometimes it can be wrong. But
3:03programming, if it's written
3:05correctly the first time, it's going to stay that way. Unless there's a package
3:09or something that
3:10gets updated, but the logic doesn't change. So think of software 1.0 is precise
3:16, reliable,
3:17but also rigid. The computer only knows what it's been told. Then we have
3:23software 2.0.
3:25This is where we stopped writing all of these rules ourselves, and started to
3:29let the computers
3:31learn the rules on their own using training and fine tuning. That's basically
3:37the computer
3:37learning from data. And that's what creates the behavior. So you might hear the
3:42term
3:42weights. That's how it creates these rules. How important is this and piece of
3:47information?
3:47How important is this? How important is that? So in this network full of little
3:52nodes,
3:53they all have different weights, but that just really means rules. That's how
3:58it learns from data.
4:00Instead of coding every behavior, we can define a model, feed it the data, and
4:05use training to
4:07find the rules automatically. In the world of machine learning and deep
4:11learning,
4:11the behavior changes not because we changed the code, but because we changed
4:16the data.
4:17Or we retrained the model means that we changed these weights. You changed the
4:22weights,
4:22you changed the behavior. And how do you change the weight? You either change
4:26the data,
4:27or you do the training and fine tuning again. Now, if you're feeling that that
4:30's confusing,
4:31don't worry. We're going to apply this with the hamburger and the hot dog
4:36without using code.
4:37And we're going to both do this on our computers. And you will automatically
4:41see
4:42exactly how this works. We're going to demystify that process. No need to get
4:46into the brain and
4:47neurons and all of that good stuff. And now let's talk about software 3.0. This
4:53is the world
4:54where vibe coding lives. We don't code it like you would in software 1.0. You
4:59don't train it with
5:00data so that it learns. We code it with plain language. And that plain language
5:07is called a
5:07prompt. And that's why Andrei Carpathi said that the hottest new programming
5:12language was English.
5:14Because to get the behavior, all you have to do is steer that model. And the
5:19way that you do that
5:20is by writing prompts in plain language. The AI is still running code behind
5:25the scenes, but
5:27our prompts can steer or influence the outputs. And that's why we're going to
5:33learn prompt
5:34engineering. So the hottest new programming language is English. And that's a
5:39spirit of vibe coding.
5:40We'll explore what that really means as we move through this course. We'll use
5:45prompt
5:45engineering such as CRE, which stands for context role expectation shots, which
5:52are examples.
5:53And then we'll use constraints and then different snippets that we'll call
5:58facts to feed it into
5:59the model. But really what we're doing is programming and plain language. And
6:05that's where this course
6:06really stands out from most of the other courses that I've seen. Don't talk to
6:11the AI like a human.
6:13Talk to it using prompt engineering because you now understand how it works.
6:18All right, so let's build that mental model by exploring software 1.0, 2.0, and
6:243.0 in a hands-on
6:26approach. So I'll see you in the next video on software 1.0.
Software 1.0
0:00Welcome back. In this video, we're going to unpack software 1.0.
0:04In this world, the behavior of a program lives entirely inside of the code,
0:09meaning that we write the code means we write the rules.
0:13If you want the computer to do something new,
0:16you wouldn't tweak the data or ask politely.
0:18You would just open the file, change the logic and rerun the program.
0:23That means you change the code that you created by hand to get that new behavior.
0:28Every decision is made by explicit rules.
0:32Like we mentioned before, if X, then Y.
0:35And if you know anything about programming, especially in Python,
0:39we use something called if and else conditions.
0:43And we also use loops and comparisons.
0:46So the code really is explicit rules.
0:49There's no learning from the data.
0:50It's rules that we create.
0:52And to change the behavior, you edit the code.
0:54And we could demo one of many different things.
0:57So we could greet based on an hour, because if it's this time,
1:02then create this greeting if X, then Y.
1:05In this video, I'll show you a small Python demo
1:09that encapsulates how we create rules by hand using code.
1:13In this case, Python code.
1:15And the reason I picked Python is because it's almost like English.
1:20There are many different kinds of programming languages.
1:22Some like assembly language are really geared towards the machine.
1:27So the closer that you get to the hardware, the machine,
1:31the less it's like plain language.
1:34However, Python was created to make it easier for humans to program.
1:39And essentially all programming languages are for humans
1:42to make it easier to write code that isn't directly the code
1:47that the computers run themselves.
1:49So if that doesn't make sense, don't worry.
1:51We'll break it down in the Python example.
1:54And to do that, we're going to use Google Colab.
1:56And the reason is, well, it's the most popular for data science.
2:00That's why I use it.
2:02But it's also probably the easiest way to start writing Python code
2:06without doing any setup.
2:08I'll share this notebook with you and you can open it up and take a look
2:12and maybe even run it.
2:13But if you want to save it, you need to have a Google account, which is free.
2:18So it's pretty easy to get started.
2:20And if you get into AI and you want to go further with chatbots
2:25like generative AI and build models using APIs, meaning computer
2:29to computer communication, which is often how these applications are built.
2:34This is a great tool to use for that purpose.
2:38It's a great way to get started and iterate on ideas.
2:41All right. So let's try to create a greeting based on time.
2:45But first, let me show you that if I type one plus one,
2:48which is a form of programming and I hit shift enter, that runs the cell.
2:53You could also just hit the play button.
2:55And once it connects to the computer in the back end, meaning to Google,
3:00then it returns the answer.
3:02And it does so pretty quickly.
3:03This number one means it ran one time.
3:06However, if I push this a bunch of times, you can see that
3:10I'm always going to get two.
3:11And generally speaking, when you're working with chat GPT,
3:15you can say one plus one and then run that and it'll give you something like this.
3:19But if I do it again, you get a nondeterministic response.
3:22This was pretty interesting. I did not plan that here.
3:25We get this in here.
3:27We're getting something completely different.
3:29But now we have two responses to pick from.
3:31That is not common. This is testing.
3:34So this is kind of like an A B test within the prompt from chat GPT
3:39because they're trying to improve.
3:40And it's probably because I've typed the same super easy thing
3:44into the model twice.
3:46So it's like, oh, I prefer this one or I prefer this one.
3:49Total equals to answer to here.
3:51It says one plus one equals two.
3:53Again, nondeterministic.
3:55That made my point beautifully.
3:57So now going back to this, let's do some software one point
4:01oh, where we add some logic.
4:02So first I'm going to use name, which is a variable.
4:06When we do this, we can store things in name.
4:08For example, I can put my name in there, run it, and then nothing happens.
4:12But the minute that I type name and run it, then I get Jonathan back.
4:16It's just a container that stores something.
4:18But we can do something even more fun.
4:20For example, I can say name like this, but add an input function
4:25and then put that inside.
4:27The minute that I do this, we create a little program.
4:30Let me show you what I mean.
4:32Once I run this, it prints name and space out,
4:35which is exactly what we have in here.
4:37But input is saying ask the user for input.
4:41And once I give it that input, it's going to store it in name.
4:44So I'm going to say Jonathan.
4:46I'm going to give him my full name this time.
4:48And now when I run this, I get my full name.
4:51So this is a cool way to store a value.
4:54And guess what? We're going to use this for our program.
4:56So let me get rid of this.
4:58I can click on delete here and then it goes away.
5:00Now I'm going to add to this.
5:02So instead of just using name, I'm also going to create a variable
5:06to store the hour so we can ask the user for an input.
5:09So I'm going to say input and I'm going to say our.
5:12But I'm also going to specify that it's military time.
5:15So I'm going to say zero through twenty three.
5:17And then colon and then space.
5:19This way we'll get a name plus a time.
5:22However, let me show you a little trap here that we didn't see.
5:26If I run this and I say one, it's going to say, cool, I work.
5:30Everything's going to work.
5:31But if I return our, you get one.
5:34But if we type type and then pass our into it,
5:38what we're doing here is asking what kind of a data type is this?
5:42This is something that you may not realize.
5:45And it's a string.
5:46The problem here is that we can't use strings.
5:49But how would you know?
5:50Well, let's say that we didn't do anything about this
5:53and we're going to try to get some help whenever we run into that error.
5:57So let's continue with our program.
5:59Let's go ahead and remove our and remove this example.
6:02And let's continue with our little program to do a greeting based on the hour.
6:07For example, if it's before noon, we would say good morning.
6:10So if the hour is before noon colon.
6:14Now, that's super easy way to understand it, right?
6:16But this is still logic.
6:18If X, that's what we've written here, then why?
6:22Meaning greeting is going to equal good morning just like that.
6:26But we can continue.
6:27And whenever you do continue, you can use something called Elif.
6:31And that's just a word that combines the words else and if together.
6:36So you can say if the hour is less than 12, the greeting is going to be good
6:40morning, else if the hour is less than 18, then we can say something else
6:46like reading equals good afternoon.
6:50And the way this works is if this is true, then it'll print this one first.
6:54But if it's not, it'll ask this one.
6:56So it's going to skip over this one if it's not that time.
6:59And if it's below 18, well, that's good afternoon.
7:02But you can continue.
7:03You can add as many of these else if checks as you like.
7:06But the last one should be else.
7:09So you can have if Elif, Elif, Elif, as many as you need.
7:12And the last one's going to be else colon.
7:15And then here you would say greeting equals.
7:18So we have good morning, good afternoon, and now good evening.
7:21And if I run this, I'll add my full name and I'm going to say that it's 1 a.m.
7:25And then it gave me this weird error not supported between
7:29instances of string and int.
7:31So what you could do at this point, and this is the beauty of learning to code
7:34using generative AI, you put the code in there and then you grab all
7:39of this as well, and then you paste it in there and you don't have to say anything.
7:43This is enough information.
7:45And this is called a naive prompt because you're not really telling the model very
7:49much, but it could probably figure it out.
7:51And this is absolutely not how I do it.
7:54But let's say that you're just starting out and you're just going to enter this
7:57and see what happens the minute you do that.
7:59It'll explain why you got that error and you can learn.
8:02And this is the most important part of this lesson.
8:05When you don't know something, learn.
8:08The idea here is to learn fast, not to just get AI to do stuff for you like
8:13you're a CEO and it's your engineer, right?
8:16That's not the role that you want.
8:18You want to be the engineer that tells the model what to do.
8:21And here it says you have to convert this to an integer because it's a string.
8:26So, Oh, okay.
8:27Because you can't use a string or text to add one.
8:32For example, it's like saying one plus one and then entering that.
8:36And it doesn't know what you're talking about.
8:38But if you use numbers, then you can get that.
8:41However, whenever we looked at these outputs earlier, it said that it was a
8:46string. So let me show you what I mean.
8:48Our we say type our and you get a string.
8:51So let's see what our looks like now, these single quotes.
8:54OK, so what happens if we do that here?
8:57Then you get 11.
8:58OK, that is so weird.
9:00What is it doing?
9:01Well, it's just putting them together.
9:03That's called concatenating.
9:05And that just means putting one thing after the other.
9:08That could also be a B and then you can keep going.
9:11So you're just putting text together.
9:13So think of those cutouts that you cut out and you hold together like accordion.
9:17ABC, it's one of those things.
9:19Instead of happy birthday here, you're just doing it with strings.
9:23And that's why they call it a string.
9:24It's a string of text.
9:27So you need a number.
9:28And whenever you have these quotes, that means it's a string.
9:31And that's what it's saying here when you check.
9:33So all you need to do is remove these quotes and then you can do one plus one
9:37equals two. But how do you remove those quotes?
9:40Well, it told us and this int.
9:43So you're taking this whole piece of code and putting it inside of there.
9:47The minute that you do that, look what happens.
9:50Name. I'm going to use my initials, JB.
9:52I'm going to say one.
9:53And then the program finishes.
9:55I'll talk about that in a second.
9:56But if I say what is the type of our now, it says int.
10:00So the idea here is to learn with a I just as much as you are creating
10:06applications with a I vibe coding isn't just about creating code, copying it and
10:11pasting it somewhere.
10:13It's about doing that plus learning.
10:15That is the most important part.
10:17All right. So now that we have all of this, let's go ahead and use it because we
10:20haven't really done anything with it yet.
10:22Now we're going to say print and now we can create a greeting based on the time.
10:26Don't worry about this F.
10:28This just means that you can do printing and programming at the same time and get
10:32reading and name, but you have to use these little curly braces to print these
10:38different variables.
10:40That's the only reason we're using that.
10:42It's called an F string.
10:43Definitely grab that or go to the chat bot and ask, create a mini lesson on an F
10:49string, and then you can learn what it is.
10:51And then finally, I'm going to say demo is at, and this is the time.
10:55So this is the time that I'm going to add.
10:57And let's say I'm adding central time in the United States, just as an example.
11:02Now, when I run this, I can say I'll just add my initials for brevity and then I'm
11:06going to add fourteen hundred.
11:08And now it gives me another error.
11:10What's happening?
11:11Well, I did say I wanted the hours to be zero through twenty three.
11:16All right. So let's do 14.
11:17Well, first, JB, then the hour is 14.
11:20And this is good afternoon.
11:22The demo is at 14.
11:24So we could make this more realistic.
11:26Let's do that again.
11:27First, I'm going to add my name and I'm going to say, well, good afternoon,
11:30Jonathan Barrio.
11:31So now we've created logic.
11:33But no matter how many times I run this, I'm going to get the same answer
11:37because it's deterministic.
Software 2.0
0:01In this video, we'll build a small classifier.
0:04We'll train it, not necessarily teach it, because it learns on its own.
0:08And it creates rules on its own, from the data, and we call these weights.
0:12The deep learning models use weights, which are rules, to create the behavior.
0:18So we train it, and that creates these weights.
0:21But you can also fine-tune it, which means creating a specialized function.
0:26And by the end, you'll have a good idea of how it works.
0:29And more importantly, in software 2.0, we don't write if-else statements or loops by hand.
0:36Instead, we collect examples.
0:38And then we'll click train, and let the system discover the patterns for us.
0:43And we'll use Google's teachable machine to do just that.
0:47And we'll create these samples using our webcam.
0:50And you can use your hand, and form a 1 with your hand, or a 2.
0:55And then you'll label them as 1 and 2.
0:58But I'm going to use the hamburger and hot dog.
1:01But you could really use any two objects that you like.
1:04And the takeaway is that software 2.0 learns from these examples.
1:08It learns from the data.
1:10The weights change during training.
1:12Again, we don't really see that.
1:14That's just giving you a little bit of insight as to what happens inside of these models.
1:18All right, so here is teachable machine.
1:21You can create a deep learning model by using audio or images or video.
1:29In this case, all three.
1:31So let's click on get started.
1:33And we're going to choose an image project.
1:35But you could also do audio or poses.
1:38If you're doing audio, we first convert the audio to an image.
1:41So really, it's also an image project.
1:44And poses are just a series of images.
1:48So that's the secret behind these models.
1:50So the simplest one is this image project.
1:52Let's just grab that.
1:54We're going to use this standard image model.
1:56And now we have two classes.
1:58Meaning hot dog and hamburger.
2:00And to create this model, all we have to do is use our webcam.
2:04And I'm going to crop mine.
2:05So I'm going to just create this little area.
2:07I clicked on this to crop it.
2:09And I can say done cropping.
2:10And now I'm going to use the hot dog.
2:13I'll use this hand to better control it.
2:15I'll move back here.
2:16There we go.
2:17And maybe let's get, I said 20 to 25.
2:19Let's do 100.
2:20101 is fine.
2:21Now let's do the same for hamburger.
2:23I'm also going to crop this in the same fashion.
2:26Put it over here in the corner.
2:28And now I'm going to create 101 samples of hamburger this time.
2:33Okay.
2:34I have too many.
2:35So I'm going to delete these.
2:36Perfect.
2:37Now we have 101 of each.
2:39Now something important to note.
2:41If I had 10 here, 10 images of hot dogs and 100 of hamburger.
2:47It would be biased to predict hamburger over hot dog.
2:51And that's how models work.
2:53So we need to avoid bias to create fairness.
2:56Whenever we're working with chat GPT, it also has bias.
3:00So that is something that goes into these models.
3:02Now let's go ahead and train it.
3:04What happens here is that it does it a bunch of times.
3:07And when it's done, we can preview it.
3:09So I'm going to click on crop here.
3:11And do the same thing.
3:13Put this over here to the side.
3:14Click on crop again.
3:16And now it's saying hamburger.
3:17It doesn't know what it's talking about, but let's get the hot dog involved.
3:21And boom, it knows it's a hot dog.
3:23So it's correctly predicting a hot dog because we have 100 labeled images of hot dogs.
3:29We didn't write any code, but look at it.
3:32It knows.
3:33However, if we do hamburger, it's like, oh yeah, that's a hamburger.
3:36But so is the background.
3:37Let's fix that.
3:38If I jump in here, it thinks I'm a hot dog, right?
3:41So that's called a hallucination.
3:42It's like, oh yeah, that's definitely a hot dog.
3:44Nope.
3:45It thinks I'm a hot dog.
3:46Depending on how much my face I put in here, if I go like this, it thinks I'm definitely a hot dog.
3:50So it's hallucinating.
3:52Super confident.
3:53Super wrong.
3:54So let's create a background class.
3:56Or we could say waiting.
3:58That's a better way to do it.
3:59Let me show you how to do this.
4:00You go to webcam.
4:01I'm going to get out of the way again and just put this over here like that.
4:05Done cropping.
4:06And I'm going to hold to record and try to get 101.
4:09Okay.
4:10I'm going to delete one.
4:11And now we're at 101.
4:13Now I'm going to retrain the model.
4:15So I'm not updating the code.
4:17I'm just retraining the model so that it can learn from this data.
4:20So when it sees nothing, it's waiting to see an image of either a hot dog or a hamburger.
4:27Now it sees a hamburger, even with the backside or the front.
4:31It knows that it's a hamburger.
4:32Same thing with the hot dog.
4:34100% hot dog.
4:35But if I put my hand in here, it thinks it's a hot dog.
4:38If I do one, two, it's really confused.
4:41So the takeaway here is that the classifier just does hot dogs and hamburgers.
4:46And it does so with a high degree of accuracy.
4:49And really what it's doing is learning on its own.
4:52It learns from the data.
4:54And one important thing to note, we kept the samples the same size to avoid bias.
4:59We also moved them to different positions so it can train on all the different patterns.
5:04But most importantly, I did not add my face in the training data.
5:08Because that face image would end up in a model somewhere.
5:12And that's considered personally identifiable information.
5:16So your face, your address, social security numbers, driver's license images, and so forth.
5:21These are all considered PII.
5:24And there's also intellectual property and other sensitive information.
5:28You definitely don't want to add that to the model.
5:31And on that note, I will see you in the next video on Software 3.0.
Software 3.0
0:00Welcome back. In this video, we're going to talk about generative AI, which is
0:05software 3.0.
0:07Both machine learning and deep learning are considered software 2.0 and
0:13traditional programming,
0:14we can call it coding, is software 1.0. So 1.0, 2.0, and now 3.0.
0:22And really, this is the world of vibe coding. We're not writing code or
0:27training models.
0:28We're programming with plain language. So you can call these prompts as plain
0:34language programming.
0:36A prompt is like a little program that you run in real time. What you're doing
0:40is you're
0:41giving the model instructions in plain English on what to do, who to be, and
0:46what a good output
0:47should look like. Prompts don't retrain the model. They don't change its
0:52internal weights like we did
0:53in software 2.0 when we added the background and retrained it. Instead, in
1:00software 3.0,
1:01we condition the model in the moment. We're steering it and shaping its short
1:07term behavior
1:08by focusing the attention and probabilities inside of the current model. That's
1:14why prompting
1:15feels conversational, but it's actually a new kind of programming. So prompts
1:21are runtime instructions
1:23and not necessarily code, though they do kind of behave in a similar way. They
1:28're not changing
1:29the way they condition or steer the behavior with the context of that prompt.
1:34And they do that with
1:35the constraints and examples. We'll use facts and excerpts to teach the style
1:41and format again with
1:42plain language. And the goal is shorter, steadier, and paste ready outputs
1:48instead of trying time
1:49and time again. The goal is to get it on the first try. And in the next video,
1:54we're going to talk
1:54about prompt engineering, and we're going to use something called CRE, which is
2:00context role
2:01expectation. And we'll talk about something called shots. A shot is an example.
2:06So sometimes
2:07we can give it no examples. That's zero shot. One shot is one example. And few
2:13shot is two
2:14examples. All right. So here we are in chat GPT. And we could ask a question.
2:19Summarize the key
2:20points of a famous novel. That's called the naive prompt, not only because it's
2:24very simple,
2:25but also I didn't even tell it what novel. So let's just pick the mockingbird
2:29because it's
2:30trying to help us like, wow, you really are very vague. Okay. So here is a
2:34summary of to kill a
2:36mockingbird. And it just does it however it wants to do it. And that's fine. If
2:40you don't care,
2:41but you can use context role and expectation to get exactly what you want.
2:48These aren't necessarily
2:50variables like we had here for name and hour, but they do kind of look similar
2:55in the sense that
2:57we can add the definition of context here, the role we wanted to be. So you are
3:02a creative
3:03copywriter who understands, and then you can add something specific here, some
3:08sort of a specific
3:10domain, maybe. And in a context, you could say you're helping me write a copy
3:14for a website and
3:16expectation, write three short taglines under 10 words each that feel modern
3:21and emotional,
3:22and it would give you that output much closer than if you just said, summarize
3:27this. To review,
3:28software 1.0, we're coding or programming, and those are the rules. With
3:34software 2.0,
3:36the model learns from data on its own. We just click on train, and then it
3:41learns from the data.
3:42And for software 3.0, we steer models using prompting. And really, that's the
3:49essence of
3:50vibe coding, because we can vibe code using prompts or prompt engineering. And
3:56instead of getting
3:57text, we can get code. Let me show you. Okay, I've never done this before. Let
4:01's try it. Give me
4:02Python code to run a simple game. I didn't say in Google Colab, but I think it
4:08might understand.
4:08Let's see what we get. And let's see if this even works. I've never played a
4:12game inside a Google
4:13Colab that wasn't just a text game. Okay, so it's a text game. Fine. Fair
4:18enough. I've created
4:19these. But look at this, that's kind of different. Wow. Okay, so this is vibe
4:25coding. We're really
4:26just jumping right into it. This is quite a bit of code. And it's not super
4:31easy, but it's not
4:32super hard. So let me copy this and go over here and let me create a new
4:37notebook. And I'm going to
4:38paste this. So everything that you don't understand here, you should definitely
4:42try to learn what it
4:43is. If you see the if and then another if and then a bunch of ellipse and then
4:47an else, we learned
4:48that today. So there are these things called functions that we haven't talked
4:52about. So if you
4:52don't know what those are, learn, and these are all different kinds of
4:56variables and then printing
4:58which we did. Here's a while loop. That's the only thing we haven't talked
5:02about. But other
5:03than that, we're just using functions while loops, if and else, and then this
5:07little block of code
5:08down here, you could learn what all of this means. Let's go ahead and play it.
5:12Okay, that looks
5:13awesome. I'm not sure what this means. I mean, grab it and ask, what does this
5:18mean? All right,
5:20I don't think that says guess the number, it spells out the game, the game's
5:24name, guess the number,
5:25maybe it's a different language. I'm not sure. Okay, so it's not able to do
5:30that. So this is a
5:31great example of hallucination. Anyway, let's get back to the game. I'm going
5:35to enter 123 or 4
5:36for the let's do difficulty insane. Enter an integer that just means a number.
5:42So one out of 12,
5:42let's do one cold. Let's do 12 warmer. What's the range? Oh, one through 1000.
5:49Okay, 100. Let me
5:51do 500. Okay, 100, 350, 300, 350, 325, 350, 355, 353, 354. Okay, so something
6:05is quite wrong with
6:05this game. It was something go up and down, but it was like not even close.
6:10Okay, let's not play
6:11this a game. But that's vibe coding. And as you can tell, it was totally wrong.
6:16The game logic is
6:17wrong. So it needs a little bit of improvement. So this is vibe coding. And the
6:21takeaway is that
6:22we're going to learn techniques on how to create really good games right from
6:27the beginning. And
6:27we're going to test the games using code to make sure that the parts that we
6:32don't understand
6:33actually work. And they're not going to do things that we don't expect. And
6:37because Python programming
6:38can be very complicated, we're going to use much simpler languages, HTML, CSS,
6:44JavaScript,
6:45keep it super simple. And that way we can create a simple website. All right,
6:49until next time,
6:50I hope this has been informative. I'd like to thank you for you.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
$749
seat / year