Welcome to Udacity!
I am Sebastian Thrun, the founder of Udacity.
Our mission is to power careers through tech education, and we’re honored
that you’ve chosen us to help you on your career journey. Whether you're
embarking on a new path, curious about a new field, or advancing in your
current field, I want you to know that you're in the right place. We are here
to help you accomplish your goals.
I can’t wait to see where this journey takes you!
About the Program
Technical Content: This contains the technical content of the track you
chose. All of this content is available in the Udacity classroom for you to
access during the program.
Certification Assessment: Passing the certification assessment is the
only way to get your Certificate of Completion for this track. You’ll find all
the details related to this topic in the “Certification Assessment” part in this
classroom.
Online Community: your entire journey in this phase, you will have
access to an online community platform, where you will get to ask other
students and tutors for support to help you overcome any learning
difficulties or even to network!
Your Weekly Schedule
Follow this recommended weekly schedule to stay on track. Of course, you
can always be ahead of the schedule and graduate earlier!
Program Schedule
Week
Content
Number
1 Begin Your Journey
2 Intro to AI and ML
3 How to Use ChatGPT
4 Discovering Ethical AI
Try passing the Certification
5
Assessment
6 Finish and Graduate
What is Community for?
Maximizing Your Learning Potential with Udacity's Online Community
Platform
Find Answers: Explore the community to discover solutions to common
questions and seek technical guidance.
Share Your Knowledge: Contribute insights and experiences to support
your peers on their learning journey.
Make the Most of Resources: Mark helpful posts, highlight valuable
responses, and access pinned content for quick answers. Also, access
resources and explore useful materials and topics to deepen your
understanding of technology.
Build Your Community Presence: Participate in challenges to strengthen
your reputation, have fun, and unlock rewards along the way. Also, connect
with a dynamic community of aspiring learners to build your professional
network.
Receive Support: Get technical assistance from your Mentors and peers.
Stay Updated: Remain informed about important updates and news
concerning your Udacity program.
Engage in Conversations: Participate in captivating discussions to
enhance your knowledge and learning experience.
In this lesson you will find a complete guide to help you:
Navigate the classroom
Take the Certification Assessment
Graduate and receive your certificate
Udacity GPT
Main Features
Informative Responses: Udacity GPT provides informative and detailed
responses to student queries, offering explanations, examples, and step-
by-step guidance.
Concept Clarification: Students can ask Udacity GPT to clarify complex
concepts from your track or any other topic, helping them deepen their
understanding.
Learning Resources: The chatbot can recommend additional learning
resources, such as articles, videos, or tutorials, to supplement students'
understanding and enhance their knowledge.
24/7 Availability: Udacity GPT is available round the clock, allowing
students to seek support and guidance whenever they need it, regardless
of their time zone.
Non-Technical Assistance: Students can rely on Udacity GPT for non-
technical questions or concerns, including help with navigating the Udacity
Support Community or managing support tickets.
Personalized Support: Udacity GPT aims to provide personalized support
tailored to each student's needs, ensuring a more effective and efficient
learning experience.
Friendly and Approachable: The chatbot is designed to be friendly and
approachable, creating a comfortable environment for students to ask
questions and seek assistance.
What is AI?
FlOps - floating point operations, which computers use to do any
calculation (from storing text to doing multiplication!)
What is ChatGPT?
Developed by OpenAI, ChatGPT is a sophisticated AI model that can
understand and generate text. You can interact with it using:
The ChatGPT web app
The ChatGPT mobile app
Programmatically through OpenAI APIs
ChatGPT operates using AI technology called Transformer neural
networks, particularly a variant called GPT or Generative Pre-trained
Transformer.
You interact with ChatGPT through prompts, which are instructions given
in natural language. The AI doesn't replicate information verbatim from its
training data - it generates unique combinations based on patterns and
structures it has learned.
ChatGPT generates unique responses by learning patterns and structures
from a vast amount of human-written text. It predicts the next word in a
given text based on probabilities. For every potential next word, it creates a
ranked list, continuously evaluating the context to determine the most
appropriate next word.
The model operates with a degree of randomness while generating
responses. This randomness, controlled by a parameter referred to as
'temperature,' influences the selection of words in responses.
At lower temperatures, more likely words are chosen
at higher temperatures, less probable but grammatically correct words
might be chosen. This can lead to creative and unique responses.
Terms
Prompts: instructions given to ChatGPT in natural language.
Temperature: In the context of AI language models like ChatGPT,
"temperature" is a parameter that regulates the randomness of the model's
output. A lower temperature leads to more likely, or predictable word
choices, while a higher temperature allows for more creative word choices.
Generative AI and ChatGPT
Generative AI is a subset of machine learning, which in turn is a subset of AI. It
represents a significant step forward in AI technology, moving beyond simply
predicting outcomes to creating original outputs.
AI is about creating machines that can mimic human intelligence. A
significant field of AI is machine learning (ML), which focuses on creating
systems that learn from data rather than explicit programming. Classic
machine learning predicts specific outputs. Generative AI takes a step
further to generate new, novel content similar to the data it has learned
from.
Just as a child learns a language by immersion in conversations, exposure
to words, idioms, facts, and contextual cues, and gradually understanding
grammar and the world, a generative AI like Chat GPT learns by exposure
to vast amounts of text data and generates responses based on patterns it
learned during its extensive machine learning training.
Large Language Models (LLMs) are a subset of generative AI that
understand complex language patterns and generate text closely mirroring
human language. OpenAI's GPT models (GPT-3.5 and GPT-4) are
foundational models. These models serve as the base for more
specialized models and applications. For example, you can add data about
a business or product to the GPT-3 model (called fine-tuning) to create
specific business applications like customer service chatbots, automated
report writing, or personalized marketing messages.
Generative AI generates new content: Unlike traditional ML models that
predict specific outputs, generative AI can produce new, novel content that
is similar to the data it was trained on.
Terms
Machine learning (ML): systems that learn from data rather than explicit
programming.
Generative AI: A subset of machine learning capable of generating new,
novel content similar to the data it has learned from.
Large Language Models (LLMs): A subset of generative AI that learn
complex language patterns and generate text closely mirroring human
language.
Foundation Models: Generative AI models which serve as the base for
more specialized models and applications
ChatGPT Datasets and Training
Process
The power of Chat GPT lies in its generative capabilities, which stem from its training
on diverse data sets and the fine-tuning process it undergoes.
Training Chat GPT involves a multi-stage process using text data collected
from various Internet sources and a method called Reinforcement
Learning from Human Feedback (RLHF).
A machine learning model was designed to generate the next word in a
sentence or paragraph in a coherent way. This led to the creation of the
GPT model and its successors, including GPT-3, which improved over time
through enlarging data sets and model size. GPT-3 wasn't trained for a
specific task, its training on a vast data set enabled it to perform diverse
tasks when prompted appropriately.
Then, the GPT models were trained to follow instructions through a curated
data set of human-generated responses using RLHF. This process involves
humans rating multiple outputs from the model from least to most desirable
and providing the model with scores based on the quality of its content.
This led to the creation of Instruct GPT, a model that could perform tasks
and generate responses based on detailed instructions provided in the
input.
The next phase was to train the model to converse, enabling the creation of
ChatGPT. The training data included dialogues. Further fine-tuning with
reinforcement learning enabled the model to handle conversations in a
human-like way.
As impressive as Chat GPT is, it still has limitations like generating false
content and reflecting societal biases. Ensuring the safe and beneficial use
of AI is a major concern. The fine-tuning process involves important safety
measures and implementing safety protocols to ensure the model's
responsible use. You'll see this safety layer in the model's responses to
various prompts, like asking for medical advice.
Remember, Chat GPT is a tool and doesn't have beliefs or intentions. It generates
responses based on patterns it learned during its training.
ChatGPT and Conversational AI
Conversational AI is a name given to AI systems that understand and
respond to user instructions and questions in a coherent, engaging - or
conversational - way!
Conversational AI systems allow computers to understand, process, and
respond to human language naturally and meaningfully. Thanks to its
language understanding and generation capabilities, ChatGPT serves as a
powerful tool for building conversational AI systems.
ChatGPT's training was fine-tuned using a dataset of conversations. It
learned to respond in dialogue and manage a conversation over multiple
turns. A conversation turn is one back-and-forth dialogue between the AI
assistant and the user.
Within a single conversation, GPT models are designed to consider all of
the text in the history of the conversation - the conversation context- when
generating a response. This additional training allows the model to answer
follow-up questions, correct mistakes, and challenge incorrect premises, all
of which contribute to its ability to converse in a more human-like way.
This makes ChatGPT a specialized tool for conversational tasks.
You might use ChatGPT to build a virtual assistant or a customer service
bot because it responds in a human-like way.
ChatGPT can manage a conversation over multiple turns, taking into
account the history of the conversation when generating a response. This
makes it feel like you're speaking to a human who's paying attention and
remembering what you said.
Terms
Conversational AI: A name given to AI systems that understand and
respond to user instructions and questions in a conversational way.
Context-awareness: In Conversational AI, context-awareness means
taking into account all the text in the history of the conversation when
generating a response.
Conversation Turn: One back-and-forth dialogue between the AI assistant
and the user in a Conversational AI system.
Conversational AI in
ChatGPT
In the first conversation, we prompt ChatGPT to help craft an email
campaign for a new product.
Asking follow-up questions: The AI asks for more details about the
product, which the user provides, and then the AI helps to complete the
email task.
Context Awareness: We continue the conversation, requesting ChatGPT
to add and remove details from the email draft. We don't need to refer to
the specific text in the email that they want to change; instead, we can use
natural language, and the AI will still understand the instructions.
The second scenario involves ideation around a spike in sales of cars. The
initial prompt is:
I'm analyzing sales data for an automotive company and I see that we've sold an
average of 2000 units per month. However, in the last month of every quarter, we sell
about 3000 units. Can you suggest what might be causing this spike?
Asking follow-up questions: ChatGPT responds by suggesting some
ideas, then asks a follow-up question about a suggestion provided by the
AI.
Context Awareness: When the user asks the AI to help define metrics,
they don't need to be specific about which metrics they are referring to.
ChatGPT can recall from the conversation context that the metrics referred
to are those related to the impact of promotional events on sales.
When formulating prompts, you don't need to be overly specific or refer to
the exact text from previous conversation turns. Instead, you can use
general language and ChatGPT will interpret the instructions based on the
context of the conversation.
Practice: Conversational AI in
ChatGPT
Now it's your turn to practice having conversations with ChatGPT and test
it's Conversational AI capabilities!
Exploring ChatGPT's Business Conversational Capabilities
Let's utilize the conversational capabilities of ChatGPT within the context of
various business and industry scenarios by exploring ChatGPT's Business
Conversational Capabilities.
Make sure you're logged in to ChatGPT, and in the first scenario, let's craft
a prompt related to market research.
Type the following into the prompt:
I need to understand the key trends in the electric vehicle market for the past five years.
Can you help?
This should prompt ChatGPT to generate a response that outlines
significant trends in the electric vehicle market over the specified period.
Dive Deeper with Follow-up Prompts
ChatGPT is capable of handling follow-up questions based on the previous
context. Now, ask a more specific question based on the initial response.
For example:
What companies are leading in terms of market share and what factors contributed to
their success?
This will lead ChatGPT to discuss specific companies and factors
contributing to their success.
Switching Contexts
To demonstrate ChatGPT's capability to switch contexts, ask a question
about a different industry. For instance:
I'm also interested in the trends in the e-commerce industry. Could you tell me about the
main changes over the past three years?
ChatGPT should now provide insights into the e-commerce industry.
Specific Business Tasks
ChatGPT can also assist with specific tasks. For instance, ask it to help
draft a business email:
Can you help me draft an email to our marketing team about the latest sales
performance and suggesting strategies to improve?
Refining the Draft
You can also use ChatGPT to refine the draft. Suppose you want to add
more details to the email. You could say:
Please add a section highlighting the importance of digital marketing in driving sales,
based on the recent trends we discussed.
ChatGPT should now update your draft accordingly.
Exploring Different Scenarios
Continue to explore different business scenarios and contexts. This could
include industry analysis, brainstorming business strategies, predicting
market trends, etc. The more you interact with ChatGPT, the more you will
understand its capabilities and ways to use it for productivity and
assistance.
Remember, the AI model is context-aware but not perfect, and it’s
important to critically assess the responses provided. Keep exploring and
learning what ChatGPT is capable of!
ChatGPT Large Language Model
Components
System Messages
These are messages used to set the behavior of Chat GPT. For example, a system message
might say, 'You are a helpful financial assistant.' This message guides Chat GPT to respond
using this role or behavior throughout the conversation.
Roles
In a conversation with Chat GPT, there are typically two roles: the user and the assistant. The
user refers to you or the one asking questions or making requests. The assistant is Chat GPT,
which responds based on the user's prompts.
Prompts
These are the instructions or inputs we give to Chat GPT. The model uses the prompt to
generate a relevant response.
Tokens
These are the chunks of text that the model reads at a time. A token can be as short as one
character or as long as one word.
Context Window
This is an important component. It consists of tokens that are in the recent history of the
conversation that the model considers when generating a response. In Chat GPT, the model
can remember thousands of tokens in its context window. Anything beyond this limit gets cut
off and won't be considered by the model.
Responses
These are the outputs generated by Chat GPT in reply to a user's prompt.
When interacting with Chat GPT, you'll deal with prompts, roles, system messages, the
context window, tokens, and responses. Understanding these components helps you get the
most out of your conversations.
Utilize system messages, roles, prompts, and the context window to have suddessful
conversations with ChatGPT. These components guide the assistant's behavior, impact it's
responses, and manage the model's memory and response generation process.
Quiz Question
Prompt Design
Prompts are the instructions or questions we give to our AI model. They are the
foundation of our interaction with the model, determining the quality of responses we
receive. The art of crafting the perfect prompt to get a desired response from the
model is called prompt design.
Prompts can be a single word, a sentence, or even a paragraph.
When crafting a prompt, it's crucial to provide clear and specific Instructions
to guide the AI toward generating the desired output. In order to make your
prompts clear and specific, add context and examples to improve the
output.
If you want to get creative output, you might start your prompt with "imagine
if..."
In order to extract factual information, questions that start with what, who,
or when are more effective.
A few-shot prompt is a learning setup in which you provide an AI model
with a few examples of the task, then ask it to perform a similar task.
A one-shot prompt gives the model a single example of the task you want it
to perform, then asks it to perform a similar task.
A zero-shot prompt is a type of prompt where the model is given a task
without any prior examples within the same conversation. In other words,
the model has to understand the task and generate a response based only
on the prompt itself and not any previous examples in the same
conversation.
Practice: Prompt Design
Now you'll put your prompt design skills to the test! Make sure you can
access ChatGPT and practice designing prompts to solve these problems.
Focus your learning on structuring your prompts to get the most useful
responses from the AI model.
Customer Support Query
In this scenario, you have a customer support representative who needs to
respond to common customer inquiries. The ChatGPT can assist in drafting
responses.
Try this one-shot prompt:
Example:
Customer: "I've been charged twice this month for my
subscription. Can you help?"
Agent: "I'm sorry to hear that. Let me check your
account and I'll get back to you as soon as possible."
Question:
Customer: "I can't log into my account. Can you assist
me?"
Market Research Analysis
In this scenario, an analyst wants to use ChatGPT to generate insights
about different companies based on specific data points.
Try this few-shot prompt:
Example 1:
Input:
{
"company": "Company A",
"revenue": 1000000,
"employeeCount": 500,
"industry": "Technology"
}
Output:
{
"insight": "Company A, a technology firm, has a high
revenue per employee ratio, indicating high
productivity or high-value products."
}
Example 2:
Input:
{
"company": "Company B",
"revenue": 200000,
"employeeCount": 100,
"industry": "Manufacturing"
}
Output:
{
"insight": "Company B, a manufacturing business, has
a lower revenue per employee, which is common in labor-
intensive industries."
}
Input:
{
"company": "Company C",
"revenue": 500000,
"employeeCount": 200,
"industry": "Services"
}
Scheduling Meetings
A busy executive wants to use the AI to schedule meetings based on a set
of criteria.
Try this zero-shot prompt to solve this problem:
Input:
{
"task": "Schedule a meeting",
"with": "John Doe",
"preferred_date": "next Wednesday",
"duration": "30 minutes",
"topic": "Project X update"
}
Experiment and Refine
Remember, designing prompts is an iterative process. You may not always
get the results you want on the first try. You should experiment with
different prompt structures, levels of specificity, and the number of
examples you provide. With practice and refinement, you can design
prompts that effectively communicate your task to the AI model and yield
the most useful responses.
Limitations, Ethical Use, and Bias of
ChatGPT
Understanding the limitations, ethical considerations, and biases of large language
models like ChatGPT is essential to working with them.
Limitations
One significant limitation is that ChatGPT doesn't truly understand text in
the way humans do. It can generate relevant responses based on patterns
it learned during training but it doesn't possess actual comprehension or
context beyond the given conversation.
Another limitation is ChatGPT may sometimes produce outputs that are
nonsensical or factually incorrect, and it doesn't have a built-in fact-
checking mechanism.
ChatGPT doesn't know real-time information, and 's training ends at a
specific moment in time. It's knowledge of the world ends on that date. If
you try to ask ChatGPT about recent world events, It will respond with: I
apologize, but as an AI language model, I don't have access to real-time data, and my
knowledge is limited up to...
Consider incorporating a fact-checking system alongside ChatGPT's
responses, especially in public contexts.
Ethical Use
AI should be used responsibly. ChatGPT can be misused to generate
harmful or misleading content, which is why OpenAI has usage policies in
place to prevent such applications. You'll see safety messages from the
model if you try to generate unethical responses.
Adhere to OpenAI's use-case policy to ensure the model is not used for
generating harmful or misleading content.
Biases
AI models like ChatGPT learn from data; if that data contains biased
language, the model can perpetuate those biases.
If the training data includes biased language or perspectives, the model
may generate biased outputs. For instance, if the training data includes
stereotypes or biased viewpoints, the model might generate text that
reflects those biases.
Given a prompt, the model might generate an output that confirms the
assumptions or assertions made in the prompt, even if they are incorrect or
biased.
The model may be biased toward generating more commonly seen
phrases or ideas, even if they are not the most accurate or unbiased
response.
To navigate bias, you should develop an understanding of potential bias
and craft your prompts to avoid triggering such biases
Be mindful of these issues when using ChatGPT:
Recognize its lack of true comprehension, ensure responsible use to
prevent harmful output, and be mindful of potential biases in the data that
could lead to biased outputs.
ChatGPT Use Cases in Industry
With its ability to generate human-like text, ChatGPT has a broad range of
applications across various industries. From automating certain tasks to enhancing
creative processes, it can be a powerful tool to increase productivity given its ability
to generate, summarize, and analyze text rapidly and accurately.
Customer Support Services
ChatGPT can automate Customer Support Services, freeing human agents
to handle more complex issues.
It can also be used to create detailed and personalized responses to
frequently asked questions
A powerful tool for support chatbots and assistants.
Media and Publishing
ChatGPT can be used to draft articles, blogs, social media posts, and
more.
Assist in editing by suggesting improvements in grammar, generating style,
and helping with content structure.
Generate creative copy for advertisements, social media posts, email
marketing campaigns, and product descriptions.
Analyze customer feedback, sentiment, and trends.
Financial Sector
ChatGPT can help draft reports and summarize financial news
Generate insights from financial data
Answer customer queries about financial products.
Legal Professionals
Use ChatGPT to help draft legal documents
Summarize complex legal texts
Answer legal queries.
Software Development and IT
ChatGPT can generate code
Assist in code documentation
Summarize technical documents
Provide first-level tech support
ChatGPT can be a powerful productivity tool, but it's important to consider
its limitations. The AI doesn't understand context like humans do, and it
doesn't know any specific documents or proprietary databases unless the
information is in the data it was trained on.
ChatGPT doesn't know specifics about a company's services, clients,
internal processes, or confidential data.
ChatGPT can be a powerful productivity tool across various industries such
as customer support, media and publishing, advertising, finance, law, and
IT
Course 4 What Is Ethical AI?
Fundamentally, all AI models operate by the same principle:
The AI model takes in input data from the world
The data is processed by the AI model
The AI model outputs a prediction/inference to take action.
How do we apply ethics to AI?
Ethical AI is a space that minimizes the risks that AI systems have and
maximizes its potential to do good for our societies.
How does ethical AI work?
Ethical AI requires a multi-disciplinary approach involving the definition and
implementation of (1) principles, (2) practices, and (3) processes to ensure
AI is used for good and not malicious purposes.
Is there a difference between responsible and ethical AI?
Responsible AI and ethical AI are often used interchangeably to represent
principles, practices, and processes toward the ethical definition,
construction, and implementation of AI systems.
Fundamentally, all AI models operate by the same principle:
The AI model takes in input data from the world
The data is processed by the AI model
The AI model outputs a prediction/inference to take action.
How do we apply ethics to AI?
Ethical AI is a space that minimizes the risks that AI systems have and
maximizes its potential to do good for our societies.
How does ethical AI work?
Ethical AI requires a multi-disciplinary approach involving the definition and
implementation of (1) principles, (2) practices, and (3) processes to ensure
AI is used for good and not malicious purposes.
Is there a difference between responsible and ethical AI?
Responsible AI and ethical AI are often used interchangeably to represent
principles, practices, and processes toward the ethical definition,
construction, and implementation of AI systems.
Ethical AI and You
We just talked about several different stakeholders involved in AI Ethics,
including business and technical teams, researchers, policy and auditing
organizations, civil society organizations and trade unions, and individuals
impacted by AI.
Apply Ethical AI to the AI Lifecycle
How do we identify the ethical AI implications of a use case?
In this section, we covered the steps of an AI lifecycle, from pre-design to
development and deployment, and how ethical AI ties into each stage to do
this.
1. Pre-design: We defined our problem statement, defining the level of
control we give our AI model to respond to customer calls.
2. Development: We designed an AI technology stack to solve this objective,
looking at why informed consent and avoiding harmful AI-generated
remarks are critical
3. Deployment: Finally, after deploying our model into the world, we looked
at end-user concerns, asking if our AI stack can recognize users with
different dialects and privacy concerns.
Case Study: Call Center Customer Service
Activities
AI Lifecycle Phase
Working with students and teachers to understand learning outcomes
Pre-design
Defining the scope of the AI model to consume teachers' lectures
Pre-design
Building/training an AI model on students' survey data
Development
Testing the AI model on some test data
Development
Integrating the AI model into a classroom
Deployment
AI Ethics Case Studies
We briefly talked about a couple of ethical AI case studies - let's recap:
Correctional Offender Management Profiling for Alternative Sanction
(COMPAS)
A tool used to determine the likelihood of recidivism that was used in trial
sentencing.
It was:
Twice as likely to mispredict higher recidivism risk for black defendants vs.
white defendants
Twice as likely to mislabel white re-offenders as low-risk vs. black re-
offenders.
Computer Vision Use Cases
AI-based facial recognition systems are sometimes not able to recognize
users, and misidentify them.
Bias and lack of transparency can lead to harmful implications when left
unassessed and uncontrolled.
Ethics in Generative AI
Congratulations on completing this lesson!
The most important thing to remember about Ethical AI is its fundamental
parts - the principles that make up ethical AI, the practices that allow us
to adapt it, and the processes organizations can use to stay abreast.
Next Steps
By learning the basics of ethical AI, you've already opened up new
opportunities, and you've created a good foundation to build on. If you want
to take your Ethical AI skills to the next level, you can continue with an
introductory Ethical AI course, where you will go into much greater depth
on many of the concepts we touched on here.
Other Top Digital Skills
As we've mentioned, Ethical AI has been identified as one of the most
disruptive skills. If you're looking to broaden your knowledge, here are
some of the other top digital skills that you may want to explore:
Discovering Data Science
Discovering Artificial Intelligence and Machine Learning
Discovering Cybersecurity
Discovering Cloud Computing