Browse guides

Generative AI & LLMs articles

35
Generative AI & LLMs

Token

Models do not see letters or words; they see tokens, which are chunks of characters produced by a tokenizer. English averages roughly four characters per token, so 750 words is about 1,000 tokens. Tokens are also the billing unit and the unit of the context window, which makes this the most commercially relevant term in the glossary. In practice: ‘unbelievable’ might split into ‘un’, ‘believ’, ‘able’ — three tokens, one word. ...

Generative AI & LLMs

Tokenization

A tokenizer maps text to integers using a fixed vocabulary learned from data. It explains several famous quirks: models miscount letters because they never see letters, and non-English text often costs more tokens for the same meaning because vocabularies skew English. In practice: The same sentence in Greek can cost two to three times the tokens it costs in English.

Generative AI & LLMs

Top-p (Nucleus Sampling)

Top-p keeps the most likely tokens until their cumulative probability reaches p, then samples from just those. Unlike temperature it adapts to how confident the model is at each step. Tuning both at once usually makes behaviour harder to reason about — pick one. In practice: Top-p 0.9 ignores the long tail of unlikely tokens without flattening the whole distribution.

Generative AI & LLMs

Transformer

Introduced in 2017, the transformer replaced sequential processing with attention, letting the model look at every token in the input at once and weigh their relevance to each other. That parallelism is what made training on internet-scale text practical. The ‘T’ in GPT stands for transformer. In practice: In ’the trophy did not fit in the case because it was too big’, attention is how the model connects ‘it’ to ’trophy’. ...

Generative AI & LLMs

Vector Database

Vector databases index high-dimensional vectors so that ‘find the most similar items’ runs in milliseconds across millions of records. They are the storage layer under most RAG systems. Whether you need a dedicated one or just a vector extension on your existing database depends entirely on scale. In practice: Storing every paragraph of your docs as a vector so a support bot can retrieve the right three.