0
0
AI for Everyoneknowledge~30 mins

When AI is wrong vs when AI is uncertain in AI for Everyone - Hands-On Comparison

Choose your learning style9 modes available
Understanding When AI is Wrong vs When AI is Uncertain
📖 Scenario: You are learning how artificial intelligence (AI) systems make decisions and how to tell the difference between when an AI is wrong and when it is uncertain.Imagine you use a voice assistant or a chatbot that sometimes gives answers. Sometimes it confidently gives a wrong answer, and other times it says it is not sure. Understanding this helps you trust AI better.
🎯 Goal: Build a simple example that shows a list of AI answers with a label for each one saying if the AI is wrong or uncertain.This will help you see how AI can be wrong (confident but incorrect) or uncertain (not confident).
📋 What You'll Learn
Create a list of AI answers with their confidence scores and correctness
Add a confidence threshold to decide if AI is certain or uncertain
Use a loop to label each answer as 'Wrong' if incorrect and confident, or 'Uncertain' if confidence is low
Add a final summary count of wrong and uncertain answers
💡 Why This Matters
🌍 Real World
Understanding when AI is wrong or uncertain helps users trust AI systems and make better decisions when using AI tools like chatbots, voice assistants, or recommendation systems.
💼 Career
This knowledge is useful for AI developers, product managers, and anyone working with AI systems to improve AI transparency and user experience.
Progress0 / 4 steps
1
Create the AI answers data
Create a list called ai_answers with these exact dictionaries: {'answer': 'Paris', 'confidence': 0.9, 'correct': True}, {'answer': 'London', 'confidence': 0.6, 'correct': False}, {'answer': 'Berlin', 'confidence': 0.4, 'correct': True}, {'answer': 'Rome', 'confidence': 0.3, 'correct': False}
AI for Everyone
Hint

Use a list with dictionaries. Each dictionary has keys 'answer', 'confidence', and 'correct'. Use True and False for correctness.

2
Set the confidence threshold
Create a variable called confidence_threshold and set it to 0.5 to decide when AI is confident.
AI for Everyone
Hint

Just create a variable named confidence_threshold and assign 0.5 to it.

3
Label answers as Wrong or Uncertain
Create a list called labels. Use a for loop with variables item to go through ai_answers. For each item, if item['confidence'] >= confidence_threshold and item['correct'] == False, add the string 'Wrong' to labels. Otherwise, if item['confidence'] < confidence_threshold, add 'Uncertain' to labels. If none of these, add 'Correct'.
AI for Everyone
Hint

Use a for loop over ai_answers. Check confidence and correctness to decide the label. Append the label to labels list.

4
Count and summarize wrong and uncertain answers
Create two variables: wrong_count and uncertain_count. Use the count() method on labels to count how many times 'Wrong' and 'Uncertain' appear and assign these counts to the variables.
AI for Everyone
Hint

Use labels.count('Wrong') and labels.count('Uncertain') to get the counts.