Advanced

Build your own chatbot

Try two ways a chatbot can answer the same message. Rules looks for keywords, assigns a label (like “help” or “hello”), then returns a prepared reply. Next-word builds a reply one word at a time: after each word, it shows the most likely next words and their chances, then picks one and continues. Compare runs both on one prompt so you can see the difference.

Back to Lab Home

Scout I’m Scout. Pick Rules, Next-word, or Compare above. In Next-word mode, each step shows which words could come next and how likely each one is. Ask me if a word is unclear—for example “token” or “probability.”

Rules mode

The bot scans your message for keywords, picks a category (intent), then returns a reply that was written in advance for that category. If nothing matches, it says it is unsure instead of inventing a long answer.

Next-word mode

The bot was “trained” on a fixed block of practice text on this page. It counts how often word B follows word A (and pairs of words). To write a reply, it keeps choosing a likely next word and adding it. Big chat apps use the same loop (add one piece, repeat), but with much larger training and different scoring.

Token and probability

Here a token is a word. Example: build a bot → build · a · bot.
Probability of a next word = how often that continuation showed up after the same previous word(s) in the practice text, divided by all continuations seen there. That is a teaching demo, not a guarantee the sentence is true or wise.

Try it

Type one message, choose a mode, then press Run. Nothing runs until you press the button.

Privacy tip: Don’t paste passwords, API keys, or private personal data. This lab runs in your browser. Next-word replies follow patterns in the practice text—they are not advice or verified facts. Privacy

Mode: Rules — keyword category, then a prepared reply.

Rules result

What the rules bot measured on your message. Tap a card if you want the term explained.

Ask Scout

Questions about words on this page, or a quick chat that uses the Rules bot. For the probability steps, use Next-word or Compare.

Mark this lab complete

When you’ve run at least one message and opened the step outputs, mark the lab complete. Progress is saved in this browser.

← Intermediate

Lab complete

You tried a rules bot (category + prepared reply) and/or a next-word bot (pick each word from chances in the practice text). Compare puts both on the same message.

← Intermediate — Trails 04–06 · The Lab