Show HN: LLM Sorter – Python package to sort lists of items using LLM calls

1 pointsposted a month ago
by dkalola

2 Comments

dmarwicke

a month ago

this has to be insanely expensive right? merge sort does n log n comparisons, so sorting 100 items is like 600 llm calls

dkalola

a month ago

Yes, that's right. This is not a practical approach given current LLM limitations. But perhaps in the future if the cost of each individual call decreases, and if latency decreases (and models run locally), but context window remains limited this approach could be more useful as it uses pairwise comparisons rather than loading the entire context window.