liveBook · Manning

Language model

As explained in AI Agents for Offensive Security

A large language model is a machine-learning model trained on large text corpora to interpret and generate natural language.

A large language model (LLM) is a deep neural-network text-prediction system trained on massive text corpora. It learns statistical relationships among tokens—units that can range from characters and words to sentences and paragraphs—and generates by selecting likely next tokens from the available context. At scale, this supports natural-language tasks such as summarizing logs, rewriting code, and describing an attack surface. section 1.2 section 2.2

Figure 1.3 An illustrative example of how an LLM generates the next token. As the LLM generates a sentence, it considers the context of the previous words that were generated. The LLM takes in the last token and assesses the probability of the next token. In the example above, since green has the highest logit value, it is the next word to be generated in the sentence.

Next-token generation is context-dependent: the model scores possible continuations and emits the likely next token. section 1.2

In security work, an LLM can turn scanner or API output into structured interpretation: summarize findings, identify anomalies, and suggest next steps. This is useful when engagements produce more endpoints, parameters, headers, and responses than a person can inspect directly. Its role is interpretive reasoning over textual inputs, not independent execution or durable state management. section 1.2 section 2.1 section 2.2

Treat an LLM as a stochastic reasoning API with explicit operational limits:

  • It can hallucinate: produce plausible, confident information that is incorrect or fabricated. section 1.2
  • Its output is non-deterministic, so identical input can yield different responses; high-stakes security decisions require validation. section 1.2
  • It has no memory between API calls, reacts to individual prompts, and cannot by itself persist state, adapt to environmental changes, or justify decisions. section 2.1 section 2.2
  • Training data requires careful curation because models can memorize or overfit poorly cleaned data. section 1.2

An AI agent extends an LLM rather than replacing it. The LLM supplies language generation and reasoning; orchestration determines the next step. Tools enable external actions, memory preserves prior interactions, and a knowledge base supplies grounding context. With goals, planning, evaluation, and feedback loops, the surrounding system can perceive, reason, act, observe, and repeat—while retaining artifacts that make behavior reviewable and replayable. section 1.3.1 section 2.2

Controlled recon-data triage

A controlled agent can wrap an LLM with explicit messages, tools, and artifacts to interpret reconnaissance data as a decision-making loop. The resulting actions and observed responses can be recorded for inspection, replay, and defense. Human intervention and control gates remain necessary when outcomes affect a security engagement. section 2.0 section 2.2

Use LLM output as a candidate interpretation, then validate it through skilled human review and controlled pipeline stages for input, reasoning, action, evaluation, and reporting. This preserves the model’s ability to scale analysis without treating generated text as authoritative security evidence. section 1.7 section 1.2

How AI Agents for Offensive Security covers it

How deep it goes
Defines token prediction and operational limitations, then defers autonomous behavior to agent orchestration, memory, and tools.
Examples
Uses log summarization, code rewriting, attack-surface description, and scanner or API-output interpretation as examples.
What it assumes
Introduces LLMs from token prediction while assuming familiarity with security artifacts such as scans, APIs, and reconnaissance data.
What you can do after
Evaluate/understand when generated security interpretations require validation and controlled agent-pipeline boundaries.
How it connects
Connects LLMs to AI agents, orchestration, tools, memory, knowledge bases, pipelines, and human oversight.

Also explained in

Compare how 89 books explain language model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents for Offensive Security. The section links point to the parts of the book it draws on.