> For the complete documentation index, see [llms.txt](https://docs.folio.works/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.folio.works/your-role-in-building-better-ai/how-ai-models-actually-work.md).

# How AI Models Actually Work

#### The Building Blocks

At its core, a Large Language Model (LLM) is an advanced text-prediction system. It reads billions of examples of human writing and learns statistical patterns, like which words tend to follow other words, how sentences are structured, and how conversations flow.

Before training, all that text needs to be processed:

1. Data collection: Gathering text from websites, books, documentation, code
2. Cleaning: Removing spam, duplicates, low-quality content
3. Tokenization: Breaking text into small chunks (words, subwords, characters)
4. Encoding: Converting tokens into numbers the model can process

***

#### How Models Process Information

Inside an LLM is something called a transformer: think of it as the model's brain. It breaks sentences into tokens and constantly asks: which earlier words matter most for predicting what comes next?

Over time, the model learns patterns in sentence structure, tone, and basic reasoning. Its parameters (internal settings) control how much attention it pays to different patterns.

{% hint style="info" %}
In AI training, you won't redesign the model's architecture, but your feedback shapes what patterns it learns. When a model loses track of earlier conversation context, gives vague answers, or misses subtle instructions, you catch these failures and teach it to do better.<br>
{% endhint %}
