arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.30223cs.LGcs.SE
收藏

提示词风格对人工智能在竞赛编程中的准确性和速度的影响

How Prompt Style Affects AI Accuracy and Speed in Competitive Programming

Riyadh Schools(利雅得学校);Northwestern University(西北大学)

Saad B. Alarifi, Mohammed A. Alam

AI总结:

本研究以GPT-5.5为对象,对比9种风格提示词在IOI准确性任务与NP-hard速度任务中的表现,发现最优提示词依任务类型和统计指标而定,且AI表现与人类IOI参赛者各有优劣,为提示词选择提供了更全面的依据。

摘要:

大型语言模型正越来越多地被用于竞赛编程,其输出对提示词的措辞方式十分敏感。现有研究已针对竞赛编程的准确性对比了不同提示词策略,但未涉及运行速度,也未将结果与人类表现进行对比。本研究在一项探索性实验中,针对GPT-5.5模型,采用9种风格各一种提示词,开展了3项国际信息学奥林匹克竞赛(IOI)的准确性任务和2项NP-hard速度任务。研究发现不存在最优的单一提示词:最强提示词取决于任务类型,以及结果是按均值还是中位数汇总,这表明至少对于这些任务,提示词风格应与目标相匹配,而非作为通用方案。均值分数的诸多差异源于少数异常运行结果,说明仅用单一指标评估提示词会掩盖其有效性的波动程度。与在不同条件下开展工作的人类IOI参赛者进行描述性对比后发现,人工智能既非绝对更优也非绝对更差:在1项任务中超过了平均参赛者,在另外2项任务中则未达要求。本研究将提示词对比从准确性扩展至运行速度,并与人类表现建立关联,从而更全面地揭示了提示词风格如何影响竞赛编程的性能。

英文摘要:

Large language models are increasingly used in competitive programming, and their outputs are sensitive to how a prompt is phrased. Prior work has compared prompt strategies for accuracy on competitive programming, but not for runtime speed, and has not situated the results against human performance. In an exploratory study of one prompt in each of nine styles on GPT-5.5 across three accuracy tasks from the International Olympiad in Informatics (IOI) and two NP-hard speed tasks, we found that no single prompt was best: the strongest prompt depended on the task type and on whether results were summarized by the mean or the median, suggesting that, at least for these tasks, prompt style should be matched to the objective rather than treated as universal. Many differences in mean scores came from a few outlier runs, showing that evaluating prompting by a single metric can obscure how much its effectiveness varies. Compared descriptively with human IOI contestants, who worked under different conditions, the AI was neither strictly better nor strictly worse, exceeding the average contestant on one task but falling short on the other two. By extending prompt comparison from accuracy to runtime speed and grounding it against human performance, this study gives a broader picture of how prompt style affects competitive programming performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑