Skip to content
PHP2Shell: The PHP Bug
Akshay Thakare

Interview preparation

Answers that explain the decision, the reason, the evidence and the limit — not one-liners.

Choose a question

Swipe to browse

Interview answer

01 / 09

How does an LLM generate text?

It predicts one token at a time.

Each step scores every token in the vocabulary, samples one according to the temperature, appends it to the context and repeats until a stop token or the length limit.

Visual walkthrough

next-token prediction

Data pipelines must be idempotent so that a rerun never doubles revenue

Done — the model emitted an end token.

The model never writes a whole sentence at once. It predicts one token, appends it, and predicts again.