Multimodal LLMs and the Rise of "Broad Coding": A Practical Guide
This article explores how multimodal large language models extend coding beyond plain text to images, layouts, and visual deliverables. It explains the core idea of "broad coding," three architectural shifts driven by long-horizon consistency and visual input, and three hands-on practices: turning reference images into code-built 3D scenes, generating narrated videos from audio timelines, and parametric mechanical modeling with numerical verification. It closes with engineering recommendations for constraints, layered generation, verification, and asset reuse.
1. From “Writing Code” to “Broad Coding”: Redrawing the Boundary
To evaluate a coding model in the past, the main question was whether it could make steady progress on long-context tasks: understand an existing project structure, modify it under constraints, and keep iterating without losing the goal. Once models gained visual understanding, the input space expanded from plain text to images and layout information, and the deliverable expanded from “runnable code” to “visual artifacts.” This is the core meaning of so-called “broad coding”: work that used to require manual clicking, dragging, and aligning in specialized software is abstracted into parameters, geometric constraints, and rendering scripts, with the model generating code to drive the output.
It is worth stressing that broad coding does not replace specialized software. Instead, it turns the “operation process” into versionable code assets. The output of manual work is hard to reproduce, whereas scripts can be reviewed, diffed, rolled back, and reused. This is the key engineering benefit.
2. Three Changes Brought by Architecture and Multimodal Input
First, better consistency on long-horizon tasks. Loop-style structures (often discussed in the industry as ideas like the Loop Transformer) repeatedly refine representations over the same parameter set, helping the model stay aligned with the goal during long tasks and reducing mid-way drift.
Second, a complete input modality. The ability to read images lets the model treat a reference image as a constraint rather than a vague description, reducing ambiguity in requirements.
Third, expanded output forms. Outputs now extend from functions and scripts to scene-building scripts, timeline orchestration scripts, and parametric part definitions.
3. Practice One: Building a 3D Scene from a Reference Image in Code
It is advisable to split the workflow into four steps to avoid the loss of control that comes from generating everything at once:
- Turn the reference image into constraints: specify the subject, orientation, entrance location, and number of components, and deliberately remove occlusions (such as vegetation and people) to reduce model misjudgment.
- Decompose the scene: break the target into modules such as base, columns, beams, roof, and railings, and parameterize each module independently.
- Generate scripts and validate in layers: first validate scale and positional relationships, then validate details.
- Review by rendering: render from a fixed camera position and perform a structural alignment check against the reference image.
Illustrative script structure (pseudocode, used to explain the layered idea):
# Centralized parameters for easy re-adjustmentPARAMS = {"base_steps": 3,"column_count": 4,"column_height": 2.4,"roof_pitch": 0.35,"railing_side": "right",}def build_base(p): ... # steps and platformdef build_columns(p): ... # column arraydef build_roof(p): ... # roof and pitchdef build_railing(p): ... # railingfor fn in (build_base, build_columns, build_roof, build_railing):fn(PARAMS)
Prompt essentials: first state the role and constraints (for example, “output the parameter table first, then the script”), then give acceptance criteria (front steps facing the entrance, four symmetric columns, railing on the right side), and finally require that “if information is insufficient, explicitly list assumptions.” This can significantly reduce hallucination.
4. Practice Two: Automatic Generation of Narrated Explainer Videos
When a voiceover audio track already exists, video production can be abstracted into a code problem of “timeline + assets + motion”:
- Voice alignment: split shots by sentence-level timestamps to avoid manual timeline alignment.
- Visual arrangement: assign assets or code-generated diagrams to each voiceover segment by semantics.
- Motion and pacing: use a unified easing function to control entrances and exits for consistent viewing experience.
- Reproducible export: parameterize resolution, frame rate, and subtitle style to form a template.
timeline = [{"start": 0.0, "end": 6.5, "visual": "title_card"},{"start": 6.5, "end": 18.0, "visual": "arch_diagram"},{"start": 18.0, "end": 33.5, "visual": "code_scroll"},{"start": 33.5, "end": 47.0, "visual": "outro_repo_card"},]
The engineering benefit is generate once, reuse many times; changing the script only requires editing the timeline and asset mapping, without redoing the motion.
5. Practice Three: Parametric Mechanical Transmission Modeling and Verifiability
Take a “shiftable, back-pedalable bicycle transmission” as an example. The focus is not appearance but whether the kinematic relationships are self-consistent. Parametric modeling is recommended:
front_teeth, rear_teeth = 44, 16crank_turns = 1.0wheel_turns = crank_turns * front_teeth / rear_teeth # gear ratio determines wheel turns
Verification method: fix one crank revolution and read the rear wheel rotation; then switch the gear ratio and the back-pedal direction, and check whether the direction sign and transmission ratio change in sync. Any constraint that can be verified numerically should be written into the acceptance checklist rather than relying on visual impression.
6. Engineering Recommendations
- Constraints first: put “non-negotiable items” at the beginning of the prompt and require the model to restate the constraints.
- Layered generation: separate the parameter layer, structure layer, and detail layer, and validate layer by layer.
- Verification first: whatever can be checked with numbers, rendered images, or unit tests should not rely on subjective judgment.
- Asset accumulation: put prompts, parameter tables, and script templates under version control to form reusable team capabilities.
- Work with cloud general-purpose capabilities: script artifacts can be hosted on object storage, task scheduling can use a container platform, and runtime logs can be connected to logging services and monitoring alerts to enable batch generation and quality tracking.
