Sitemap

Member-only story

Building Dynamic Graphs for Dynamic Data Using Generative AI and AutoGen

16 min readApr 18, 2025

Introduction

Imagine you have a pile of raw data and you need to turn it into clear, interactive charts — bar graphs, line plots, pie charts, and more — without writing dozens of bespoke scripts. What if you could simply ask an AI in plain language and get a ready‑to‑use visualization in seconds?

In this blog, you’ll learn how to build an application that uses a Large Language Model (LLM) to understand your requests, fetch and clean the right data, and generate charts only when you ask for them. We’ll show you how to stitch together five simple pieces: a FastAPI backend, a Streamlit frontend, the AutoGen multi‑agent framework, your own database, and Plotly for charting.

By the end, you’ll see how AutoGen’s built‑in agents handle all the complex steps — query condensation, data retrieval, error retries, and chart generation — automatically. You just provide the data sources and ask the question, and the AI does the rest. Let’s get started!

Challenges in Generating Charts with LLMs

When you ask an AI to build a chart from your data, it must handle several tricky steps behind the scenes. Here are the main challenges:

  1. Understanding the User’s Query
    The AI needs to…

--

--

Shravan K Subrahmanya
Shravan K Subrahmanya

Written by Shravan K Subrahmanya

👨‍💻 Software Engineer | Fullstack Developer | Tech Geek 🤖 Generative AI, Azure, React, Python ✍️ Writing on Programming, AI, Life Skills & Stories

No responses yet