liveBook · Manning

Language model

As explained in AI-Powered Developer: Build software with ChatGPT and Copilot

A large language model is a deep learning model trained to process and generate human language and other text-like sequences.

A large language model (LLM) is a deep-learning AI model that processes, understands, and generates human-like text from patterns learned in vast text collections. Its scale reflects both training data and parameter count; models such as GPT-4 can have hundreds of billions of parameters. Most use Transformer architectures with self-attention to weigh words by context rather than position alone. section 1.2

For software work, treat an LLM as a capable junior teammate: describe a task in natural language, inspect the response, and guide revisions. It can draft boilerplate, explain unfamiliar libraries, flag possible defects, suggest refactorings, generate documentation, and help explore languages or frameworks—freeing attention for design and higher-value problem solving. section 1.0 section 1.1

Listing 1.1 Potential code generated by an LLM to stub out a Flask application
from flask import Flask
 
app = Flask(__name__)
 
@app.route('/')
def home():
    return "Hello, world!"
  
if __name__ == '__main__':
    app.run(debug=True)

A short Flask stub illustrates the useful baseline: a plain-English request can yield a runnable starting point, but integration, testing, and design decisions remain developer work. section 1.1

Review a suggested fix

An LLM can identify a large Python list that remains referenced after processing and propose clearing that reference. Treat this as a hypothesis to test, not proof: outputs can vary and may contain subtly wrong answers. Verify behavior before adopting generated code in a codebase. section 1.1 section 1.3

Use LLMs selectively:

  • Use them for repetitive or exploratory work, including boilerplate, coding suggestions, documentation, testing automation, and example-driven learning. section 1.3
  • Avoid or limit them when prompts expose sensitive or proprietary data, since supplied code may leave the firewall as model context. section 1.3
  • Require review where precision or specialized expertise matters; randomized output can introduce hallucinations or subtle errors. section 1.3
  • Consider local models when connectivity is unavailable or offline use matters, while accounting for hardware, memory, installation, and output-quality trade-offs. section 9.0 section 9.2

Prompting is a dialogue rather than a fixed script. Results depend on the model, prior context, and wording, so compare alternatives, understand differences, and refine requests. The same prompting skills can transfer between hosted and local options, including Dockerized Ollama and GPT-4All. section 1.0 section 9.1 section 9.2

How AI-Powered Developer: Build software with ChatGPT and Copilot covers it

How deep it goes
Defines LLMs and sketches training, parameters, Transformers, and self-attention while deferring deeper neural-network theory.
Examples
Uses Flask scaffolding, Python session management, memory-leak analysis, code refactoring, and a Dash stock-price dashboard.
What it assumes
Assumes programming experience and teaches practical LLM use with only a light theoretical introduction.
What you can do after
Apply it via AI tools to draft, inspect, refine, and verify code while protecting sensitive data.
How it connects
Connects LLMs with generative AI, natural language processing, Transformers, self-attention, GitHub Copilot, ChatGPT, and local models.

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 AI-Powered Developer: Build software with ChatGPT and Copilot. The section links point to the parts of the book it draws on.