Asee peer logo

A Large Language Model Pipeline to Automate the Solution of Competitive Programming Problems

Download Paper |

Conference

ASEE Mid-Atlantic Section Spring Conference

Location

George Washington University, District of Columbia

Publication Date

April 19, 2024

Start Date

April 19, 2024

End Date

April 20, 2024

Page Count

12

DOI

10.18260/1-2--45702

Permanent URL

https://peer.asee.org/45702

Download Count

17

Request a correction

Paper Authors

biography

Devang Jayachandran Pennsylvania State University, Harrisburg, The Capital College

visit author page

Devang Jayachandran is currently a graduate student pursuing a Masters of Science in Computer Science at the Mathematics and Computer Science department in Penn State Harrisburg. Devang received his Bachelor's of Engineering in Information Science from the National Institute of Engineering, Mysuru, India and then worked at JP Morgan Chase & Co, Bengaluru, India in the field of Natural Language Processing and Document Extraction.

visit author page

biography

Jeremy Joseph Blum Pennsylvania State University, Harrisburg, The Capital College

visit author page

Dr. Jeremy Blum is an associate professor of Computer Science at the Pennsylvania State University, Harrisburg, PA, USA. Prior to joining Penn State Harrisburg, Dr. Blum worked as a research scientist at the Center for Intelligent Systems Research at the George Washington University. Dr. Blum received a D.Sc. in Computer Science and an M.S. in Computational Sciences, both from the George Washington University, as well as a B.A. in Economics from Washington University. His research interests include computer science education and transportation safety.

visit author page

Download Paper |

Abstract

The recent rapid introduction of large language models has enabled new black box approaches to optimize the application of these models for various scenarios. GPT-4 is a multimodal large language model introduced by OpenAI which can answer complex questions, analyze nuanced data, and solve complicated programming problems. The performance of GPT is dependent upon the provided prompt and hyperparameters. This paper explores the effect of minor variations in system prompt and parameters including temperature and top-p for code generation and code accuracy for competitive programming tasks. Temperature controls the amount of randomness in the response, with a temperature of zero producing deterministic output. Top-p controls the cumulative probability distribution for tokens considered for the next output token. Based on the results, we propose approaches to optimize system prompts for code-generation and parameter values to improve the correctness of code. In addition, we propose a pipeline that utilizes these enhancements to effectively solve algorithmic puzzles common in computer science education, in addition to complex contest programming problems.

Jayachandran, D., & Blum, J. J. (2024, April), A Large Language Model Pipeline to Automate the Solution of Competitive Programming Problems Paper presented at ASEE Mid-Atlantic Section Spring Conference, George Washington University, District of Columbia. 10.18260/1-2--45702

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2024 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015