liveBook · Manning

Transformer architecture

As explained in Essential GraphRAG

A transformer architecture is a neural-network architecture that processes sequences using attention-based representations and supports efficient language modeling.

Transformer architecture is the foundation of large language models (LLMs), enabling efficient text processing and generation through learned patterns in extensive textual data. Training commonly uses next-word prediction, allowing models to capture grammar, context, associations, and some reasoning behavior. section 1.1

This architecture supports instruction-following outputs such as structured responses or creative writing, but it does not guarantee current, factual, or private knowledge. Retrieval-augmented generation (RAG) supplies external facts when the model's internal knowledge is insufficient. section 1.1 section 1.5

Next-word prediction

Given “Never gonna,” an LLM may generate “give you up,” demonstrating how training data provides associations that guide sequence completion. section 1.1

Figure 1.4 Neural network trained to predict the next word based on the input sequence of words
figure

Visualizes a neural network predicting the next word from an input sequence. section 1.1

How Essential GraphRAG covers it

How deep it goes
Defines the architecture’s role and training objective but stops short of explaining internal mechanisms or implementation details.
Examples
Uses next-word completion, “Never gonna” to “give you up,” and haiku generation as concrete LLM examples.
What you can do after
Evaluate/understand how transformer-based LLMs generate text and why external retrieval can improve factual responses.
How it connects
Connects transformer architecture to LLMs, RAG, knowledge graphs, and external knowledge bases.

Also explained in

Compare how 28 books explain transformer architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Essential GraphRAG. The section links point to the parts of the book it draws on.