| ▲ | YuechenLi 2 hours ago | ||||||||||||||||
>Instead of requiring verbose low-level parameters such as scales, axes, spacing, and layout. Ok, Microsoft is conflating two different things here: LLMs don't really care about code being low level and verbose, they can read things like Assembly and SPIR-V just fine: visualization is the real issue in that LLMs have no natural understanding of spatial composition through visual comparison because they literally "see" things differently than humans, so the way to get around that is provide them with "visualization" in code form that they can easily reason about and understand, so basically anything that's not deeply nested and has hidden states that they have to reason about. Also, Flint being stringly typed in JSON is a decision that I don't think I agree with. Looking at the actual spec, this could have just been a normal, human usable TypeScript library, and it would have been 100x better. Using their own example (excuse the formatting): type SemanticType = "Category" | "YearMonth" | "Profit"; type ChartType = "Heatmap" | "BarChart" | "LineChart" | "ScatterPlot"; // extend as needed interface ChartEncodings { x: string; y: string; color?: string; size?: string; tooltip?: string; } interface ChartProperties { colorScheme: string; [key: string]: unknown; // allow other optional properties } interface ChartSpec { chartType: ChartType; encodings: ChartEncodings; chartProperties: ChartProperties; } type SemanticTypes = Record<string, SemanticType>; interface ChartConfig<TData = Record<string, unknown>> { data: TData; semantic_types: SemanticTypes; chart_spec: ChartSpec; } // The actual typed object literal: const chartConfig: ChartConfig = { data: {}, // replace with your actual data shape/type semantic_types: { game: "Category", period: "YearMonth", newUsers: "Profit", }, chart_spec: { chartType: "Heatmap", encodings: { x: "period", y: "game", color: "newUsers", }, chartProperties: { colorScheme: "redblue", }, }, }; EDIT: Went and actually looked at the source instead of just eyeballing it from the docs, and it was a lot more complete and sophisticated than my assumed mockup already. Core complaint (string-keyed JSON vs. a real generic authoring surface) still stands, but the specific types I posted aren't what Flint has. My bad. | |||||||||||||||||
| ▲ | librasteve 44 minutes ago | parent | next [-] | ||||||||||||||||
sadly, I think we are stuck with JSON as the most reliable way to get data / code in and out of an LLM (could be worse, could be YAML) … I’m interested in custom DSLs that improve LLM predictability and it is quite nice to see that even the Microsoft dinosaur “gets it” … see the Contacts example at https://slangify.org/examples which does VCARD to JCARD round tripping as a way to easily roll your own DSL | |||||||||||||||||
| |||||||||||||||||
| ▲ | chenglong-hn 2 hours ago | parent | prev | next [-] | ||||||||||||||||
I do find the chartType part is not quite elegant, since templates should be more extensible. We will need to fix that. For other parts, it's quite common in visualization and diagram etc libraries to have json, since they are easily portable in different rendering contexts. | |||||||||||||||||
| |||||||||||||||||
| ▲ | 2 hours ago | parent | prev [-] | ||||||||||||||||
| [deleted] | |||||||||||||||||