What generative AI is
Generative AI is AI that produces new content, such as text, images, audio or computer code, rather than only sorting or scoring what already exists. It learns patterns from very large amounts of example data, then uses those patterns to produce something new in response to an instruction, called a prompt.
It helps to compare it with the AI that came before:
- Predictive AI answers a narrow question about existing data: is this transaction likely to be fraud, which category does this document belong to, what will demand be next month?
- Generative AI produces an open-ended output: a summary, a draft letter, an answer to a question, an image.
Language models are the best-known kind of generative AI, and they are the focus of this course. The same underlying ideas also power image, speech and code generation.
Generative AI is powerful because it is flexible: one model can summarise, translate, draft and answer questions. It is risky for the same reason: its output is new text, and new text has not been checked by anyone.
How large language models work
A large language model (LLM) works with tokens: small pieces of text, often a word or part of a word. Given a sequence of tokens, the model estimates which token is most likely to come next, adds one, and repeats. Long, fluent answers are built one token at a time.
Most current language models are based on the transformer, a neural-network design introduced by Google researchers in 2017. Its key idea, called attention, lets the model weigh how every part of the text relates to every other part.
A model is usually built in stages:
- Pre-training on a very large body of text, where the model learns language and a broad picture of the world by predicting missing or next tokens.
- Fine-tuning on examples of instructions and good answers, so the model follows requests instead of just continuing text.
- Alignment, often using human feedback, to make answers more helpful and to refuse harmful requests.
Three terms come up constantly. Parameters are the learned numbers inside the model; "large" means billions of them. The context window is how many tokens the model can consider at once, including your prompt and its answer. Temperature controls how adventurous the choice of next token is: low values make answers more predictable, higher values more varied.
Small language models
A small language model (SLM) uses the same ideas with far fewer parameters. There is no official cut-off, but the term usually means models from a few hundred million to a few billion parameters, compared with tens or hundreds of billions for the largest models.
Small models have real advantages:
- They run on ordinary hardware, including laptops and, for the smallest, phones.
- They keep data private, because they can run inside your own systems or on the device.
- They are cheaper and faster to run, which matters when you process large volumes.
The trade-off is breadth. A small model knows less about the world and is weaker at open-ended reasoning. It shines when the task is narrow and well defined, such as extracting fields from a type of message or classifying documents, and especially when it has been fine-tuned on examples of that task.
Small models are often trained partly by distillation: a smaller model learns to imitate the outputs of a larger one. The practical rule is to start with the smallest model that passes your own tests, not the largest one available.
Retrieval-augmented generation (RAG)
A language model only knows what was in its training data, which stops at a date and does not include your organisation's documents. Retrieval-augmented generation (RAG), a term introduced in a 2020 research paper, solves this by finding relevant material first and giving it to the model with the question.
A typical RAG system works in two phases:
- Preparation: documents are split into short passages (chunks). Each chunk is turned into an embedding, a list of numbers that captures its meaning, and stored in a searchable index, often called a vector database.
- Answering: the question is turned into an embedding too, the most similar chunks are retrieved, and they are placed in the prompt with an instruction to answer from them and cite them.
Many systems combine this meaning-based search with ordinary keyword search, because exact terms such as names, codes and numbers are easy for keyword search and hard for embeddings.
RAG brings three benefits: answers can use current and private information without retraining the model, each answer can point to its sources so a person can check them, and access rules can be applied to what is retrieved. Its limits are just as important. If retrieval finds the wrong passages, the answer will be wrong, and a model can still misstate what a passage says. RAG reduces made-up answers; it does not remove them.
Limits and safe use
Every language model, large or small, with or without RAG, has limits you need to design around:
- Hallucination: fluent, confident answers that are simply not true.
- Variability: the same question can get a different answer after a change of model, prompt or settings.
- Prompt injection: instructions hidden in documents or web pages can hijack the model's behaviour, which matters most when a model can use tools.
- Bias carried over from training data.
- Data exposure: text sent to an external AI service leaves your control.
When models are given tools and allowed to take steps on their own, they are called AI agents. The more an agent can do, the more important it is to limit its permissions, record what it did and keep a person's approval for consequential actions.
The safest pattern for regulated work is to let the model advise (summarise, explain, suggest) while fixed rules and people decide. Test the system on your own cases, record the model version, and measure how often its suggestions are right before relying on them.
In Saolix Eagle, the triage copilot explains an alert by retrieving similar resolved cases, with no language model on that path, and an optional AI agent can suggest a label. Neither can close an alert: rules and people decide. The full reasoning is in the Insights article Why AI advises and rules decide.
Ten questions
Answer all ten questions, then check your answers. You need 8 out of 10 to pass, and you can try as many times as you like. Your answers, progress and times are kept only in this browser.
Your certificate of completion
Enter your name as you want it to appear, then save the certificate as a PDF. In the print window, choose Save as PDF.
Saolix does not record who takes this course, so it cannot verify these certificates. The certificate confirms completion of a free self-paced course and is not an accredited qualification.