Abstract
Database query languages such as SQL for relational databases and Cypher forgraph databases have been widely adopted. Recent advancements in large languagemodels (LLMs) enable natural language interactions with databases throughmodels like Text2SQL and Text2Cypher. Fine-tuning these models typicallyrequires large, diverse datasets containing non-trivial examples. However, asdataset size increases, the cost of fine-tuning also rises. This makes smaller,high-quality datasets essential for reducing costs for the same or betterperformance. In this paper, we propose five hard-example selection techniquesfor pruning the Text2Cypher dataset, aiming to preserve or improve performancewhile reducing resource usage. Our results show that these hard-exampleselection approaches can halve training time and costs with minimal impact onperformance, and demonstrates that hard-example selection provides acost-effective solution.