conference paper

Optimizing Prompt Engineering for LLMs in Transportation: A Freeway Segment Analysis Case Study

Proceedings, 104th Annual Meeting of the Transportation Research Board

Publication Date

January 1, 2025

Abstract

The advent of sophisticated artificial intelligence-driven language models, such as ChatGPT, Google Research T5, BERT, and Perplexity AI, has the potential to revolutionize various fields, including transportation engineering. However, recent research findings indicate that suboptimal prompt design could lead to excessive time consumption and increased human effort in these processes. This study addresses this gap by developing and evaluating prompt engineering strategies to enhance Large Language Model (LLM) performance in transportation tasks. We compare different prompt designs including zero-shot, few-shot, discrete, continuous, cloze and prefix prompting using GPT-4o on a pre-defined freeway segment analysis problem. Our methodology involves a detailed analysis of current transportation applications and the design of a specific evaluation problem to test prompt efficiency and accuracy. Results show that zero-shot and continuous prompting, although efficient, lead to inaccuracies due to potential error propagation. Cloze and prefix prompting offer high accuracy by structuring prompts for precise calculations, balancing moderate efficiency with reliability. These findings demonstrate the potential of tailored prompt engineering to significantly enhance decision-making and operational efficiency in transportation engineering. In conclusion, this research highlights the transformative impact of effective prompt design, paving the way for more robust and efficient LLM applications in the field. Future work should focus on refining these designs, evaluating their consistency and robustness, and exploring their broader applications within transportation engineering.

Suggested Citation
Chenyu Yuan, Sara-Grace Lien, Wen-Long Jin and Stephen Ritchie (2025) “Optimizing Prompt Engineering for LLMs in Transportation: A Freeway Segment Analysis Case Study”, in Proceedings, 104th Annual Meeting of the Transportation Research Board. Washington, D.C..