Translating Raw Data and Tables into Narrative
The Challenge of Tabular Data in LLMs
For analysts and consultants, translating a spreadsheet of raw figures into a cohesive, readable narrative is a daily task. Large Language Models (LLMs) like ChatGPT or Claude can accelerate this process significantly, but they process information fundamentally differently than a human looking at a spreadsheet.
Humans possess spatial awareness; we can glance at a grid, instantly recognize columns, rows, headers, and spot the largest number in a visual cluster. LLMs, however, process text sequentially as a stream of tokens. They read left-to-right, top-to-bottom. If tabular data is pasted haphazardly, the model loses the structural relationship between a row label (e.g., “Q3 Revenue”) and a column value (e.g., “$45,000”). Furthermore, LLMs are probabilistic text engines, not deterministic calculators. If you ask an AI to calculate complex percentage changes across poorly formatted columns, it is highly prone to hallucination.
To successfully prompt an AI to write a narrative summary from raw data, you must master three steps: structuring the data payload, defining explicit metadata, and constraining the analytical focus.
Step 1: Structuring the Data Payload
Never paste raw, unformatted spreadsheet cells directly into a prompt if the dataset is complex. When copying directly from tools like Excel, the data often pastes as tab-separated values, which can sometimes confuse the model if columns are misaligned.
For the best results, convert your data into either a Markdown table or a clean Comma-Separated Values (CSV) format before prompting. Markdown tables explicitly define the grid structure for the AI, ensuring it understands exactly which value belongs to which header.
Poor Formatting (Tab-separated, prone to misalignment):
Region Q1 Q2 Q3
North America 150 160 155
EMEA 80 85 90
Optimal Formatting (Markdown):
| Region | Q1 | Q2 | Q3 |
|---|---|---|---|
| North America | 150 | 160 | 155 |
| EMEA | 80 | 85 | 90 |
Pro-tip: If you are working with a massive dataset, do not paste the entire table. Aggregate the data in your spreadsheet software first (e.g., via a Pivot Table) and only feed the summarized table to the AI for narrative drafting.
Step 2: Defining Explicit Metadata
One of the most common reasons AI drafts fail quality review is due to missing or misinterpreted metadata. If your table contains the number “150”, the AI does not inherently know if that represents 150 units sold, $150.00, or $150,000.
You must explicitly define the units, currency, scale, and timeframes in your prompt before providing the data.
Crucial Scale Accuracy: When defining scale, be mathematically precise. If your table lists revenue in thousands, explicitly state the conversion so the AI does not misrepresent the narrative.
- Incorrect Metadata Instruction: “All numbers are in thousands (e.g., 150 = 15,000).”
- Correct Metadata Instruction: “All numbers are in thousands of USD (e.g., a value of 150 represents $150,000).”
Providing a concrete example of the conversion (150 = $150,000) acts as a calibration test for the model, drastically reducing the chance of order-of-magnitude errors in the final written report.
Step 3: Constraining the Analytical Focus
If you simply paste a table and write, “Summarize this,” the AI will typically generate a tedious, robotic recitation of every single cell (e.g., “In Q1, North America had $150,000. In Q2, North America had $160,000…”).
Professional reports require synthesis. You must direct the AI’s attention to the specific trends, outliers, or comparisons that matter to your audience, and explicitly forbid it from making assumptions.
Key constraints to include in your prompt:
- Focus areas: Instruct the AI to highlight specific metrics (e.g., “Focus on year-over-year growth” or “Identify the top two performing regions”).
- Math constraints: Because LLMs struggle with complex math, tell the model: “Do not calculate new percentages or totals unless explicitly provided in the data. Rely only on the figures present.”
- Causality constraints: Prevent the AI from hallucinating reasons for data changes. Add: “Do not invent or infer reasons for increases or decreases in the data. Only report the factual variances.”
Putting It All Together: A Master Prompt
Below is a comprehensive prompt template that combines structured data, precise metadata, and strict analytical constraints to produce a professional executive summary.
The Prompt:
> Role: You are a senior financial analyst writing an executive summary for a quarterly performance report.
>
> Task: Write a two-paragraph narrative summary based only on the provided data table.
>

> Metadata & Rules:
> 1. Scale and Currency: All numerical values in the table represent Revenue and are in thousands of USD (e.g., a value of 150 in the table equals $150,000).
> 2. Focus: In the first paragraph, summarize the overall highest and lowest performing regions for the entire period. In the second paragraph, highlight any region that experienced a decline in revenue between Q2 and Q3.
> 3. Constraints: Do not invent reasons for the performance. Do not calculate exact percentage changes; instead, describe the movement directionally (e.g., “declined slightly,” “grew steadily”). Ensure you format the final output numbers with standard dollar signs and commas (e.g., $150,000).
>
> Data:
> | Region | Q1 | Q2 | Q3 |
> |, -|, -|, -|, -|
> | North America | 150 | 160 | 155 |
> | EMEA | 80 | 85 | 90 |
> | APAC | 45 | 50 | 65 |
Expected AI Output:
> Over the first three quarters, North America consistently led as the highest-performing region, peaking in Q2 with $160,000 in revenue. Conversely, the APAC region generated the lowest overall revenue during this period, though it demonstrated steady upward momentum, starting at $45,000 in Q1 and ending at $65,000 in Q3.
>
> While most regions saw positive growth early in the year, North America experienced a slight decline in revenue between the second and third quarters, dropping from $160,000 to $155,000. Meanwhile, EMEA and APAC avoided this Q3 contraction, with both regions continuing to post sequential revenue gains through the end of the reported period.
Common Pitfalls to Avoid
The “Helpful” Hallucination: AI models are designed to be helpful, which sometimes means they try to fill in blanks that shouldn’t be filled. If a table shows a drop in sales during Q2, the AI might write, “Sales dropped in Q2 likely due to seasonal trends.” Always review the output to ensure the narrative remains strictly tethered to the provided data.
Rounding Inconsistencies: If your raw data includes decimals (e.g., 150.45), explicitly tell the AI how to handle them (e.g., “Round all final narrative figures to the nearest whole number”). Otherwise, the AI may arbitrarily round some numbers and leave others exact, creating an unprofessional and inconsistent final report.
