Source-linked AI summary

FoodGPT: A Large Language Model in Food Testing Domain with Incremental Pre-training and Knowledge Graph Prompt

Zhixiao Qi, Yijiong Yu, Meiqi Tu, Junyi Tan, Yongfeng Huang

arXiv:2308.10173v1cs.CL

TL;DR

FoodGPT targets food testing, where important scanned and structured knowledge is absent from base-model pre-training. It uses incremental pre-training with specialized data handling and adds a knowledge graph for retrieval, while the reported technical report remains a pre-release without detailed experimental results.

  • Problem

    Food-testing knowledge is insufficiently represented in base models because substantial information exists in scanned documents, images, and private structured data.

    Source: §1 · pp. 1–2
  • Method

    FoodGPT uses incremental pre-training with processed scanned documents and serialized structured data, followed by instruction fine-tuning and external knowledge-graph integration.

    Source: §1 · p. 2, §5 · p. 5
  • Results

    The paper presents FoodGPT as a food-testing large language model and reports methods intended to inject domain knowledge and support retrieval.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The paper demonstrates a pre-release approach for building a food-testing LLM when domain knowledge is distributed across scanned, structured, and textual sources.

    Source: §1 · p. 2, §5 · p. 5

    This is a technical report of FoodGPT’s pre-release version, with detailed experimental results and analysis deferred to future versions.

    Source: §5 · p. 5

Abstract

from arXiv · show

Currently, the construction of large language models in specific domains is done by fine-tuning on a base model. Some models also incorporate knowledge bases without the need for pre-training. This is because the base model already contains domain-specific knowledge during the pre-training process. We build a large language model for food testing. Unlike the above approach, a significant amount of data in this domain exists in Scanning format for domain standard documents. In addition, there is a large amount of untrained structured knowledge. Therefore, we introduce an incremental pre-training step to inject this knowledge into a large language model. In this paper, we propose a method for handling structured knowledge and scanned documents in incremental pre-training. To overcome the problem of machine hallucination, we constructe a knowledge graph to serve as an external knowledge base for supporting retrieval in the large language model. It is worth mentioning that this paper is a technical report of our pre-release version, and we will report our specific experimental data in future versions.

1 Introduction

FoodGPT addresses food testing as a domain where base-model knowledge is insufficient because important information is stored in images, scanned documents, and private structured data. The paper introduces incremental pre-training, structured-data handling, and external knowledge-graph retrieval for this setting.

  • Food testing requires incremental pre-training because substantial domain knowledge exists in non-textual images, scanned documents, and private structured data.Source: §1 · pp. 1–2
  • FoodGPT is presented as the first large language model for the food-testing field, to the authors’ knowledge.Source: §1 · p. 2
  • The paper starts vertical-domain model construction from incremental pre-training, an approach described as rare by the authors.Source: §1 · p. 2
  • The authors propose a data-collection method to inject scanned-document and structured knowledge into FoodGPT during incremental pre-training.Source: §1 · p. 2
  • A knowledge graph serves as an external retrieval library to support precise numerical outputs and reduce machine hallucinations in food testing.Source: §1 · p. 2

2 Incremental Pre-training

FoodGPT’s incremental pre-training combines OCR-processed standards, serialized private structured data, and additional food-testing resources. The pipeline uses document segmentation and prefixes, two structured-data versions, and LoRA-based training.

2 Incremental Pre-training

  • FoodGPT’s incremental-pre-training dataset combines scanned standards, private structured databases, dictionaries, tutorials, research papers, sentiment data, laws, and exam questions.Source: §2 · p. 2, §2.2 · p. 3, §2.3 · pp. 3–4

2.1 Images and Scanned Documents

  • OCR processes over ten thousand images and scanned documents, which are split into chapter-based sequences because documents exceed the training model’s maximum length.Source: §2.1 · p. 2
  • Document prefixes identify source documents to prevent conflicting descriptions of the same testing item across standards, while high-perplexity OCR sentences are excluded.Source: §2.1 · pp. 2–3

2.2 Structured Knowledge

  • Datav1 removes confidential fields and represents each testing item as a key whose value is a Markdown table containing multiple specific testing items.Source: §2.2 · p. 3
  • Datav2 serializes structured knowledge by removing private fields, merging semantically incomplete fields, and generating varied text from selected fields.Generation uses random field selection, temperatures from 0.5 to 1.0, and one-to-two selections per field.Source: §2.2 · p. 3

2.3 Other Types of Data

  • Chinese-LLaMA2-13B is used as the base model, with LoRA applied for incremental pre-training.Specific experimental results are deferred to future versions of the technical report.Source: §2.3 · p. 4

3 Instruction Fine-tuning

Instruction fine-tuning uses forum question-answer pairs and expert-designed seed instructions expanded with evol-instruct. FoodGPT is then fine-tuned with LoRA through the described training pipeline.

3.1 Dataset

  • The instruction fine-tuning dataset is constructed through forum question-answer pairs and expert-designed seed instructions.Source: §3.1 · p. 4
  • Forum answers are selected from users with higher posting frequency to prioritize contributors expected to provide quality content.Source: §3.1 · p. 4
  • Industry experts provide 100 high-quality seed instructions, which evol-instruct expands and diversifies into a broader instruction dataset.Source: §3.1 · p. 4
  • The two dataset-construction channels combine scraped food-forum interactions with expert-guided synthetic instruction expansion.Source: §3.1 · p. 4

3.2 Training Process

  • The training process applies LoRA to fine-tune instructions for Chinese-LLaMA2-13B.Source: §3.2 · p. 4
  • The entire instruction fine-tuning workflow is presented as a pipeline in Figure 3.Source: §3.2 · p. 4

4 External Knowledge Graph Retrieval

Because food-testing outputs require strict numerical accuracy, FoodGPT supplements parameterized knowledge with an externally retrieved knowledge graph. A retrieval model parses queries, retrieves relevant graph knowledge, and concatenates it with the query before generation.

  • FoodGPT constructs a knowledge graph from structured data and text to reduce hallucinations in strict food-testing outputs.Source: §4 · pp. 4–5
  • The retrieval model parses each user query and retrieves relevant knowledge from the external knowledge graph.Source: §4 · p. 5
  • Retrieved knowledge is concatenated with the query and supplied to FoodGPT, which combines external and parameterized knowledge when generating responses.Source: §4 · p. 5
  • Figure 4 depicts the method for retrieving external knowledge-graph information.Source: Figure 4 · p. 5

5 Conclusion

FoodGPT combines incremental pre-training, instruction fine-tuning, and knowledge-graph integration to address food-testing data and output requirements. This pre-release technical report postpones detailed experimental results and analysis to future versions.

  • FoodGPT combines incremental pre-training, instruction fine-tuning, and external knowledge-graph integration for food testing.The model incorporates scanned, image-based, and private structured knowledge into incremental pre-training, while the knowledge graph supports output generation.Source: §5 · p. 5
  • The knowledge graph serves as an external database to assist FoodGPT in generating outputs under stringent food-testing metric requirements.Source: §5 · p. 5
  • The paper is a pre-release technical report whose experimental details and analysis are deferred to future versions.Source: §5 · p. 5
Loading 2308.10173v1…