Live data from Hacker News

Which table format do LLMs understand best?

improvingagents.com

1–10 of 115 posts

Re: Which table format do LLMs understand best?

#3
I am not an expert on the subject but i suggest that you can also save context space by using shorter XML element names (like f instead of function, c instead of class, etc.). Just add a legend at the top or bottom to explain what each abbreviation means, LLMs can figure out the mapping without issues. I use this approach when generating project structure maps with Tree-sitter. I did a quick comparison and didn't notice much degradation with claude, so the context space you save may make it worthwhile. I would be interested to see a proper comparison.

Re: Which table format do LLMs understand best?

#5
> where accuracy is paramount

> accuracy: 60%

Not to mention that the least poorly performing format is probably the stupidest way to encode tabular data, beating even XML. But I guess that’s the new normal because we’re trying to shoehorn conversational AI models to every use case rather than, say, training finetunes that are better at particular tasks. (Yes, of course you can’t train finetunes when the model is a proprietary black box on someone else’s computer.) Something about hammers and nails…

Re: Which table format do LLMs understand best?

#7

I am not an expert on the subject but i suggest that you can also save context space by using shorter XML element names (like f instead of function, c instead of class, etc.). Just add a legend at the top or bottom to explain what each abbreviation means, LLMs can figure out the mapping without issues. I use this approach when generating project structure maps with Tree-sitter. I did a quick comparison and didn't not…

Common enough words like `function` and `class` are generally encoded as a single token by the tokenizer and may provide a slightly better context to the LLM. For openai you can test this stuff at https://platform.openai.com/tokenizer

Re: Which table format do LLMs understand best?

#8
The test really needed to be run on multiple data sizes (50, 100, 500, 1000, 5000). The more token efficient formats would probably eventually overtake the token heavy ones due to context pollution. All this test really says is what performs best for 1 particular model at one particular context length.

Re: Which table format do LLMs understand best?

#9
That's a cool concept - would be curious about a more common setup for agentic data analysis (ex: for using in Claude Code) like:

* Multiple tasks vs 1

* O3/o3-mini + 4o/4o-mini instead of nano

* Extra credit: Inside a fixed cost/length reasoning loop

Ex: does the md-kv benefit disappear with smarter models that you'r typically use, and thus just become a 2-3x cost?

Post reply on HN