Beyond Fine-Tuning: Robust Food Entity Linking under Ontology Drift with FoodOntoRAG
Organizations: Computer Systems Department, Jožef Stefan International Postgraduate School, Ljubljana, Slovenia · Computer Systems Department, Jožef Stefan Institute, Ljubljana, Slovenia
Abstract
Standardizing food terms from product labels and menus into ontology concepts is a prerequisite for trustworthy dietary assessment and safety reporting. The dominant approach to Named Entity Linking (NEL) in the food and nutrition domains fine-tunes Large Language Models (LLMs) on task-specific corpora. Although effective, fine-tuning incurs substantial computational cost, ties models to a particular ontology snapshot (i.e., version), and degrades under ontology drift. This paper presents FoodOntoRAG, a model- and ontology-agnostic pipeline that performs few-shot NEL by retrieving candidate entities from domain ontologies and conditioning an LLM on structured evidence (food labels, synonyms, definitions, and relations). A hybrid lexical--semantic retriever enumerates candidates; a selector agent chooses a best match with rationale; a separate scorer agent calibrates confidence; and, when confidence falls below a threshold, a synonym generator agent proposes reformulations to re-enter the loop. The pipeline approaches state-of-the-art accuracy while revealing gaps and inconsistencies in existing annotations. The design avoids fine-tuning, improves robustness to ontology evolution, and yields interpretable decisions through grounded justifications.
Figures & tables
| Acc@1 (overall) | Acc@1 first | Acc@1 final | Retry rate | Syn. rate | |
|---|---|---|---|---|---|
| 0.4 | 59.8% | 59.7% | 59.2% | 7.5% | 3.8% |
| 0.5 | 58.8% | 59.9% | 58.1% | 9.3% | 3.7% |
| 0.6 | 57.5% | 60.0% | 58.4% | 8.4% | 4.1% |
| 0.7 | 58.6% | 60.2% | 58.6% | 9.9% | 4.3% |
| 0.8 | 57.2% | 59.6% | 57.2% | 11.7% | 5.8% |
| Mention | Model decision (label; CURIE) | Dataset annotations (label; CURIE) |
|---|---|---|
| ONION | onion; FOODON:03316347 | onion (raw); FOODON:03301704; Allium cepa ; NCBITaxon:4679 |
| WALNUTS | walnuts (FoodEx2); FOODON:03541166 | Juglans ; NCBITaxon:16718 |
| ARTICHOKE | artichoke head; FOODON:00003573 | Cynara cardunculus var. scolymus ; NCBITaxon:59895 |
| PARMESAN CHEESE | parmesan cheese (block); FOODON:03303675 | parmesan cheese food product; FOODON:00003247 |
| SOY SAUCE | soy sauce (FoodEx2); FOODON:03544111 | soy sauce; FOODON:03301115 |
| TORTILLA | tortilla (FoodEx2); FOODON:03540143 | tortilla; FOODON:03307668 |
Entity Linking
Entity linking maps mentions of people, places, products, and concepts to the corresponding entries in a knowledge base.
See all 25 papers