Journal of Agricultural Machinery Engineering (J Agric Mach Eng)
OPEN ACCESS, PEER REVIEWED
pISSN 2799-8673
eISSN 2799-8819
Research Article

Enhancing Agricultural Price Forecasting Based on Large Language Models: A Textual Representation Approach to Time-Series Data

Department of Biosystems Engineering, College of Agriculture and Life Sciences, Seoul National University, Seoul, 08826, Republic of Korea

Correspondence to Dae-Hyun Lee, E-mail: taehyeong.kim@snu.ac.kr

These authors equally contributed to this study as first author.

Volume 5, Issue 1, Pages 37-45, March 2025.
Journal of Agricultural Machinery Engineering 2025, 5(1):37-45 https://doi.org/10.12972/jame.2025.5.1.4
Received on March 11, 2025, Revised on March 29, 2025, Accepted on March 30, 2025, Published on March 31, 2025.
Copyright © 2025 Korean Society for Agricultural Machinery.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0).

Abstract

Agricultural price volatility poses significant challenges for producers, distributors, and consumers, underscoring the need for improved forecasting methods. Traditional statistical and machine learning techniques often struggle to capture the complex, dynamic and unpredictable nature of agricultural markets, which motivates the exploration of alternative approaches. In this study, we propose a novel method that converts time-series data into text prompts to enhance forecast accuracy by utilizing the language processing capabilities of large language models (LLMs). We analyze daily trading prices for 23 crops over 1,862 days to predict price changes over the subsequent 185 days under stable conditions. Unlike traditional methods, our approach employs customized prompt template to convert numerical data into text, enabling LLMs to more effectively interpret and forecast market trends. A comparative analysis with Holt-Winters, LSTM, GRU, and Transformer models demonstrates that our LLM model (Llama 3) outperforms traditional methods, achieving a MAE of 913.61, RMSE of 1477.74, MAPE of 28.89, and an R² of 0.6494. These findings suggest that converting time-series data into text prompts enables the use of LLMs, substantially improving agricultural price forecasting and leading to more accurate and data-driven market decisions.

Keywords

Agricultural Price Prediction, Time Series Forecasting, Large Language Models

Section