FrontierBasics · Build your own AI

Build an AI name generator in your browser

Train your own AI model from scratch. It learns from names you pick, then invents new ones. Nothing you type leaves your device.

L1

How does an AI name generator learn?

You finish with an AI that invents names for a baby, a pet or a startup, and you can explain how it learned them.

1

What data does an AI learn from?

Short answer: An AI learns only from the examples it is given: here, a list of names you choose. It knows nothing outside that list.

Why this step: An AI knows only what it is shown. Before anything else, you choose its examples.

Tap the places whose names it should learn. Add your own if you like.

Pick at least one place, or type 10 names.

What you just did: You gave it a list of names. That list is everything it will ever know.

Recipe card +1 Collect examples: a list of names it should sound like.

Check: Your list has only Tamil names. What will it invent?
Show the answer

Names that sound Tamil. It can only copy patterns that are in its data.

2

What does an AI model actually learn from data?

Short answer: An AI model learns one thing: which symbol usually comes next. Counting the letter after two letters shows the idea; the real model looks back up to 16 letters.

Why this step: See the one thing it is trying to learn first, and every later step makes sense.

Press Count to see which letter comes right after these two in your names. Tap another pair to count again.

What you just did: You counted which letter follows a pair in your names. That count is the pattern the model must discover by itself: nobody ever hands it the count.

Recipe card +1 Its one job: predict which letter comes next.

Check: What does this AI actually learn?
Show the answer

Which letter usually comes next. Everything it does is built on next-letter odds.

3

How does an AI turn text into numbers?

Short answer: Text becomes numbers before an AI can use it: here a = 1 … z = 26, and 0 marks the end of a name.

Why this step: A computer can only do maths, so letters must become numbers before it can learn anything.

Inside a computer, everything is a number, and this AI learns by doing maths. So letters must become numbers first. Type your name, or tap one of its names, to see how.

What you just did: You turned a name into numbers: a = 1 … z = 26, and 0 marks the end of a name.

Recipe card +1 Turn letters into numbers: a = 1 … z = 26, 0 = end.

Check: Why turn letters into numbers?
Show the answer

The model only does maths. Training is arithmetic; it cannot work on letters directly.

4

How is an AI model trained, step by step?

Short answer: An AI model is trained by guess, check, adjust: it guesses the next letter, compares it with the real one and nudges its numbers so the right letter gets a little likelier, thousands of times.

Why this step: In step 2 you counted the pattern yourself. A model is never given a count: it has to find the pattern by guessing and being corrected. First you do the correcting, then the real model does it alone.

You be the teacher. Show it your names one at a time and watch its guess move toward the count you made in step 2.

What you just did: You corrected a tiny model of 27 numbers, one per letter, until it matched your count. The real model did the same with 15,035 numbers and 16 letters of memory, so it can spot more than any two-letter count.

Recipe card +1 Train: guess the next letter, check, adjust, thousands of times.

Check: It gives “a” 4%, and the name shows “a” comes next. What does one correction do?
Show the answer

Raises “a” a little and lowers the rest. Small steps: one name can be unusual, so many names together set the odds.

5

When should you stop training an AI model?

Short answer: Stop training an AI model when it stops getting better on examples it never studied. Too early and it writes gibberish; too long and it starts repeating its training list.

Why this step: More training is not always better. Past a point it stops learning patterns and starts memorising your list.

You want new names, not your list back. Keep training and watch the COPIED share climb. Press Stop when you think it has gone too far: it then shows its best moment, judged on names it never studied.

What you just did: A tenth of your names were kept back as a test it never studies. You watched it improve on them, then start copying your list, and went back to its best moment.

Recipe card +1 Stop when unseen names stop improving, before it copies.

Check: It starts writing names straight from your list. What happened?
Show the answer

It trained too long and memorised. Past the sweet spot it learns your exact names instead of their patterns.

6

How does an AI generate text, one letter at a time?

Short answer: An AI generates text one piece at a time: its odds become a weighted spin, the spin picks a letter, and it repeats until it picks the end mark.

Why this step: Watching it write one letter at a time shows there is no lookup, only chance shaped by what it learned.

Press Next letter until the name ends. Each press draws a new wheel and spins it.

What you just did: You built a name letter by letter: each wheel's slices were its odds, and a spin picked the next letter until the end mark.

Recipe card +1 Write: pick each next letter by its odds until the end mark.

Check: Why does it give a different name each time?
Show the answer

Each letter is a weighted spin, not a fixed choice. Likely letters win more often, but any letter with odds can come up.

7

Does an AI model store its training data?

Short answer: Not as a list. A trained AI model holds only numbers (15,035 here). But numbers trained too long can soak up the data and rebuild parts of it: that is memorising.

Why this step: It wrote new names, and copied yours when trained too long. So is your list hidden inside it? Search it.

Search the model for a name from your list.

What you just did: You searched for a name and found only numbers that hold odds. The list is not stored, yet numbers trained too long can still reproduce names from it.

Recipe card +1 What it keeps: numbers holding odds, not a copy of your list.

Check: Your list is not stored in the model. Can it still write a name from your list?
Show the answer

Yes: trained too long, it memorises. The names are not kept as text, but numbers tuned too long can rebuild them. Big chatbots can do this too.

8

What is an AI model file actually made of?

Short answer: An AI model file is the numbers it learned plus a small program that runs them. How many numbers is chosen by its builders before training; training only changes their values.

Why this step: Seeing the finished thing lets you say what an AI model actually is.

Your AI is just the numbers it learned plus a small program that runs them. Download it as one file, or open one a friend sent you.

15,035numbers
+
programruns them
=
your AIone file

How is the number of parameters in an AI model decided?

Short answer: Its builders decide, before training. They pick a few sizes, and the count is the area of the tables those sizes make. Training changes the values of these numbers (called parameters), never how many there are.

Got a model file? It is read as numbers only, never run.

What you just did: You saw where its 15,035 numbers come from (tables whose sides are sizes its builders chose) and saved it as one file: those numbers plus a small program that runs them.

Recipe card +1 Ship it: the learned numbers plus a small program, in one file.

Check: Who decides how many numbers (parameters) an AI model has?
Show the answer

Its builders, before training. Builders pick the sizes (card size, memory, layers); the count follows. Training changes only the values.

Explain how an AI name generator works

Put your eight recipe lines in the order you built them. If you can do this, you can explain it to anyone.

Tap the lines below one by one, first step first.

  1. Collect examples: a list of names it should sound like.
  2. Its one job: predict which letter comes next.
  3. Turn letters into numbers: a = 1 … z = 26, 0 = end.
  4. Train: guess the next letter, check, adjust, thousands of times.
  5. Stop when unseen names stop improving, before it copies.
  6. Write: pick each next letter by its odds until the end mark.
  7. What it keeps: numbers holding odds, not a copy of your list.
  8. Ship it: the learned numbers plus a small program, in one file.
In one minute

A name generator learns from a list of names. Its one job is to predict the next letter. Letters become numbers, then it trains: it guesses the next letter, checks, and nudges its numbers, thousands of times. You stop training when names it never studied stop improving; after that it starts memorising your list. To write, it spins a weighted wheel for each letter until the end mark. Inside are only numbers that hold the odds, not your names. The finished AI is those numbers plus a small program, in one file. Big chatbots work the same way, with word pieces instead of letters and billions of numbers.

Go deeper: the maths behind Level 1

What just happened: how your model was made

  1. Your names your namesThe only thing it learns from.
  2. Letters become numbers a → 1 … z → 26, end → 027 symbols. Every name becomes a row of numbers.
  3. A blank model random numbersIts size is chosen before training. At the start every letter is a blind guess, about 1 in 27.
  4. Training loop hundreds of roundsEach round reads a handful of your names and nudges every number toward the right next letter. About a tenth of your names is kept back, never studied, to test it.
  5. Best moment kept its best stepWhere the kept-back names surprised it least. After that it starts copying your list.
  6. Your model file numbers + a small programThose numbers and a small program. No names inside, only odds.
  7. It writes a new nameIt rolls dice on its odds, one letter at a time, until the end mark.

Surprise, in bits

names it never sawnames it studies

A nudge by hand

One real training step on a practice copy: the bars and 8 of its real numbers, as dials.

A nudge = every number moves a tiny bit in the direction that makes the right letter likelier.

  1. Guessodds for every letter
  2. Checkagainst the real letter
  3. Nudgeturn every number a little
  4. Repeatnext example

Where its numbers come from

Two rules explain every line below.

  1. A card of numbers. Inside the model, every letter travels as a list of numbers: its card. The builder picks the card's length before training.
  2. A × B is a grid of dials. Turning a card of A numbers into a card of B numbers needs one dial for every pair: A × B dials. “+ B” is one starting value for each new number.
  3. All start random. Training nudges every one of them (step 4). None stores a name.

Worked example: a toy model you can count by hand

    Same rules, real sizes

    How big should it be?

    Drag to resize the brain. The count follows from your choices.

    15,035 numbers

    What three sizes really wrote recorded