One-page explainers of the core AI ideas: what it is, how it works step by step, and what to remember.
How LLMs work
A large language model reads text as tokens and predicts the most likely next token, again and again. Training on huge amounts of text gives it grammar, facts and patterns; extra training with human feedback makes it more helpful.
How it works
1Text is split into tokens
2Tokens become numbers (embeddings)
3Transformer layers use attention to weigh context
4The model scores every possible next token
5One token is picked, added, and the loop repeats
Remember
• It predicts likely text; it does not look facts up unless you give it tools or documents
• Temperature changes how adventurous the picks are
An embedding turns text into a list of numbers that captures its meaning. Texts with similar meaning get similar numbers, so you can search by meaning instead of exact words.
How it works
1Split documents into chunks
2Turn each chunk into an embedding
3Store them in a vector database
4Embed the user's question
5Return the closest chunks
Remember
• Use the same embedding model for documents and questions
Retrieval-augmented generation finds relevant passages from your documents first, then asks the model to answer using only those passages. It keeps answers current and checkable without retraining the model.
How it works
1User asks a question
2Retrieve the most relevant chunks
3Put them in the prompt with clear instructions
4The model answers and cites sources
5Log and evaluate the results
Remember
• Bad retrieval means bad answers: measure it
• Always show sources
• Tell the model to say "I don't know" when the context lacks the answer