HOME/TECHNIQUE/Tool Use & Structured Output/Code generation & execution

TECHNIQUE

Code generation & execution

Tool Use & Structured Output

9APPLICATIONS
11OBSERVED OPERATORS
01

State of Practice

CROSS-VALIDATED — 7 OPERATORS

Code generation and execution is deployed as constrained, tool-backed workflow machinery: operators scope the task, let the model generate or drive code/query steps, and validate outputs with tests, sandboxes, rules, traces, or reviewers.

Observed Practices

Wrap code generation/execution in explicit workflows or tool-backed loops instead of one-shot prompts.

5 of 7 operators with cited teardown evidence show workflow or tool-loop wrappers around model-driven code execution/generation.
BlockGrabRipplingShopifyDropbox

Use executable code or generated queries for bounded transformation tasks: Python runtime problem solving, input normalization, repository edits, test repair, or Cypher query generation.

6 of 7 operators with cited teardown evidence show bounded code/query generation or execution tasks.
GrabRipplingShopifyLinkedInBlockDropbox

Scope the model’s context before generation or execution so it sees only the relevant files, functions, domains, chunks, or prompt step.

5 of 7 operators with cited teardown evidence show context scoping before model-driven code/query work.
UberBlockRipplingDropboxShopify

Validate generated code or tool outputs with deterministic tests, language services, rule validators, sandboxes, or accuracy/evaluation frameworks.

6 of 7 operators with cited teardown evidence show validation or evaluation around generated code/query/tool outputs.
UberBlockShopifyDropboxLinkedInRippling

Separate LLM reasoning from deterministic formatting, filtering, or execution where reliability matters.

4 of 7 operators with cited teardown evidence explicitly separate model reasoning from deterministic code, filters, or tooling.
RipplingShopifyUberBlock

Keep debugging and evaluation artifacts for model-driven workflows, including traces, logs, dashboards, transcripts, or production monitoring.

3 of 7 operators with cited teardown evidence show observability or logging for code-generation/execution workflows.
RipplingShopifyUber

Where Operators Converge

Across the cited deployments, code generation/execution is not described as an unconstrained model prompt; it is embedded in retrieval, workflow orchestration, tool servers, agents, or validation pipelines.

Where Operators Diverge

Operators differ in where generated or executable code runs.

APPROACH 01

Python runtime or interpreter inside an AI platform or agent system.

GrabDropbox

APPROACH 02

Sandboxed code execution for normalizing structured client inputs before internal tools consume them.

Rippling

APPROACH 03

Developer-tool execution loop around repository edits, diagnostics, and tests.

BlockShopify

APPROACH 04

Generated graph queries routed to knowledge graph or GraphQL backends.

LinkedIn

APPROACH 05

LLM-generated optimization findings are validated and then routed into code optimization or manual review workflows.

Uber

Operators use different orchestration forms around the model.

APPROACH 01

Declarative or drag-and-drop deterministic workflows.

ShopifyGrab

APPROACH 02

Supervisor agent coordinating specialized subagents.

Rippling

APPROACH 03

Dedicated migrator process plus tool server for file selection, prompting, diagnostics, and tests.

Block

APPROACH 04

Retrieval-first multi-step agent orchestration for search and knowledge work.

Dropbox

APPROACH 05

Profiling-first optimization pipeline that filters hot functions before LLM antipattern detection.

Uber

Validation differs by deployment target.

APPROACH 01

LLM jury plus domain-specific rule validators to catch false positives and reduce hallucinations.

Uber

APPROACH 02

Compiler, language-server, linter, autocorrect, and test feedback loops.

BlockShopify

APPROACH 03

Sandboxing, minimal interpreter design, security reviews, and production traces/evals.

DropboxRippling

APPROACH 04

Accuracy testing and semantic-search refinement for generated retrieval/query behavior.

LinkedIn

Watch Items

Unconstrained or naive AI was reported as unreliable for code work: Block said naive AI usage would be too unreliable, and Shopify said letting AI roam across millions of lines of code did not work well because non-determinism hurts reliability.

Operators monitor or mitigate incorrect model outputs, including false positives, hallucinations, drift, and query inaccuracies.

Safe code execution is treated as a deployment concern: Dropbox built a minimal Python interpreter with testing and security reviews, while Rippling uses sandboxed code execution for action agents.

Context size and task complexity require aggressive scoping or decomposition before code generation/execution.

02

Implementation Menu

CURATED DEFAULTS
NameKindMaturity
E2B sandboxesserviceemerging
Jupyter kernel executionpatternestablished
WASM sandboxingpatternemerging
03

Observed in Production

9 APPS