Chain-of-Code is a specialized prompting technique within the broader family of Chain-of-Thought reasoning. It instructs a large language model (LLM) to decompose a complex problem and articulate its solution using an executable programming language, typically Python. This approach externalizes the model's reasoning into a formal, deterministic script that can be run by an interpreter to compute the final answer, effectively using code as an explicit, verifiable scratchpad for intermediate logic.
