News for hackers. Stuff that matters.
Re:Automatic Generation of Visualizations and Infographics w... by javajosh on Tuesday August 29, 2023 @10:35AM (#37308568)
No, absolutely not. How can you trust the output from such a black box system? Who is to say that the LLM won't add or remove data points to make the chart "look good"? Heaven help us if decision makers start taking this output seriously. But of course they will, because the charts will look professional and plausible, because that's what the prompt requires.
Re:Automatic Generation of Visualizations and Infographics w... by vimesy on Tuesday August 29, 2023 @11:36AM (#37309484)
"You are a helpful assistant highly skilled in writing PERFECT code for visualizations. Given some code template, you complete the template to generate a visualization given the dataset and the goal described. The code you write MUST FOLLOW VISUALIZATION BEST PRACTICES ie. meet the specified goal, apply the right transformation, use the right visualization type, use the right data encoding, and use the right aesthetics (e.g., ensure axis are legible). The transformations you apply MUST be correct and the fields you use MUST be correct. The visualization CODE MUST BE CORRECT and MUST NOT CONTAIN ANY SYNTAX OR LOGIC ERRORS. You MUST first generate a brief plan for how you would solve the task e.g. what transformations you would apply e.g. if you need to construct a new column, what fields you would use, what visualization type you would use, what aesthetics you would use, etc. YOU MUST ALWAYS return code using the provided code template. DO NOT add notes or explanations." (https://github.com/microsoft/lida/blob/main/lida/components/...)

They prompted that things MUST be correct in their prompts and it reports any transformations it does to your data, it might give you some insight into its logic to test yourself against the data.

Re:Automatic Generation of Visualizations and Infographics w... by computerex on Tuesday August 29, 2023 @11:52AM (#37309739)
Telling the LLM that it must do something is not a guarantee that it'll follow through.
Re:Automatic Generation of Visualizations and Infographics w... by vykthur on Tuesday August 29, 2023 @04:36PM (#37313635)
True. This is an open area of research. Tools like guidance (or other implementations of constrained decoding with llms [1,2]) will likely help improve this problem.

[1] A guidance language for controlling large language models. https://github.com/guidance-ai/guidance

[2] Knowledge Infused Decoding https://arxiv.org/abs/2204.03084

Re:Automatic Generation of Visualizations and Infographics w... by lmeyerov on Tuesday August 29, 2023 @12:17PM (#37310129)
Agreed. Our customers on the regulated side cannot use an unexplainable UI like that by law.

We take a middle ground with louie.ai of showing the database queries, data transforms, chart config, and any other decision or generation. It's nice being able to watch & check each step and then write in natural language what you want changed, so ends up feeling more like the easier side of pair programming than a blackbox.

Re:Automatic Generation of Visualizations and Infographics w... by pizza on Tuesday August 29, 2023 @12:23PM (#37310219)
How do you trust matplotlib? Same way: if you need to audit plots, audit the generated source code.
Re:Automatic Generation of Visualizations and Infographics w... by esafak on Tuesday August 29, 2023 @01:48PM (#37311397)
So instead of auding MPL once (or never because MPL doesn't have a habit of broken output) I should audit the output of this LLM for every query because it does have a habit of hallucinating?
Re:Automatic Generation of Visualizations and Infographics w... by pizza on Tuesday August 29, 2023 @09:03PM (#37316334)
All I’m saying is that you have to go through verification processes to ensure something is verified.
Re:Automatic Generation of Visualizations and Infographics w... by phillipcarter on Tuesday August 29, 2023 @05:08PM (#37314129)
> Who is to say that the LLM won't add or remove data points to make the chart "look good"?

I don't think you're thinking creatively enough here. A good system that makes use of these concept (because it's a research project, not a product!) will likely ensure that actions the LLM takes are non-destructive and inherently undoable. For example, if the underlying data was changed by the LLM, you can statically verify that and show a warning, emit an error, or ... something else entirely!