← Latest papers
💻 computer science

From Data to Insights: Exploring Program-of-Thoughts Prompting for Chart Summarization

This paper introduces a zero-shot Program-of-Thought prompting strategy that leverages lightweight visual language models and a novel chart-to-dictionary auxiliary task to generate Python code for accurate and efficient chart summarization, achieving performance comparable to existing methods while improving factual correctness.

Original authors: Yutong Qu, Wei Zhang

Published 2026-05-29
📖 4 min read☕ Coffee break read

Original authors: Yutong Qu, Wei Zhang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a complex chart, like a weather map or a stock market graph. Your goal is to write a short story that explains what the chart is saying. This is called "chart summarization."

The problem is that computers (specifically AI models called Visual Language Models) are great at looking at pictures, but they are often terrible at doing math. If you ask an AI to look at a graph and tell you the average temperature or the highest sales figure, it often just guesses. It might say the average is 50 degrees when it's actually 72, or it might invent numbers that don't exist. It's like asking a poet to do your taxes; they have a great imagination, but they aren't trained to be accountants.

The Solution: The "Program of Thoughts" (PoT)

This paper introduces a clever trick called Program-of-Thoughts (PoT). Instead of asking the AI to "think" and "calculate" in its head (where it might make mistakes), the researchers ask the AI to write a Python computer program to do the math for it.

Think of it like this:

  • The Old Way (Direct Prompting): You ask the AI, "What is the total sales?" The AI looks at the chart, squints, and guesses a number. It's like asking a chef to guess the weight of a steak without a scale.
  • The New Way (PoT): You ask the AI, "Write a computer script that reads the steak's weight and adds it up." The AI writes the code. Then, a computer runs that code. The computer is perfect at math, so the result is accurate. The AI then uses that accurate number to write its summary.

The New Tool: The "Dictionary"

To make this work, the researchers had to teach the AI a new way to talk about charts. Usually, AI tries to turn a chart into a spreadsheet (a table). But charts are messy; they have colors, shapes, and labels that don't fit neatly into rows and columns.

The authors invented a new step called Chart-to-Dictionary.

  • Imagine the chart is a messy room.
  • A Table tries to force every item into a rigid box. If an item doesn't fit, it gets lost.
  • A Dictionary is like a smart label maker. The AI looks at the chart and says, "Okay, here is a list of items: {'sales': [100, 200, 300], 'months': ['Jan', 'Feb', 'Mar']}." It captures the data in a flexible, organized list that a computer can easily read and calculate with.

How They Tested It

The researchers tested this "Write Code to Do Math" strategy on several different AI models using real-world charts (like bar graphs, line charts, and pie charts). They compared three methods:

  1. Direct: Just ask the AI to summarize.
  2. MCoT: Ask the AI to think step-by-step in words (like a human thinking aloud).
  3. PoT: Ask the AI to write a Python program to calculate the numbers, then summarize.

What They Found

The results were a bit like a sports team where the strategy depends entirely on which player you have:

  • It works great for some AI models: For models that are good at understanding text and data (like InternVL and Qwen), the PoT method was a winner. It helped them avoid making up fake numbers and improved the accuracy of their summaries. It was like giving a good student a calculator; they already knew how to write the story, but the calculator made the facts perfect.
  • It struggles with others: For some other models (like DeepSeek), the PoT method actually made things worse. It seems these models got confused by the extra step of writing code, or they wrote bad code that broke the process. It's like giving a calculator to someone who doesn't know how to use it; they might drop it or press the wrong buttons.
  • The "Dictionary" is helpful: The new way of turning charts into Python dictionaries (the flexible lists) was a success. It gave the AI a better way to "see" the data before it tried to do the math.

The Bottom Line

This paper shows that if you want an AI to summarize a chart accurately, you shouldn't just ask it to "do the math." Instead, you should ask it to write a tool (code) to do the math, and then let a computer run that tool.

However, this trick isn't a magic wand for every AI. It works best with specific types of AI models that are already good at handling text and data. For these models, this method acts like a safety net, catching the AI before it makes up fake numbers, ensuring the final story is both interesting and factually correct.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →