Skip to content

Conversation

@ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Jan 13, 2026

  1. Lots of changes because I wanted to remove VegaLiteSpecUpdate, which had a bunch of complex logic for insertion, and follow what Claude does of search and replace strings. The other variation, RetrySpec (add, insert, delete lines, had issues where that LLMs have a tendency to dynamically hallucinate line numbers while inserting.

  2. Adds intermediate view before applying interaction polish, so users can see v1 before v2 tweaks chart and fixes issues.

image image
  1. Show image to LLM for polish and revise so it can actually see what it's editing.

  2. Improved data schema, e.g. explicitly mentioning what are dimensions and measures, the data shape type, and migrating head & tail to the corresponding stats column to prevent duplicate tokens

📊 Data summary:
summary:
  n_cells: 86260
  shape:
  - 21565
  - 4
  data_shape: long
  is_sampled: true
  structure:
    dimensions:
    - Entity
    - Code
    - Year
    measures:
    - Period life expectancy at birth
stats:
  Entity:
    nunique: 264
    max_length: 59
    head:
    - Afghanistan
    - Afghanistan
    - Afghanistan
    tail:
    - Zimbabwe
    - Zimbabwe
    - Zimbabwe
  Code:
    nunique: 238
    max_length: 8
    nulls: 445
    head:
    - AFG
    - AFG
    - AFG
    tail:
    - ZWE
    - ZWE
    - ZWE
  Year:
    count: 5000
    mean: 1977.2
    std: 38.0
    min: 1558
    50%: 1983
    max: 2023
    head:
    - 1950
    - 1953
    - 1956
    tail:
    - 2000
    - 2012
    - 2022
  Period life expectancy at birth:
    count: 5000
    mean: 62.1
    std: 13.0
    min: 11.0
    50%: 64.7
    max: 86.1
    head:
    - 28.1563
    - 29.4521
    - 30.8303
    tail:
    - 46.0339
    - 55.3855
    - 62.3601
  1. A couple bug fixes with linking the switches and retry_llm_spec calling SQL

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 82.21649% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.97%. Comparing base (46bf2ce) to head (03edda5).

Files with missing lines Patch % Lines
lumen/ai/agents/vega_lite.py 34.61% 51 Missing ⚠️
lumen/ai/utils.py 88.88% 11 Missing ⚠️
lumen/ai/llm.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1597      +/-   ##
==========================================
+ Coverage   66.69%   66.97%   +0.27%     
==========================================
  Files         150      150              
  Lines       24656    24770     +114     
==========================================
+ Hits        16445    16590     +145     
+ Misses       8211     8180      -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ahuang11 ahuang11 requested a review from philippjfr January 15, 2026 03:19
@ahuang11 ahuang11 marked this pull request as ready for review January 15, 2026 15:40
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.

2 participants