Skip to main content
QUICK REVIEW

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

Zhixiao Qi, Yijiong Yu|arXiv (Cornell University)|Aug 20, 2023
Topic ModelingComputer Science11 citations
TL;DR

FoodGPT introduces incremental pre-training to inject domain knowledge from images, scanned documents, and private structured data into a Chinese-L LaMA2-13B base model, augmented with an external knowledge graph for retrieval to reduce hallucinations in food testing tasks.

ABSTRACT

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.

Motivation & Objective

  • Motivate the creation of a vertical LLM for food testing where domain knowledge exists outside plain text.
  • Develop an incremental pre-training workflow to inject image/scanned document data and private structured data into the base model.
  • Ensure reliable, low-hallucination outputs by integrating an external knowledge graph retrieval mechanism.

Proposed method

  • Use OCR to convert images and scanned documents into text and split long documents into document-specific chapters with document-prefixed data.
  • Serialize private structured data into two formats, Datav1 and Datav2, with Datav2 generated via controlled random text generation using ChatGPT; remove confidential fields.
  • Incorporate additional data types such as glossaries, tutorials, sentiment data, laws, and exam questions into incremental pre-training.
  • Apply Chinese-LLaMA2-13B as the base model and LoRA for incremental pre-training.
  • Perform instruction fine-tuning via LoRA using forum Q&A pairs and seed instructions from domain experts expanded with evol-instruct.
  • Construct an external knowledge graph from structured data and text and use retrieval to augment prompts for FoodGPT.

Experimental results

Research questions

  • RQ1How can incremental pre-training incorporate non-textual and private structured knowledge into an LLM for a specialized domain like food testing?
  • RQ2Does an external knowledge graph reduce machine hallucination and improve precision in domain-specific outputs?
  • RQ3What data collection and serialization strategies best inject scanned documents and structured data into an LLM without overwhelming it?

Key findings

  • FoodGPT is built on Chinese-LLaMA2-13B with incremental pre-training and LoRA-based instruction fine-tuning for the food testing domain.
  • An OCR-driven pipeline processes over ten thousand images and scanned documents, with chapter-level labeling and document-prefixing to align cross-document variability.
  • Two serialization schemes (Datav1 and a novel Datav2) convert private structured data into trainable natural-language formats, reducing potential conflicts and repetition.
  • External knowledge graphs are used for retrieval to support FoodGPT responses and mitigate hallucinations in a high-stakes domain.
  • Instruction fine-tuning employs forum Q&A pairs and seed instructions from domain experts, expanded by evol-instruct to diversify prompts.
  • The paper presents a complete pipeline combining incremental pre-training, instruction fine-tuning, and knowledge-graph retrieval for a domain-specific LLM.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.