In the field of AI-based software development, the automatic generation of code from visual representations —such as statistical charts— has opened a fascinating technical debate. Current vision-language models (VLMs) are often trained through direct supervision with reference plotting scripts, assuming that the 'correct' code is fully observable from the chart image. However, reality is more complex: many charts, such as box plots, pie charts, or histograms, contain latent variables that cannot be uniquely recovered from the rendered image. For example, a box plot shows summary statistics, not the original data; a pie chart reveals proportions, not the underlying absolute values. Teaching a model to reproduce those unidentifiable quantities leads to hallucinations and overparameterized code.
Faced with this challenge, the approach of observation-aligned supervision emerges. Instead of forcing the model to guess hidden data, training objectives are rewritten to match exactly what is observable in the image: box statistics for boxplots, sector percentages for pie charts, and bin weights for histograms. This method, applied to datasets such as ChartMimic and ChartX, has demonstrated consistent improvements in recovering observable values in multimodal models. The key lesson is that improving code generation from charts not only requires more data or advanced algorithms, but also respecting the limits of what can be visually identified.
For companies looking to integrate artificial intelligence solutions into their workflows, this principle has practical implications. It is not simply about training larger models, but about designing systems that align with the available information. At Q2BSTUDIO, as a software development and technology company, we understand that AI for businesses must be transparent and reliable. Therefore, we offer services ranging from creating custom applications to implementing personalized AI agents, capable of extracting real knowledge from visual and numerical data without falling into false inferences.
Additionally, aligned supervision directly connects with other technological pillars such as business intelligence. Tools like Power BI benefit from models that generate accurate code from charts, but always require a rigorous approach to what information is truly recoverable. Our experience in aws and azure cloud services allows us to deploy these solutions in scalable environments, while cybersecurity practices ensure data integrity. The combination of custom software and aligned supervision techniques is the path toward more honest and effective AI systems.

.jpg)



