AI GLOSSARY · CODING AGENTS AND CODING TOOLS
Code generation (AI)
Definition
AI code generation is the use of a language model to produce program code, usually from a plain-language description or the code around the cursor. The output is text that may contain bugs, so it needs review and testing.
Also called: AI code generation, code generation AI, LLM code generation, generate code with AI, AI-generated code.
In plain language
AI code generation means asking a program to write code for you. You describe what you want, for example a function that checks whether an email address looks valid, and the model writes a first version. It is like asking a fast junior colleague for a draft: useful, but you check it. The draft can be buggy, duplicative or unnecessary, and it can introduce security problems, so you run it and read it before relying on it. Generating code is also not the same as running it. The model produces text; a separate step has to execute that text and see whether it works.
Technical definition
Code-generation models are language models trained on large amounts of source code and text and used to continue a prompt, such as a docstring, a comment or surrounding code, with code. The Codex paper (Chen et al.) evaluated a GPT model fine-tuned on public GitHub code on writing Python functions from docstrings, and evaluated results for functional correctness on the HumanEval benchmark. Its pass@k evaluation counts whether any of k sampled candidates passes the benchmark tests; that evaluation does not mean deployment has access to an oracle for selecting correct code. Tools around the model add context from your files and can run tests on the output.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Matt Pocock · Illustrative, not executed
tdd 30/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A test-first red-to-green loop for a feature or bug fix, one slice at a time. This pinned skill leaves refactoring to the review stage.
- Why it exercises the concept
- The Codex paper evaluated generated code for functional correctness; writing the test first gives generated code the same kind of check before you accept it.
Skill by Skill Almanac · Illustrative, not executed
spec-driven-build 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Builds a feature from an agreed spec, one numbered requirement at a time, with acceptance tests as evidence for each requirement.
- Why it exercises the concept
- A written spec is the prompt that generation starts from, and the tests supply evidence about the requirements instead of relying only on the draft.
Guide · Illustrative, not executed
What Is Vibe Coding and When You Must Read the Code
- What you see
- The guide explains vibe coding, building software by describing it to an AI tool, and what to check before you ship the result.
- Why it exercises the concept
- Vibe coding is code generation used as the main way of working, so the guide shows the review step that this entry says is needed.
Coding tool · Illustrative, not executed
Claude Code
- What to try
claude- What you see
- Claude Code starts in your project, and its docs describe it as planning an approach, writing code across multiple files and verifying that it works.
- Why it exercises the concept
- It shows generation inside an agent that can run the result, not only produce text.
How it shows up when you use agents
In a coding agent, generation is one step in a loop. You describe a task, the model writes code, and the tool can write it to files and run it. IBM defines AI code generation as producing code from natural language instructions or partial code snippets. The Claude Code overview describes the same flow, planning an approach, writing code across multiple files and verifying it works.
The generated text is a proposal. IBM states that AI-powered coding software can generate code that is buggy, duplicative, inaccurate or unnecessary, and that it might introduce security vulnerabilities. In a session this shows up as a function that compiles but ignores an edge case, or a call to a library method that does not exist (see Hallucination).
What breaks when this is misunderstood: you accept a large generated change because it reads well. A safer habit is to ask for a test first, run it, read the diff and keep changes small. The AI coding assistant entry covers the tools that do this, and HumanEval covers how generation is scored by unit tests.
Common confusions
- Generation versus completion. Completion continues a supplied input and can produce multiple lines or a whole function. It is one way to generate code, so the two categories overlap.
- Generation versus execution. The model writes text. Running it, and learning whether it works, is a separate step done by you or by an agent.
- Generation versus vibe coding. Code generation is the technique. Vibe coding is a working style that relies on it heavily.
- Myth: passing a benchmark means correct in your project. The Codex paper scored Python functions against unit tests; your codebase, libraries and requirements differ, so test in place.
Related terms
Terms that mention Code generation (AI)
5 terms mention this one
More in Coding agents and coding tools
Sources
- Evaluating Large Language Models Trained on Code, arXiv (Chen et al.) (accessed 2026-11-24)
- What is AI code generation?, IBM (accessed 2026-11-24)
- Claude Code overview, Anthropic (Claude Code Docs) (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft) and OpenAI Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : Targeted source repairs: Matched pinned TDD red/green and separate refactoring; corrected completion overlap and sampling evaluation scope; tests described as evidence. Independent affected review pending; no publication approval.
- : First version.
- : Verifier pass: applied verifier corrections to wording and sourcing.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.