PreviewYou're previewing CTO AI Forge. Sign in to use it.Sign in
← All lessons
L0 · AI basics for technology leaders8 min read

How large language models work, for technology leaders

A large language model (LLM) is a neural network trained on a huge amount of text and code to predict the next token (a word or piece of a word). Everything a coding assistant does — completing a line, writing a function, explaining a stack trace — comes from that one skill applied over and over.

Four things that matter more than the maths

  1. The context window. The model only "knows" what is in its training data plus what you send it in the prompt: the open file, related files, docs, the ticket. Most quality problems in AI coding are context problems: the model never saw the internal library it should have used.
  2. Probabilities, not facts. The model produces the most plausible continuation. Plausible code usually compiles; it is not always correct, secure or consistent with your architecture. Tests and review stay essential.
  3. Tokens cost money and time. You pay per token sent and received, and longer prompts are slower. Agents that read whole repositories and retry many times can use orders of magnitude more tokens than autocomplete.
  4. Models change. Vendors release new versions every few months. A new model can be better on average and worse on your use case — which is why later levels cover evaluations.

Assistant, chat, agent

  • Inline assistant: suggests the next lines while you type.
  • Chat: answers questions and writes larger pieces on request, inside the IDE or a browser.
  • Agent: an LLM in a loop with tools — it can read files, run tests, edit code and open a pull request with little human input in between.

What "AI writes X% of our code" means

When a company says a share of its code is AI-generated, ask three things: how is it counted (accepted suggestions, lines in merged changes, or delegated tasks), who reviews it, and did delivery outcomes change. The percentage is an input; lead time, quality and cost are the outcomes.

What this means for the CTO

As CTO you don't need to train models. You need to know why they fail — missing context, plausible-but-wrong output, cost and change over time — because each failure mode maps to an investment you control: context and retrieval, tests and review, cost controls, and evaluations.

Use one habit in every AI conversation: separate the input metric ("40% of code is AI-written") from the outcome metric (cycle time, change-failure rate, roadmap delivered). Boards and vendors quote inputs; your job is to report outcomes.

A practical first step: ask your teams which AI tools they already use, for which tasks, and with what data. You will usually find more usage than you expected — and a few places where code or secrets are leaving the company without anyone deciding that.

Diagram

How large language models work, for technology leaders

Real example

On Alphabet's Q3 2024 earnings call (October 29, 2024), CEO Sundar Pichai said: "more than a quarter of all new code at Google is generated by AI, then reviewed and accepted by engineers." Note the second half of the sentence: the AI share is counted after human review and acceptance. Source: Alphabet — Q3 2024 earnings call: CEO Sundar Pichai's remarks (Oct 29, 2024) ↗

Use it

Quick check · 3 questions

  1. 1.Why does a coding assistant sometimes ignore your internal libraries?

  2. 2.Which is an OUTCOME metric rather than an input metric?

  3. 3.What makes an agent different from an inline assistant?

0 of 3 answered

Sources

Last reviewed 2026-10-01.