Frontiers of Data and Computing ›› 2026, Vol. 8 ›› Issue (3): 217-232.
doi: 10.11871/jfdc.issn.2096-742X.2026.03.018
• Technology and Application • Previous Articles
ZHANG Zihan(
),YANG Wanxia*(
),ZHAO Xiang,ZHOU Beibei,WANG Peilong
Received:2025-07-22
Online:2026-06-20
Published:2026-06-18
Contact:
YANG Wanxia
E-mail:963813351@qq.com;yangwanxia@163.com
ZHANG Zihan,YANG Wanxia,ZHAO Xiang,ZHOU Beibei,WANG Peilong. A Knowledge Extraction Method for Dietary Reviews and Recommendations Generation Based on LLM[J]. Frontiers of Data and Computing, 2026, 8(3): 217-232.
Table 1
Definition of entities in the food domain"
| 序号 | 实体类型 | 解释说明 |
|---|---|---|
| 1 | 菜品(Dishes) | 顾客点的具体菜品,如水煮肉片、毛血旺等 |
| 2 | 食品(Food) | 区别于菜品的概念,如肉、蔬菜、水果等 |
| 3 | 口味(Taste) | 菜品的味道、风味及口感,包括酸甜苦辣等基本味道,鲜香醇等风味和软硬脆嫩滑等口感 |
| 4 | 性价比(Cost Performance) | 价格与质量的比例 |
| 5 | 餐厅(Restaurant) | 用餐的地点或品牌名称 |
| 6 | 营养成分(Nutrient) | 对人体起到维持正常生理功能的物质,如蛋白质、脂肪、维生素等 |
| 7 | 顾客(Customer) | 对饮食发表评论的人 |
| 8 | 服务员(Waiter) | 为顾客提供服务的员工 |
| 9 | 服务(Service) | 餐饮服务过程中的顾客体验 |
| 10 | 环境(Environment) | 餐厅的氛围或物理环境 |
Table 2
Dietary domain relationship definition"
| 序号 | 关系类型 | 解释说明 |
|---|---|---|
| 1 | 评价(Review) | 顾客对餐厅、菜品等的评论 |
| 2 | 包含(Contains) | 餐厅包含某些菜品或一个实体包含另一个实体 |
| 3 | 适合(Suitable for) | 菜品、餐厅或服务是否符合特定顾客或场合的需求或两个实体之间的搭配 |
| 4 | 用于(Used in) | 菜品、餐厅或服务的特定用途和场景 |
| 5 | 提供(Provides) | 餐厅为顾客提供的菜品、服务和环境,菜品或食品给顾客带来的营养成分 |
| 6 | 体验(Experience) | 顾客在餐厅中的整体感受 |
| 7 | 喜欢(Likes) | 顾客对某道菜品或服务的喜爱 |
| 8 | 不满意(Dislikes) | 顾客对某道菜品或服务的不满 |
Table 3
Definition of food domain attributes"
| 序号 | 属性类型 | 解释说明 |
|---|---|---|
| 1 | 描述(Description) | 顾客对菜品、餐厅或服务的具体描述 |
| 2 | 价格(Price) | 菜品、餐厅或服务的价值 |
| 3 | 原材料(Ingredients) | 制作菜品时使用的原始材料,包括食材、调料等其他辅助材料 |
| 4 | 能量(Calories) | 菜品或食品所含的热量,是人体进行活动的有力保障 |
| 5 | 标题(Title) | 菜品或餐厅的名称,帮助顾客快速了解菜品和餐厅的特色 |
| 6 | 步骤(Instructions) | 菜品制作方法和制作顺序,包括食物准备、烹饪、调味等 |
| 7 | 位置(Location) | 餐厅的具体地点,包括所在城市、地标等 |
| 8 | 类型(Type) | 菜品或餐厅或服务的种类,包括中餐、西餐、快餐、外卖、堂食等 |
Table 4
Prompt optimization design"
| 要求 | 请准确全面抽取####内容中的实体、关系和属性,并将结果输出为Json格式。 |
|---|---|
| 基本内容 | 实体类型仅包括菜品(如水煮肉肉片),食品(如蔬菜、水果),口味(如辣、鲜),性价比(价格与质量的比例),餐厅(用餐的地点或品牌名称),营养成分(如蛋白质、脂肪),顾客(对饮食发表评论的人),服务员(为顾客提供服务的员工),服务(餐饮服务过程中的顾客体验),环境(餐厅的氛围或物理环境)共十种 关系类型仅包括评价(顾客对餐厅、菜品等的评论),包含(餐厅包含某些菜品或一个实体包含另一个实体),适合(菜品、餐厅或服务是否符合特定顾客或场合的需求或两个实体之间的搭配),用于(菜品、餐厅或服务的特定用途和场景),提供(餐厅为顾客提供的菜品、服务和环境,菜品或食品给顾客带来营养成分),体验(顾客在餐厅中的整体感受),喜欢(顾客对某道菜品或服务的喜爱),不满意(顾客对某道菜品或服务的不满)共八种 属性类型仅包括描述(顾客对菜品、餐厅或服务的具体描述),价格(菜品、餐厅或服务的价值),原材料(制作菜品时使用的原始材料,包括食材、调料等其他辅助材料),能量(菜品或食品所含的热量,是人体进行活动的有力保障),标题(菜品或餐厅的名称,帮助顾客快速了解菜品和餐厅的特色),步骤(菜品的制作方法和制作顺序,包括食物准备、烹饪、调味等),位置(餐厅的具体地点,包括所在城市、地表等),类型(菜品或餐厅或服务的种类,包括中餐、西餐、外卖、堂食等)共八种 |
| 注意 | 1.记住不要新增或改变上述十种实体类型、八种关系类型和八种属性类型 2.如果“一个实体对应多种关系”或“多个实体对应多种关系”和“一个实体对应多种属性”或“多个实体对应多种属性”,须将上述所有关系和属性按照<实体,关系,实体>和<实体,属性,属性值>的形式抽取出来,不需要舍弃或遗漏 |
Table 5
Various entities and relationships and attribute extraction results"
| 实体类型 | 数量 | 关系类型 | 数量 | 属性类型 | 数量 |
|---|---|---|---|---|---|
| 菜品 | 31,946 | 评价 | 34,963 | 描述 | 78,329 |
| 食品 | 11,465 | 包含 | 9,896 | 价格 | 75,643 |
| 口味 | 6,712 | 适合 | 8,964 | 原材料 | 49,645 |
| 性价比 | 7,756 | 用于 | 5,739 | 能量 | 15,416 |
| 餐厅 | 10,583 | 提供 | 8,042 | 标题 | 71,364 |
| 营养成分 | 8,145 | 体验 | 9,754 | 步骤 | 5,710 |
| 顾客 | 10,139 | 喜欢 | 12,541 | 位置 | 55,643 |
| 服务员 | 3,895 | 不满意 | 512 | 类型 | 8,562 |
| 服务 | 17,964 | ||||
| 环境 | 29,463 | ||||
| 实体总数 | 120,104 | 关系总数 | 90,411 | 属性总数 | 360,312 |
Table 6
Results of Alpaca fine-tuning data set paradigm optimization"
| 序号 | 样例 |
|---|---|
| 1 | {“instruction”:“请对以下餐厅的菜品进行评价。” “input”:“我最近去了一家名为小桥流水的餐厅,尝试了他们的招牌菜红烧肉。这道菜色泽红亮,肥而不腻,给我留下了深刻的印象。” “output”:“这道红烧肉做得非常出色,色泽红亮,口感肥而不腻,是一道不可多得的美味佳肴。” “history”:“用户之前询问过这家餐厅的环境,并得到了正面的回答。” “system”:“餐厅评价任务:专注于菜品描述和整体体验。”} |
| 2 | {“instruction”:“请根据以下描述对菜品进行评分(1-5分)。” “input”:“我在一家中餐馆品尝了宫保鸡丁。鸡肉嫩滑,花生香脆,酱汁的比例也恰到好处,但稍微有点咸。” “output”:“评分:4.5分。这道宫保鸡丁整体表现很好,鸡肉嫩滑,花生香脆,酱汁比例恰到好处,唯一的不足是稍微有点咸。” “history”:“用户之前询问过这家餐厅的环境,并得到了正面的回答。” “system”:“菜品评分任务:根据描述给出合理的评分。”} |
Table 7
Optimized Prompt"
| Prompt设定因素 | 样例 |
|---|---|
| #背景 [背景描述] | #背景 [背景描述] 在这个美食遍布全球的时代,分享饮食体验成为了人们日常生活中不可或缺的一部分。无论是街头小吃还是高档餐厅的精致料理,每一种美食背后都有着独特的文化和故事。为了更好地帮助美食爱好者们发现并了解新的饮食体验,我们创建了一个平台,旨在通过详细且专业的美食评论为用户提供指导 |
| #角色 [角色描述] | #角色 [角色描述]您是一位尝遍天下美食的顶级食客,对于各种美食都有独到且深刻的见解,能够准确地评价美食,无论是其口感、味道或其他各个方面 |
| #任务 [任务描述] | #任务 [任务描述]当接收到用户输入的关于“饮食”的自然语言时,对其进行分析,并从“口感”“味道”“分量”“外观”等角度分析 |
| #约束条件 [约束条件描述] | #约束条件 [约束条件描述]只能生成与任务相关的内容,拒绝无关话题;且保证生成内容来源与微调数据集 |
| #实例 [实例描述] | #实例 [实例描述] 用户输入:“我最近去了一家意大利餐厅尝试了他们的手工披萨,真的非常美味。”分析结果:这款手工披萨的口感十分独特,面饼酥脆而不失柔软,配上新鲜出炉的香气,让人回味无穷。味道上,选用的番茄酱和芝士比例恰到好处,既不过于酸也不过于油腻。分量方面,对于一位普通食客来说刚刚好,既能满足口腹之欲又不至于过饱。外观上,金黄的面饼边缘点缀着红色的番茄酱和白色的芝士,色彩对比强烈,视觉效果极佳 |
Table 9
Effects of single iteration data volume and learning rate on model fine-tuning"
| 参数 | Learning Rate=1e-5 | Learning Rate=1e-4 | Learning Rate=1e-3 |
|---|---|---|---|
| Date Volume=30 | 72.5 | 75.4 | 73.8 |
| Date Volume=50 | 74.9 | 78.1 | 74.8 |
| Date Volume=100 | 83.4 | 87.5 | 85.9 |
| Date Volume=150 | 80.5 | 84.0 | 82.7 |
| Date Volume=200 | 78.2 | 81.4 | 79.4 |
Table 13
Effects of Prompt on fine tuning of large language models(%)"
| Models | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU-4 |
|---|---|---|---|---|
| GLM4-9B-Chat | 76.3 | 73.2 | 75.3 | 77.8 |
| GLM4-9B-Chat(Original Prompt) | 79.2 | 76.1 | 72.5 | 75.8 |
| GLM4-9B-Chat(Optimized Prompt) | 80.1 | 78.6 | 76.8 | 77.3 |
| Qwen2-7B | 77.9 | 79.1 | 77.5 | 78.3 |
| Qwen2-7B(Original Prompt) | 79.4 | 82.5 | 75.2 | 77.0 |
| Qwen2-7B(Optimized Prompt) | 82.7 | 84.7 | 81.5 | 82.4 |
Table 15
Rating Dimensions"
| 评估维度 | 核心问题 | 评分规则(什么情况打1/3/5分) |
|---|---|---|
| 1. 专业性(Professionalism) | 生成内容是否使用了准确、地道的领域术语和表达 | 1分:充斥外行话、术语错误(如“红烧肉是酸味的”)3分:术语使用基本正确,但描述笼统、平淡(如“好吃”、“不错”)5分:精准使用专业术语(如“肥而不腻”、“辣而不燥”、“刀工精细”),描述深入且具有洞察力 |
| 2. 逻辑性与连贯性(Logicality& Coherence) | 生成的评论是否通顺、流畅,且上下文逻辑自洽 | 1分:语句破碎,前后矛盾,难以理解3分:句子基本通顺,但部分语句衔接生硬,逻辑跳跃5分:全文流畅自然,逻辑清晰,起承转合得当,读起来像真人撰写 |
| 3. 有用性与吸引力(Usefulness & Appeal) | 这条评论是否能有效帮助用户做出消费决策?是否具有可读性和吸引力 | 1分:信息空洞无物(如“挺好的”),或包含大量无关信息,毫无帮助3分:包含一些有用信息(如价格、口味),但缺乏细节,不足以强烈推荐或劝阻5分:提供了多维度的具体信息(口感、服务、环境、性价比等),观点明确,能强烈影响读者的就餐意愿 |
| 4. 事实准确性(Factual Accuracy)(仅用于知识库评估) | 从评论中抽取的知识(三元组)是否真实反映了原文内容 | 1分:三元组完全错误或曲解了原意(如将“不喜欢”抽为“喜欢”)3分:部分正确但存在偏差(如将“价格略贵”抽为“价格昂贵”)5分:完全准确地捕捉了原文陈述的事实或观点 |
| [1] |
DING H, XIA W, ZHOU Y, et al. Evaluation and practical application of prompt-driven ChatGPTs for EMR generation[J]. npj Digital Medicine, 2025, 8(1): 77.
doi: 10.1038/s41746-025-01472-x pmid: 39894840 |
| [2] |
PENG Y, MALIN B A, ROUSSEAU J F, et al. From GPT to DeepSeek: Significant gaps remain in realizing AI in healthcare[J]. Journal of Biomedical Informatics, 2025, 163: 104791.
doi: 10.1016/j.jbi.2025.104791 |
| [3] | 荣蓉. 人工智能生成内容的算法与应用探索[J]. 信息记录材料, 2025, 26(3): 83-85 |
| [4] | IYYAPPAN K S, BALASUNDARAM S R. An integer linear programming model for multi document summarization of learning materials using phrase embedding technique[J]. International Journal of System Assurance Engineering and Management, 2024, 15(6): 2772-2785 |
| [5] | FUNK M, HOSEMANN S, JUNG J C, et al. Towards ontology construction with language models[EB/OL]. (2023-09-18)[2024-09-10]. https://doi.org/10.48550/arXiv.2309.09898. |
| [6] | ASHOK D, LIPTON Z C. PromptNER: prompting for named entity recognition[EB/OL]. (2023-06-20)[2024-09-10]. https://doi.org/10.48550/arXiv.2305.15444. |
| [7] |
XU L, BU X, TIAN X. Dynamic Prompt-Driven Zero-Shot Relation Extraction[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2024, 32(5): 2900-2912.
doi: 10.1109/TASLP.2024.3402063 |
| [8] |
WANG Z, XIA R, YU J. Unified ABSA via Annotation-Decoupled Multi-Task Instruction Tuning[J]. IEEE Transactions on Knowledge and Data Engineering, 2024, 36(11): 7242-7254.
doi: 10.1109/TKDE.2024.3392836 |
| [9] |
WANG X Z, GAO T Y, ZHU Z C, et al. KEPLER: A unified model for knowledge embedding and pre-trained language representation[J]. Transactions of the Association for Computational Linguistics, 2021, 9: 176-194.
doi: 10.1162/tacl_a_00360 |
| [10] | LI S B, LI X G, SHANG L F, et al. Pre-training language models with deterministic factual knowledge[EB/OL]. (2022-10-20)[2024-09-10]. https://arxiv.org/abs/2210.11165. |
| [11] | TIAN S Y, LUO Y Y, XU T Z, et al. KG-adapter: Enabling knowledge graph integration in large language models through parameter-efficient fine-tuning[C]// Findings of the Association for Computational Linguistics: ACL 2024. Stroudsburg: Association for Computational Linguistics, 2024: 3813-3828. |
| [12] |
LU G J, YU H B, YAN Z H, et al. Commonsense knowledge graph-based adapter for aspect-level sentiment classification[J]. Neurocomputing, 2023, 534: 67-76.
doi: 10.1016/j.neucom.2023.03.002 |
| [13] | YE X, YAVUZ S, HASHIMOTO K, et al. RNG-KBQA: generation augmented iterative ranking for knowledge base question answering[C]// Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: Association for Computational Linguistics, 2022: 6032-6043. |
| [14] |
PAN S R, LUO L H, WANG Y F, et al. Unifying large language models and knowledge graphs: a roadmap[J]. IEEE Transactions on Knowledge and Data Engineering, 2024, 36(7): 3580-3599.
doi: 10.1109/TKDE.2024.3352100 |
| [15] | SHARIATMADARI A H, GUO S, SRINI VASAN S, et al. Harnessing the power of knowledge graphs to enhance LLM explainability in the biomedical domain[C]// Proceedings of the 1st AAAI Workshop on Large Language Models for Biological Discoveries. Palo Alto: AAAI Press, 2024: 1-8. |
| [16] | 余意. 饮食健康信息的虚假性识别及知识图谱构建研究[D]. 北京: 北京外国语大学, 2024. |
| [17] | 李广, 肖一, 胡鹏举, 等. 基于智能体工作流的体系智能架构研究[C]// 中国指挥与控制学会. 首届全国大模型与决策智能大会论文集. 中国航天科技集团中国航天科技创新研究院, 2024: 225-234. |
| [18] | 赵同明, 钱佳琛, 王翔, 等. 健康饮食知识图谱和问答系统构建研究[J]. 现代信息科技, 2024, 8(6): 7-10. |
| [19] |
ZHU J, FENG P, LU J, et al. ZeROf-Offload: forward-gradient scheme for efficient full parameter fine-tuning of billion-scale language models[J]. Machine Learning-science and Technology, 2024, 5(4): 045054.
doi: 10.1088/2632-2153/ad9667 |
| [20] |
YOO S, KIM J. Adapt-cMolGPT: A Conditional Generative Pre-Trained Transformer with Adapter-Based Fine-Tuning for Target-Specific Molecular Generation[J]. International Journal of Molecular Sciences, 2024, 25(12): 6641.
doi: 10.3390/ijms25126641 |
| [21] |
CHEN Z, LI Z, ZENG Y, et al. GAP: A novel Generative context-Aware Prompt-tuning method for relation extraction[J]. Expert Systems with Applications, 2024, 248:123478.
doi: 10.1016/j.eswa.2024.123478 |
| [22] | 郭新浩. 基于Prompt的文本生成技术研究与实现[D]. 北京: 北京邮电大学, 2023. |
| [23] | 沈杰. 大语言模型结合知识库的发展规划智能问答系统研究[D]. 武汉: 武汉邮电科学研究院, 2024. |
| [1] | WANG Danlin, TANG Yunqi. Advances in Zero-Shot Text-to-Speech Technology [J]. Frontiers of Data and Computing, 2026, 8(2): 204-214. |
| [2] | WANG Cheng,ZENG Shirong,WANG Chuwen,JIANG Changjun. Market Trading Behavior Simulation Driven by Large Language Models [J]. Frontiers of Data and Computing, 2026, 8(1): 2-13. |
| [3] | WU Zhihui,HUANG Shaohan,ZHANG Yifei,QI Jiaxing,XIAO Zhiwen,ZENG Chang,LUAN Zhongzhi. Retrieval-Enhanced Log Question Answering System [J]. Frontiers of Data and Computing, 2026, 8(1): 64-76. |
| [4] | WU Jianhua, LIU Zhenyu, ZENG Rui, WANG Wenxuan, YI Yong, WANG Shiyi. Research on the Application of Fine-Tunned Large Language Models Based on LoRA in Quality Evaluation of the Security Level Protection Assessment Reports [J]. Frontiers of Data and Computing, 2025, 7(6): 111-123. |
| [5] | LIANG Fei, ZHANG Shixing, CHENG Zirui. A Blockchain Anomaly Transaction Detection Model Based on Threat Environment Perception and Large Language Model Feature Enhancement [J]. Frontiers of Data and Computing, 2025, 7(6): 23-34. |
| [6] | LIU Dianyu,LIU Qingkai,XIAO Yuyang,WANG Jie. CAE-Bench:An Evaluation of Large Language Models in Structural Mechanics Simulation [J]. Frontiers of Data and Computing, 2025, 7(4): 155-168. |
| [7] | MA Qiuping, ZHANG Qi, ZHAO Xiaofan. Review of Research on Chart Question Answering [J]. Frontiers of Data and Computing, 2025, 7(1): 19-37. |
| [8] | PEI Bingsen,LI Xin,JIANG Zhangtao,LIU Mingshuai. Research on the Generation and Evaluation of Judicial Text Summarization Based on Large Language Models [J]. Frontiers of Data and Computing, 2024, 6(6): 62-73. |
| [9] | ZHAO Xiaodan, HU Lin. Research on Knowledge Extraction Method for Agricultural Science and Technology Policies Based on Deep Learning [J]. Frontiers of Data and Computing, 2024, 6(4): 106-115. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||
