How AI's Actually Work — HAAW

The Prompt Arrives

For the first time in our journey, information from a user enters the running AI system.

The Machine Has Been Waiting

Linux is running. The inference service is running. The model's trained parameters are available to the accelerator. Now someone types something.

USER INPUT
Why is the sky blue?

To us, that is a sentence with words, grammar, and meaning.

But the model cannot directly feed the characters on our screen into its transformer calculations. The input has to pass through several ordinary software layers and then be converted into the numerical representation expected by the model.

1. The User Submits the Prompt

The text may originate in a web browser, application, command-line program, API client, or another service.

When the user submits it, software packages the request for transmission. Depending on the system, the request may contain much more than the visible sentence.

User Text

The words the user entered.

Conversation Context

Previous turns or other context may also be included when the application constructs the model input.

Instructions

Some systems include system, developer, formatting, tool, or application instructions in addition to the visible user message.

Request Metadata

Identifiers, generation settings, authentication information, routing data, or other service-level information may accompany the request.

The visible prompt and the complete model input are not necessarily the same thing.

The application or serving system may assemble additional text or structured information before model inference begins.

2. The Request Travels Through Ordinary Computing

Before anything reaches the neural network, familiar computing mechanisms do the work.

User / Client Application
↓
Network Request
↓
Operating System Network Stack
↓
AI / Inference Service

Packets, sockets, memory buffers, processes, authentication, routing, and service code are ordinary computer-system mechanisms. The AI model itself does not need to perform TCP/IP networking to receive a prompt.

This is another useful HAAW boundary: a great deal can happen around an AI model without happening inside the model.

3. The Inference Service Builds the Model Input

The serving software receives the request and prepares the material that will actually be processed.

For a conversational model, this can include multiple roles or messages arranged according to the model's expected input format. Special markers may be inserted to distinguish boundaries or roles.

SIMPLIFIED CONCEPTUAL INPUT
[system/instructions]
[earlier conversation, if supplied]
[user] Why is the sky blue?
[assistant response begins here]

This example is deliberately conceptual. Exact formatting differs among models and serving systems.

4. Text Meets the Tokenizer

Now we reach our first AI-model-specific translation step.

The model does not operate directly on English words or Unicode characters. Its tokenizer converts the prepared text into a sequence of tokens.

A token is a unit from the tokenizer's vocabulary. Depending on the tokenizer and text, a token may correspond to a whole word, part of a word, punctuation, whitespace-related patterns, or other byte/character sequences.

A token is not simply “a word.”

Some words may be represented by one token. Others may require several. Punctuation and spaces can affect tokenization too.

5. Tokens Become Token IDs

Each token in the tokenizer's vocabulary has an associated integer identifier.

So conceptually, our human-readable sentence undergoes a transformation like this:

"Why is the sky blue?"
↓
Tokenizer
↓
Token sequence
↓
integer token IDs

We are intentionally not assigning example ID numbers here because the actual token boundaries and IDs depend on the specific tokenizer and vocabulary used by the model.

What Does the Model See?

This phrase needs some discipline.

It is tempting to say that the model “sees the words.” Mechanically, however, the next stage receives a sequence of numerical token identifiers representing the prepared input.

HUMAN VIEW
Why is the sky blue?

MODEL PIPELINE VIEW — CONCEPTUAL
[ token_id, token_id, token_id, token_id, ... ]

The IDs themselves are labels. An integer such as a hypothetical 12345 does not mean “five times as much” as another ID such as 2469. The numbers identify vocabulary entries.

Something else must turn those identifiers into numerical vectors that the neural network can actually calculate with.

6. The Sequence Has Order

The prompt is not merely a bag of token IDs. Their order matters.

Changing the sequence can change the text completely:

dog bites man
man bites dog

The same words appear, but the ordered sequences express different relationships. The model's later computation therefore has to preserve and represent information about sequence position as well as token identity.

We will see where that enters the computation on the next page.

What Has Happened So Far?

Human enters text
↓
Application constructs request
↓
Request reaches inference service
↓
Complete model input is assembled
↓
Tokenizer divides input into tokens
↓
Tokens are represented by integer IDs

The Boundary

We began with language a human could read.

We now have an ordered sequence of token identifiers.

But the transformer still has not processed the prompt.

The token IDs must first be transformed into the high-dimensional numerical representations used by the neural network.

That is where we go next.

HAAW Checkpoint

Established mechanism
Serving software receives and prepares input before neural-network inference.
Established mechanism
A tokenizer maps text into tokens and then into vocabulary identifiers.
Important distinction
Token IDs identify vocabulary entries; their integer magnitude does not encode the meaning of the token.
System boundary
Networking, request routing, and much of prompt assembly occur around the model rather than inside its transformer layers.
Implementation-dependent
The exact tokenizer, prompt template, special tokens, context construction, and request path depend on the deployed model and serving system.
Still ahead
Turning token IDs into vectors and adding information that lets the model work with their positions in the sequence.