Learn AI/Foundations
LESSON 01 / 36Beginner 20 min with practice

What AI actually does

Separate rules, learned predictions, and generated content before choosing a tool.

WHAT YOU WILL LEARN
  • Frame a task as inputs and outputs
  • Distinguish training from inference
  • Choose a measurable baseline

Start with a decision

An AI system transforms inputs into an output that helps someone decide or act. A classifier assigns a category, a regressor estimates a number, and a generative model produces a sequence such as text. None of these outputs is automatically true merely because a model produced it. Define the decision before choosing a model.

Consider sorting support messages. A keyword rule is easy to inspect, but misses unfamiliar wording. A learned classifier can use patterns from labeled examples. A language model can write a reply, but needs a separate check that the reply answers the actual question. These are different tasks with different failure costs.

Learning is not using

Training adjusts model parameters using examples and an objective. Inference uses the resulting parameters on an input. Retrieving a document or adding text to a prompt does not, by itself, update those parameters.

Start with a simple baseline and a small set of representative examples. Record correct answers and difficult cases. A more elaborate model earns its place by improving the outcome under the same evaluation, including latency and operating cost.

PUT THE IDEA INTO CODE

A small experiment you can run.

This baseline uses explicit rules. There is no training step, probability estimate, or external model call. It creates something concrete to compare against.

what-ai-actually-does.py
messages = ["I forgot my password", "The invoice is incorrect", "Hello there"]
def route(message):
    text = message.casefold()
    if "password" in text:
        return "account"
    if "invoice" in text:
        return "billing"
    return "review"
for message in messages:
    print(route(message), "<-", message)
Copy code

Save the file, open your terminal in that folder, and run python what-ai-actually-does.py. Use python3 or py if required by your installation. Setup guide

What to expect

The initial script prints account, billing, then review. Your expanded set should expose at least one limitation.

YOUR TURN

Discover the limits of a rule-based classifier.

  1. Add six messages with known categories.
  2. Include a synonym and a message mentioning both categories.
  3. Count correct predictions and document the two hardest failures.
Compare with a suggested solution

A message about a receipt may require billing but miss the invoice rule. A message with both keywords takes the first branch. Add a review category for ambiguity instead of silently treating the first match as certain.

CHECK YOUR UNDERSTANDING

One idea to take with you.

Which action changes learned model parameters?

Make it part of your progress.

Finish the practice and answer the knowledge check to mark this lesson complete.

Go deeper with primary documentation

Optional references for further study. This lesson and its examples were written for Artificials.

Python: virtual environments