Making AI charts go brrrr
Jun 20, 2024

Summary
This post details the technical optimizations made to accelerate the generation of AI-powered charts in Hex. The primary focus was reducing latency by optimizing the representation of Hex's internal chart spec for LLMs. This involved creating a smaller 'chart stub' that captures 90% of commonly used features with fewer tokens, and developing a custom model fine-tuned to reliably generate this stub. The post also discusses the trade-offs between using native Hex chart cells versus generated Python code, the importance of deep integration, and the use of an internal evaluation framework (Spellgrounds) to test these optimizations.