Think about you’re in a high-stakes second. Perhaps you’re pitching your startup thought to buyers, brainstorming a brand new product function along with your workforce, or fixing a crucial analytics drawback throughout a hackathon. The idea in your head is crystal clear, however you want a strategy to illustrate it. With no laptop computer in sight, you seize the closest device out there — a serviette — and sketch your imaginative and prescient.

Tim Burton, the well-known movie director, producer, screenwriter, and animator, sketched most of his concepts on napkins. He even printed a serviette e book. Picture from timburton.com.
Your colleague will get it. The thought is stable. However now what? He can take the serviette… and throw it within the trash, as a result of he nonetheless must manually recreate the visualization from scratch.
That’s the issue — your BI device doesn’t know what to do along with your serviette sketch. Or does it?
What in case your fast doodle could possibly be acknowledged, understood, and remodeled into an interactive chart? What if AI might bridge the hole between analog sketches and digital analytics?
Let’s discover out.
I’m at present a part of the AI workforce of GoodData analytics platform, attempting to excavate the innovation potential of the LLMs and generative AI generally.
From our expertise, each analytics mission begins with a drafting board (be it actual, or simply digital), the place the enterprise folks and analysts agree on what to measure and the way. This board is definitely a manifestation of how the analytics ought to behave. It might be a waste if the analysts wanted to go to the BI device and manually re-create all of the sketches and sumptuous concepts.
That’s the place serviette analytics comes into play. It takes all of your analytics sketches and interprets them into interactive analytics objects.
Serviette analytics consists of two main elements. First, it acknowledges what’s on the picture, after which this will get mapped into the present semantic layer and recreated as an interactive analytics object.
Recognizing the picture content material
Picture recognition is a widely known problem with many algorithms comparable to Convolutional Neural Networks, You Solely Look As soon as, and even non-deep studying algorithms like Assist vector machines.
In our prototype, we really used an LLM (GPT-4o), which reliably identifies the main traits of the chart. The efficiency isn’t nice, however adequate for the demonstration.
On the picture we seek for facets comparable to chart title, chart sort, axis names, collection names…
Instance name to OpenAI to get the picture description:
{
"function": "consumer",
"content material": [
{
"type": "text",
"text": "Map what is on the image to the described visualization structure. Use the available fields. If not found, use the most similar fields.",
},
{
"type": "image_url",
"image_url": {"url": f"data:image/jpeg;base64,{base64_image}"},
},
],
}
Creating interactive charts
Now let’s get to the meat. First, we have to map the extracted chart properties into current analytics objects. Fortunately GoodData makes use of the idea of a semantic layer, which drastically simplifies the work. All of the fields with analytical that means can be found by a catalog, together with their relationships.
With chosen analytics fields and extra chart properties, it needs to be fairly simple to recreate the chart itself. However solely in case the BI device helps some kind of programmatic description of the chart that may be simple for the AI to know. GoodData has precisely such a human (and LLM) readable YAML illustration of all of the analytics components.
With all this data, we used OpenAI’s structured output to pressure the LLM to return a sound chart object.
First few traces of the JSON schema to GoodData visualizations:
{
"sort": "json_schema",
"json_schema": {
"title": "datasets_schema",
"schema": {
"sort": "object",
"title": "Visualisation",
"description": "JSON schema for GoodData Analytics Visualisation",
"properties": {
"sort": {
"description": "Kind of visualisation.",
"sort": "string",
"enum": [
"table", "bar_chart", "column_chart", "line_chart",
"area_chart", "scatter_chart", "bubble_chart", "pie_chart",
"donut_chart", "treemap_chart", "pyramid_chart", "funnel_chart",
"heatmap_chart", "bullet_chart", "waterfall_chart",
"dependency_wheel_chart", "sankey_chart", "headline_chart",
"combo_chart", "geo_chart", "repeater_chart"
]
},
And right here is the result:

The “circulate of a serviette”. From picture to Yaml code, after which lastly to interactive chart.
Have you ever noticed the suspicious spike within the interactive chart? Hold an eye fixed out for the following article, the place I’ll share strategies for dealing with such anomalies.
Tech Stack
By now, you is likely to be questioning why I haven’t talked about any programming languages. And I didn’t point out them for a superb motive — it doesn’t actually matter.
Our platform is made with Developer Expertise (DX) in thoughts, which additionally contains excessive flexibility of implementation. That is additionally a part of the explanation why GoodData could be very effectively ready for all of the AI improvements to come back. Be it visualization technology, and even serving to you make choices immediately.
OK, code-philosophy apart, most of my code is completed in Python (with our PySDK), and it has lower than 100 traces of code for the entire backend (not counting the prompts…). One other 150 traces of code to create a appropriate front-end with canvas for drawing the visualizations and all the opposite bells and whistles.
To sum up, the fundamental thought is kind of easy. The hidden information is, as traditional with LLMs within the preliminary immediate, tons of examples and API-first analytics platform. Are you interested by understanding extra about these? Then take a look at my article The Street to AI-generated Visualizations.
Why does this matter?
An important factor is that there’s much less friction between your thought and your visualization. With this, the sky is the restrict, you don’t want a deep understanding of the mannequin, you solely must know what you wish to see.
What’s Subsequent? From Sketches to Dashboards
Fortunately visualizations aren’t the boundaries of the sketches in analytics. Subsequent cease is dashboards, so buckle up for a brand new article that I plan to publish within the close to future!
Why not attempt our 30-day free trial?
Totally managed, API-first analytics platform. Get immediate entry — no set up or bank card required.