Skip to main content

Section 3.5 AI in the Real World

AI is already embedded in daily life, shaping what we watch, read, buy, and how systems make decisions in the background. This section explores practical applications of AI and connects core concepts to the tools and platforms people use every day.

Subsection 3.5.1 Everyday Algorithms

Now that we have explored how machine learning models learn and the tools they use to think, let us investigate how these concepts manifest in the applications you interact with every single day. AI is no longer confined to research labs; it operates quietly behind the scenes of our favorite digital platforms and physical systems.
Recommendation Engines
Whenever you open an application like Netflix, YouTube, Spotify, or TikTok, you are interacting with a highly optimized machine learning ecosystem known as a recommendation engine. These systems solve a massive classification and ranking problem: out of millions of available videos, songs, or posts, which five or ten items are you most likely to engage with right now?
To achieve this, recommendation engines generally rely on two primary techniques:
  • Collaborative Filtering: This method operates on the principle that if two users share similar tastes in the past, they will likely share similar tastes in the future. If the system observes that User A and User B both highly rated Sci-Fi Movie X and Action Movie Y, and User A goes on to watch and love Indie Film Z, the algorithm will predict that User B will enjoy Indie Film Z as well.
  • Content-Based Filtering: This technique focuses on the specific features of the items themselves. If you frequently watch cooking tutorials that are tagged with parameters like "baking," "pastry," or "10-minute recipes," the system builds a user profile mapping your preferences to those exact data attributes, constantly serving you content with matching metadata.
Modern platforms combine these approaches into hybrid systems. TikTok’s algorithm, for example, processes real-world user data down to the millisecond, tracking how long you linger on a specific post, whether you rewatch it, and your explicit interaction history (likes, comments, shares), to dynamically adjust your customized "For You" feed in real time.
Questions for Everyday Algorithms

Checkpoint 3.5.1.

A music streaming platform notes that User X and User Y both love the same 5 indie rock tracks. When User X likes a new synth-pop song, the platform immediately suggests it to User Y. What recommendation strategy is being used?
  • Content-Based Filtering
  • Incorrect. Content-based filtering focuses on item attributes, such as genre tags or metadata, not shared behavior between similar users.
  • Collaborative Filtering
  • Correct. Collaborative filtering builds recommendation criteria on the premise that if users shared similar tastes in the past, they will likely share them in the future.
  • Natural Language Processing
  • Incorrect. NLP is focused on machine interpretation of language, not user-to-user preference matching.

Checkpoint 3.5.2.

True or False: TikTok’s algorithm waits until a video completely finishes playing before calculating metrics to update your "For You" feed.
  • True
  • Incorrect. The system evaluates real-time markers continuously, including partial watch behavior and short-duration interactions.
  • False
  • Correct. The system tracks loop rates, pauses, and lingering duration down to very short time windows.

Subsection 3.5.2 Natural Language Processing (NLP) & Computer Vision

Recommendation and filtering algorithms lean heavily on two subfields introduced in SubsectionΒ 3.4.4: Natural Language Processing (NLP), which lets machines read and understand human language, and Computer Vision, which lets machines "see" by parsing images as grids of numerical pixel values. Together, these two subfields let AI systems handle the unstructured text and imagery that make up much of the real world.
Questions for NLP and Computer Vision

Checkpoint 3.5.3.

Why is structural data parsing fundamentally different from tasks handled by Natural Language Processing?
  • Structured spreadsheets are already organized neatly, whereas human language is chaotic and full of unstructured slang, context, and ambiguous syntax rules.
  • Correct. NLP exists specifically to interpret unstructured human communication and context-heavy language.
  • NLP only processes data fields stored as pixel blocks, whereas spreadsheets process integers.
  • Incorrect. Processing pixel blocks is associated with computer vision, not NLP.
  • Spreadsheets require deep convolutional neural networks to run basic mathematical functions.
  • Incorrect. Basic spreadsheet operations do not require convolutional networks.

Checkpoint 3.5.4.

True or False: To a computer vision model, an image is perceived as an organic collection of geometric vectors, shapes, and color pigments.
  • True
  • Incorrect. That is a human interpretation. Models consume numerical pixel arrays.
  • False
  • Correct. To a computer, an image is fundamentally a multi-dimensional numerical matrix.

Subsection 3.5.3 Generative AI

One of the most revolutionary shifts in modern software is Generative AI, which moves beyond merely analyzing existing data to creating novel content, including human-like essays, computer code, or realistic artwork. Popular tools like ChatGPT, Claude, and Midjourney are powered by massive models trained on billions of human-created examples.
Figure 3.5.5. Input, Layered Processing, Output
Generative systems do not possess genuine human creativity, inspiration, or consciousness. Instead, they operate on complex probabilistic patterns.
  • Large Language Models (LLMs): A text generator like ChatGPT treats writing as a sequential probability puzzle. Given a prompt, it calculates which token is most likely to come next and repeats this process token by token.
  • Diffusion Models: Image generators like Midjourney or Stable Diffusion learn from image-text pairs. During training, images are noised and then denoised. At generation time, the model starts from random noise and progressively denoises toward an image aligned to the prompt.
Why Probabilistic Systems Can Be Wrong
  • Hallucinations (Confabulations): Factually incorrect statements, fabricated references, or invented data presented confidently.
  • Context Drifts: In long conversations, the model may overweight recent text and contradict earlier constraints.
  • Data Echoes (Stochastic Parrots): If misconceptions or outdated beliefs are common in training data, models may reproduce them.
Statistics and References on LLM Factual Accuracy
Measuring the exact accuracy of an LLM is a moving target because models are updated constantly. However, independent benchmark registries and peer-reviewed studies offer clear empirical data regarding how often these probabilistic patterns fail.
  1. Hallucination Rates Across Leading Models
    The Vectara Hallucination Leaderboard, an industry-standard benchmark that continuously audits LLMs by prompting them to summarize text and tracking how often they invent data not found in source material, highlights regular failure rates:
    • GPT-4o (OpenAI): Generally ranks as one of the most reliable models, but still maintains an audited hallucination rate of approximately 5.6% depending on prompt complexity.
    • Claude 3.5 Sonnet (Anthropic): Displays a hallucination rate fluctuating around 10%.
    • Llama 3 (Meta) / Mixtral (Mistral): Open-source models typically demonstrate hallucination rates near 4.5%.
    What this means mathematically: Even with the world’s best engineering, a 2% hallucination rate means that out of every 100 paragraphs generated, two are statistically likely to contain fabricated facts or relationships.
  2. Domain-Specific Inaccuracy (The Legal Domain)
    When applied to highly technical fields, accuracy rates can drop significantly. A landmark 2024 study by Stanford University’s RegLab evaluated leading LLMs on legal reasoning and case law citations.
    Magesh, V., Surani, F., Dahl, M., Suzgun, M., Manning, C. D., & Ho, D. E. (2025). Hallucination-free? Assessing the reliability of leading AI legal research tools. Journal of Empirical Legal Studies, 22(2), 216-242.
    The researchers found widespread inaccuracies:
    • Models hallucinated or misstated legal facts between 6% and 75% of the time for specific, nuanced case-precedent queries.
    • Even when explicit legal documents were provided in prompts, models still introduced hallucinated elements in more than 15% of legal summaries.
  3. General Knowledge Tracking (The MMLU Benchmark)
    The standard benchmark used to measure factual knowledge across 57 subjects is the Massive Multitask Language Understanding (MMLU) index.
    • The highest-performing models score roughly 88% to 90% on MMLU.
    • A 90% score still mathematically confirms incorrect output on approximately 10% of benchmarked academic and factual items.
The Strategic Lesson for Humans
These statistics underscore why treating an LLM like an omniscient search engine is a major mistake. Because their core architecture is based on calculating the mathematical probability of words rather than verifying external reality, they require constant human evaluation.
Strategic users do not offload critical thinking to LLMs. Instead, they write precise specifications, treat model output as a rough draft, and use Socratic dialogue to audit the AI’s logic, cross-checking critical statistics against verified, primary human sources.
Questions for Generative AI

Checkpoint 3.5.6.

An image-generating system starts with random digital static and progressively cleans it to match a textual prompt. This process is known as:
  • Sequential Probability Selection
  • Incorrect. Sequential next-token selection is associated with text generation in LLMs.
  • Denoising via a Diffusion Model
  • Correct. Diffusion models reverse noise to produce prompt-aligned images.
  • Context Drift Mitigation
  • Incorrect. Context drift is a failure mode, not an image generation mechanism.

Checkpoint 3.5.7.

Which option correctly pairs common generative AI failure types with their descriptions?
  • Hallucination: fabricating facts confidently; Context Drift: forgetting original prompt goals in long contexts; Data Echo: replicating flaws in training data.
  • Correct. These are core failure modes of probabilistic generative systems.
  • Hallucination: forgetting words; Context Drift: inventing sources; Data Echo: explicit hardware runtime error.
  • Incorrect. This set mixes unrelated definitions and omits the actual data-echo behavior.

Checkpoint 3.5.8.

True or False: If a model scores 90% on MMLU, it is incapable of generating false data on those subjects.
  • True
  • Incorrect. A 90% score still implies nontrivial error on benchmark items.
  • False
  • Correct. A 90% benchmark score means the system still misses approximately 10%.

Subsection 3.5.4 Autonomous Systems

The transition of AI from digital text and screens into physical reality is exemplified by autonomous systems such as industrial robotics, delivery drones, and self-driving vehicles. An autonomous system continuously executes a closed loop of Sensing, Planning, and Acting.
  • Sensing: Hardware sensors such as cameras, LiDAR, radar, and ultrasonic sensors capture environmental data. Computer vision models process these streams in real time to detect lanes, signs, pedestrians, and nearby vehicles.
  • Planning: The onboard system predicts trajectories of surrounding objects, evaluates safe motion paths, and applies traffic constraints.
  • Acting: The system sends control commands to steering, braking, and acceleration components. This loop repeats many times per second.

Checkpoint 3.5.9.

Interactive Element (Multiple-Choice Question): Identifying Real-World AI
Which mapping correctly matches each application to its primary AI category?
  • Self-driving car braking for a dog -> Autonomous System; Spotify weekly playlist -> Recommendation Engine; GitHub Copilot generating Python from comments -> Generative AI (LLM); Midjourney text-to-image castle -> Generative AI (Diffusion)
  • Correct. Each mapping aligns with the sensing/planning/acting loop, collaborative recommendation, text generation, and diffusion image generation respectively.
  • Self-driving car braking for a dog -> Recommendation Engine; Spotify weekly playlist -> Autonomous System; GitHub Copilot generating Python from comments -> Generative AI (Diffusion); Midjourney text-to-image castle -> Generative AI (LLM)
  • Incorrect. This swaps core categories and mixes up LLM and diffusion model roles.
  • Self-driving car braking for a dog -> Generative AI (LLM); Spotify weekly playlist -> Recommendation Engine; GitHub Copilot generating Python from comments -> Autonomous System; Midjourney text-to-image castle -> Generative AI (Diffusion)
  • Incorrect. Self-driving control is not an LLM task, and Copilot is not an autonomous robotics loop.
  • Self-driving car braking for a dog -> Autonomous System; Spotify weekly playlist -> Generative AI (LLM); GitHub Copilot generating Python from comments -> Recommendation Engine; Midjourney text-to-image castle -> Generative AI (Diffusion)
  • Incorrect. Spotify is mainly recommendation, and Copilot is generative text/code modeling rather than recommendation.
You have attempted of activities on this page.