Skip to content

Prompting for Tables and Structured Documents

Getting well-formed tables, comparison matrices and structured reports from language models.

Editorial team 1 min read

Tables and structured documents are easier to read and reuse — when the model produces them consistently.

Specify Columns Exactly

"Create a table with columns: Option, Cost per month, Setup time, Main risk, Recommendation." Named columns in a set order produce predictable tables.

Define Cell Contents

State units, formats and length: "Costs in AUD without decimals; risks in under ten words."

Handle Missing Information

"Write 'unknown' where the information isn't in the source." This prevents invented values.

Choose the Format

Markdown tables for chat and documents, CSV for spreadsheets, JSON for programs. Ask explicitly.

Comparison Matrices

For comparisons, provide the criteria and ask the model to fill in each option, then summarise which option wins on which criteria.

Structured Reports

Provide a template with headings and a description of each section's content; the model fills it in.

Validate

For tables destined for spreadsheets or programs, parse the output and check column counts and types.

Large Tables

For many rows, generate in batches, or have the model write code that produces the table from data, which is more reliable than generating many rows of text.

More in Prompting

All Prompting guides →
Prompting Guide · 1 min

Anatomy of an Effective Prompt

The parts of a prompt that reliably produce good results, with a template you can adapt for almost any task.

Prompting 1 min read 1 Nov 2025

Prompting Guide · 2 min

Giving Models Context

Why most weak outputs come from missing context, and what background information to include in a prompt.

Prompting 2 min read 31 Oct 2025

Prompting Guide · 1 min

Role Prompting: When It Helps and When It Doesn't

Telling a model to act as an expert or a persona can shape tone and focus — but it isn't a substitute for clear instructions.

Prompting 1 min read 30 Oct 2025