Skip to content

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Aug 20, 2025

Closes #2424

This PR introduces a way to auto-generate chart title and description with AI (gemini-2.5-flash) by clicking a star icon when in annotations panel. This takes all relevant context into account (cube metadata, dimensions metadata, observations, chart type and filters) to produce quality outputs.

Notes

Currently, this feature uses a free-tier Gemini API key (max 250 requests per day). If we'd like to proceed with these features, we'd need to implement proper caching and get a proper API key (and maybe also test other LLM models).

Screenshot 2025-08-20 at 16 31 57 Screenshot 2025-08-20 at 15 27 10

How to test

  1. Go to this link.
  2. Select any dataset and starting making a chart.
  3. Click on "Add title" or "Add description".
  4. See there's a new star icon in the Markdown editor toolbar.
  5. ✅ Click on it to see the text gets automatically generated and added to the text box.
  6. ✅ Try auto-generating the text in a different language and see that it also works.
  7. ✅ Change filters, chart type, etc – significant changes – and regenerate the text again to see that it matches the new chart state.

TODO

  • Pass GEMINI_API_KEY to Docker, add to all relevant places
  • Add caching

  • I added a CHANGELOG entry
  • I made a self-review of my own code
  • I wrote tests for the changes (if applicable)
  • I wrote configurator and chart config migrations (if applicable)

Related: #1591

Copy link

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
visualization-tool Ready Ready Preview Comment Aug 20, 2025 2:30pm

@bprusinowski bprusinowski changed the title feat: AI feat: Auto-generate chart title and description (AI) Aug 20, 2025
@bprusinowski bprusinowski marked this pull request as ready for review August 20, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate chart title and description (AI)
1 participant