Year-End Retrospective: 10x Productivity with Multi-Dimensional Tables and LLMs

    This article shares a year-end engineering retrospective on moving from single LLM calls to large-scale batch processing. It presents a minimal architecture that separates a control plane from a compute plane: a multi-dimensional table acts as the single source of truth for tasks and state, while the LLM remains a stateless compute unit connected through a task queue. The article covers table schema design, idempotent scheduling with rate limiting and resume-from-checkpoint behavior, structured output contracts, two-layer quality validation, cost and observability controls, and a four-week rollout plan with common pitfalls. Readers will learn how to build an asynchronous, recoverable, and observable pipeline that keeps manual review to a small fraction of the workload.

    1. Why “Batch” Is the Real Productivity Divide

    A recurring conclusion from this year’s technical retrospective is that a single LLM call usually delivers only linear gains. The real productivity gap comes from batching. Once a task grows from one or two runs into hundreds or thousands, engineering problems immediately replace model problems as the main constraint: how tasks queue, how failures retry, how cost is capped, how results are validated, and how the process is traced.

    I previously relied heavily on AI coding tools for automated translation and many small batch tasks. The habit was to submit jobs before bed and collect results the next morning. This “nightly batch” mode works not because the model is exceptionally strong, but because the entire pipeline is designed to be asynchronous, recoverable, and observable. This article abstracts that method into a general pattern: a multi-dimensional table as the control and data plane, and the LLM as a stateless compute unit, with the two decoupled by a task queue.

    2. Overall Architecture: Separating Control Plane from Compute Plane

    The recommended minimum viable architecture has four layers:

    1. Data layer (multi-dimensional table): one row per task, with fields carrying input, status, retry count, output, and validation result.
    2. Scheduling layer (task queue / scheduled jobs): pulls pending rows from the table and dispatches them under a concurrency limit.
    3. Compute layer (LLM API): stateless calls where both input and output are structured text (JSON).
    4. Governance layer (logging, monitoring and alerting, cost accounting): records latency, token usage, and failure reasons for every call.

    The key design principle is that the table is the single source of truth. Every state change must be written back to the table, so the scene can be rebuilt from the table after a process crash instead of relying on memory.

    Suggested table fields:

    Field Type Description
    row_id Text Unique identifier, idempotency key
    input Long text Content to process
    status Single select pending/running/done/failed
    attempt Number Retry count so far
    output Long text Structured result
    validate Single select pass/reject
    tokens Number Tokens consumed in this run
    updated_at Time Heartbeat timestamp

    3. Task Scheduling: Idempotency, Rate Limiting, and Resume from Checkpoint

    The easiest traps in batch scenarios are duplicate processing and avalanche-style retries. Three practical rules:

    • Idempotency first: use row_id as the idempotency key and check for duplicates before writing results, avoiding duplicate billing caused by network jitter.
    • Controlled concurrency: use a token bucket or semaphore to keep concurrency below the API limit. Better slow than rate-limited.
    • Release on timeout: rows in running state must carry a heartbeat timestamp; if they exceed the threshold without finishing, they fall back to pending, enabling resume from checkpoint.

    Sample code (pseudo-implementation, expressing control flow only):

    1. def claim_batch(limit=20):
    2. # Atomically move pending rows to running and write the heartbeat
    3. return table.update_where(
    4. status="pending", set={"status": "running", "updated_at": now()},
    5. limit=limit
    6. )
    7. def worker():
    8. for row in claim_batch():
    9. try:
    10. resp = llm.chat_json(row.input, schema=ROW_SCHEMA, timeout=60)
    11. if validate(resp):
    12. table.set(row.row_id, status="done", output=resp, tokens=resp.usage)
    13. else:
    14. table.set(row.row_id, status="failed", attempt=row.attempt + 1)
    15. except TransientError:
    16. table.set(row.row_id, status="pending", attempt=row.attempt + 1)

    4. Prompts and Structured Output: Caging the Uncertainty

    For batch tasks, output stability depends roughly 80% on the output contract rather than the model choice. Recommendations:

    1. Enforce a JSON Schema: fix field names, types, and enum values; a parse failure counts as a retryable error.
    2. Version prompts: manage prompts like code, record a version number, and write it into the result row for regression comparison.
    3. Maintain few-shot examples centrally: keep examples in the same repository as the prompt to avoid drift scattered across places.
    4. Chunk and summarize first: split long text into blocks before aggregating, reducing per-call context pressure and long-text forgetting.
    1. {
    2. "row_id": "r-1024",
    3. "title": "……",
    4. "summary": "……",
    5. "tags": ["architecture", "productivity"],
    6. "confidence": 0.86
    7. }

    5. Quality Validation: Two Layers, Machine First

    Do not make humans the first line of defense. Recommended two-layer validation:

    • Rule layer: missing required fields, out-of-range enums, abnormal length, or too many tags are rejected outright.
    • Model layer: use one low-cost call as a “reviewer” that returns pass/reject plus a reason for suspicious rows.

    Rejected rows automatically return to pending with an increased attempt count; beyond a threshold (for example, 3 attempts) they move to a manual queue. Humans then handle only the long tail, typically reducing manual effort to a single-digit percentage of the total.

    6. Cost and Observability: Making the Bill Predictable

    Cost management is not reviewing the bill after the fact but setting gates in advance:

    • Set a token budget cap per batch and automatically reduce concurrency as the threshold approaches;
    • Aggregate usage by row_id to identify “high-consumption task types”;
    • Deduplicate and cache inputs so identical inputs are not paid for twice;
    • Set up monitoring and alerting with three core metrics: failure rate, average latency, and rejection rate.

    A practical measure is cost per valid output = total consumption ÷ number of rows that pass validation. Looking only at the total bill hides rework waste; this metric reflects the real health of the pipeline.

    7. Why a Multi-Dimensional Table Fits the Control Plane

    The value of a multi-dimensional table is that it combines the constraint feel of a database with the low barrier of a spreadsheet: views can be grouped by status to form a natural board; fields can enforce enums and validation to reduce dirty data; changes can trigger automation flows that close the loop with the scheduling layer; and permissions and collaboration let business and engineering teams look at the same data. It is not a high-performance database, but for workloads in the tens of thousands of tasks that require human-machine confirmation, it offers a very high return on investment. If the task volume keeps growing, the table can be demoted to a “task metadata center” while execution details move to object storage or a logging service, keeping the control plane lightweight.

    8. Rollout Roadmap and Common Pitfalls

    A four-week rollout is suggested: week one defines fields and the output contract; week two connects scheduling and idempotency; week three adds validation and alerting; week four handles cost attribution and regression evaluation.

    Common pitfalls include writing retries as an unbounded loop, running rows without a heartbeat that stay stuck forever, prompts and code on different versions making results irreproducible, and looking only at total volume instead of valid output. All of these are avoided by the same principle: externalize state, contract first, and make failures recoverable.

    9. Conclusion

    The 10x gain does not come from any single tool but from the system combination of “structured data + stateless model + controlled scheduling + two-layer validation”. Once this pattern is established, next year’s retrospective only requires tuning parameters rather than rewriting the process.