LLMs for mobile engineers, from tokens to your app · Start here · 1 of 8
What a language model is
Before anything else, the one idea everything stands on. You send a model some text; it continues it. Here's what that program is, where it runs, and how your app reaches it.
The problem
Your product team wants "summarise this review" in the app. People call the thing that does it an AI or a model. Before any code: what is it, where does it run, and what does your app actually talk to?
See it
In training, a program reads huge amounts of text, learning what tends to come next. The result is a language model.
Step 1 of 4Give it any text and it continues it: "The capital of France is" becomes "Paris".
Step 2 of 4Large ones, LLMs, are too big for a phone: they run on a provider's servers. Predict: how does your app use one?
Step 3 of 4Through an API: an HTTP request with your text and a secret key, and a response with the continuation.
Step 4 of 4
The building block
A language model is a program that continues text. Give it "The capital of France is" and it continues with "Paris". Give it a review and "Summary:" and it continues with a summary.
It learned to do that in training: it was shown huge amounts of text and, again and again, asked what comes next, and adjusted every time it was wrong. The result is a program that, given any text, can score how likely each possible next word is. Picking likely words, one after another, produces an answer. (The next puzzle shows the exact unit it picks.)
The big ones are called large language models, LLMs. They're too big for a phone and run on a provider's servers: Anthropic's models are called Claude, Google's are called Gemini.
Your app reaches one through an API: an HTTP request to the provider, with your text in the body and a secret key that identifies your account, and a response with the continuation in it. To your code, it's a slow, expensive, very capable endpoint.
The analogy
Autocomplete on your keyboard, scaled up by a factor of millions. Your keyboard suggests the next word from what you typed; a language model does the same with whole paragraphs, because it has read far more.
Check yourself
Sources
- Anthropic: Glossary, LLM ("Large language models (LLMs) are AI language models with many parameters that are capable of performing a variety of surprisingly useful tasks. These models are trained on vast amounts of text data and can generate human-like text, answer questions, summarize information, and more"; models are "pretrained to predict the next word, given the previous context of text")
What you now know
A language model is a program trained on huge amounts of text until, given any text, it can score which words are likely to come next, and so continue it: answer a question, summarise a review. Large ones run on a provider's servers (Anthropic's Claude, Google's Gemini), and your app reaches them through an API: an HTTP request with your text, and a response with the continuation.
Answer every question above correctly to unlock the next puzzle.
Something wrong or unclear on this page? Tell me: a puzzle that didn't click is a bug in the puzzle.