Skip to main content

How does AI work?

Artificial intelligence can do some amazing (and sometimes not so amazing) things. But how does it work? This page explains how text and images are produced by AI.

How does an AI tool generate text?

Tools that generate text are a type of AI called a ‘large language model’ (LLM). They have this name because they are large, very complex computer programs that are fed billions of words of text (a process called ‘training’) until they become good at understanding the patterns of language—not only grammatical patterns, but also which words and phrases are related to each other and how they tend to appear together in a text.

When you ask one of these tools a question, it analyses your question and tries to answer you based on the patterns it knows. These generative-text tools are based on statistical models of language patterns, so as they write your answer, they are continually analysing probabilities to guess which word or phrase is most likely to appear next in a piece of clear and coherent writing.

While LLMs are not themselves search engines, many new LLMs and generative-text AI tools use what is called 'retrieval-augmented generation', meaning that they search the web in real time to help provide a current and accurate response. They can still make mistakes, however, and anything that they produce needs to be carefully evaluated.

How does an AI tool generate an image?

Like generative-text tools, AI tools that create images based on a text description are trained on very large sets of data until they’ve learned what patterns make an image look realistic—for example, the usage of colour, texture and lighting, and the way objects are arranged—as well as what text descriptions match different types of images.

Image-generating tools can create art in different styles because of the large number of images they’ve already analysed. Similar to LLMs, these tools mimic the visual patterns of millions of other images. It should be noted that in many cases, artists have not been consulted before their work was used to train these tools, leading to ethical concerns.

Koala riding the train
Image generated using Adobe Firefly from the prompt 'a close-up photo of a koala riding the train in Melbourne'. Image by RMIT, licensed under Adobe Creative Cloud for Education.

As AI-generated image tools have become more advanced, it has become easier and easier to create realistic-looking fake images and even videos. It is important to apply critical thinking skills when encountering images and videos online, now more than ever. And acknowledging when you create images with AI is one way to ensure you are engaging your audience with honesty and clarity. This can be done by adding a watermark or image caption.