Back to search

Nanyang Technological University

Performance analysis and hybrid pre-filtering optimization for an LLM-based food recommendation pipeline

Abstract

dc:description.abstract

With the increasing demand for personalized diets, food recommendation systems based on large language models can generate personalized recommendations by combining users' health conditions, dietary preferences, and location requirements. However, a larger number of candidate dishes will increase the processing burden of the language model and lead to an increase in system response latency. This study examines the WABI text-based food recommendation system, analyzes stage-level latency in its recommendation process, and proposes a hybrid pre-filtering method. This method combines rule pre-filtering and nutrition semantic matching. Rule pre-filtering removes candidate dishes that do not meet the conditions based on users' health conditions, dietary preferences, and food exclusion requirements. Nutrition semantic matching uses all-MiniLM-L6-v2 to convert dish names into semantic vectors and retrieves relevant nutritional records through Milvus. After screening, the system retains a maximum of five candidate dishes, and then passes the results to the Gemini recommendation module for analysis and sorting. This study uses 100 test cases to compare the original recommendation process and the hybrid pre-filtering process. The test cases cover five types of user scenarios and twenty location conditions. The experiments record the end-to-end latency and use Recall@5 and Accuracy to evaluate the recommendation quality of the candidate dishes. The results show that the average end-to-end latency of the original process is 221.63 s, and the average latency of the hybrid pre-filtering process is 81.29 s. The average latency is reduced by 140.35 s, and the overall decrease ratio is 63.32%. The macro average value of Recall@5 increases from 72.79% to 73.12%, and the macro average value of Accuracy increases from 77.70% to 78.10%. In case-level comparisons, both indicators remain unchanged in 80 cases, improved in 12 cases, and decreased in 8 cases. The results show that hybrid pre-filtering substantially reduces the latency of the large language model food recommendation process. Although the recommendation quality of different cases varies to some extent, the overall results of both quality indicators have improved. This dissertation presents a feasible approach to optimizing personalized food recommendation systems through candidate control and nutrition semantic matching.

Degree

thesis:*
College dc:contributor.school
School of Electrical and Electronic Engineering
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Jiao, Feiyang
Advisor dc:contributor.supervisor
  • Andy Khong W H

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10356/235122

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Jiao, Feiyang. Performance analysis and hybrid pre-filtering optimization for an LLM-based food recommendation pipeline. Nanyang Technological University, 2026. https://hdl.handle.net/10356/235122