liveBook · Manning

Language model

As explained in Coding with AI

A large language model is a neural language model trained on extensive data to understand and generate language, including programming-language text.

A large language model (LLM) is a neural network trained on massive text datasets to process and generate language. Its training can include natural language and source code, so it can produce translations, answers, prose, and programming suggestions. For developers, an LLM is the engine behind tools that turn requirements and nearby code context into likely code completions or larger drafts. section 1.4 section 1.1.1

An LLM does not retrieve a stored answer like a database. It processes a prompt through a mathematical model, estimates relationships in the input, and repeatedly predicts the most probable next word or character using both the prompt and its prior output. That probabilistic process can generate useful new combinations, but it can also give different answers to the same request. section 1.5.1 section 1.5

Figure 1.2 A transformer takes a sentence and analyzes word positions and relationships to try and extract meaning from the text it sees.
A diagram of a text

The Transformer view shows the basic path from prompt text to generated output: represent words numerically, retain position, and use self-attention to weigh relationships across a sequence in parallel. section 1.4

A practical AI-assisted Python workflow keeps the developer in control:

  • State a concrete task and constraints in a comment or prompt, rather than asking vaguely for code. section 1.1.1
  • Use the generated implementation as a starting point for prototyping, then adjust it to the actual requirements. section 1.1.1
  • Test code and verify factual claims; fluent output is still a prediction, not a validated result. section 1.5.1 section 3.1
  • Refine prompts iteratively with clear objectives, context, structure, and requested output format. section 9.7

CSV reporting assistant

A developer needs to read data.csv, keep rows whose status is active, average the value column, and write output.csv. A specific prompt can yield a complete draft with error handling. The useful next step is not blind acceptance: inspect the assumptions, adapt the logic and output for the project, then run tests against real and edge-case data. section 1.1.1 section 1.12

LLMs can help across ideation, planning, coding, testing, debugging, and documentation. Integrated tools such as GitHub Copilot and Tabnine provide IDE assistance, while standalone tools such as ChatGPT and Gemini suit broader tasks. Their value is often moving work from a blank page to a reviewable draft, leaving people responsible for design, judgment, validation, and final decisions. section 1.12 section 3.4

Treat confident output as a proposal, not evidence. An LLM can follow a plausible but false pattern because it predicts likely continuations rather than checking a truth database; it cannot independently authenticate information or supply genuine real-world understanding. Careful review matters especially for sensitive or critical work. section 1.5 section 3.1

How Coding with AI covers it

How deep it goes
Defines LLMs and traces Transformer processing through representations, positions, self-attention, and scalable parallel sequence processing.
Examples
Uses an active-status CSV filtering and averaging task to contrast traditional Python work with an AI-generated draft.
What it assumes
Assumes Python development interest while requiring no prior AI, mathematics, or data-science background.
What you can do after
Apply it via AI tools by prompting for drafts, revising generated code, and verifying outputs before use.
How it connects
Connects LLMs to Transformers, self-attention, prompt engineering, code generation, hallucinations, and databases.

Also explained in

Compare how 67 books explain language model →

Related concepts

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