The invention discloses a food news
event data query method and
system based on a large
language model, and the method comprises the steps: obtaining a query request inputted by a user, the query request being food news related question information (such as
food safety event details, food policy interpretation, and quality spot check results) described by a
natural language; retrieving at least one knowledge block from the RAG
knowledge base according to the query request; constructing a first cue word based on the query request, the knowledge blocks and preset food
data model information, and inputting the first cue word into a large
language model to generate a
query statement; event related data (including food types, risk levels, influence ranges,
processing results and the like) are obtained from a food news
target database according to the query statements; constructing a second cue word based on the query request, the
query statement, preset food
data model information and event related data, and inputting the second cue word into a large
language model to generate a data summary result; and returning a data summary result to the user terminal. According to the method, by fusing the semantic comprehension ability of RAG retrieval and the big language model, accurate analysis and structured conversion of the food news complex query intention are achieved, and the intelligence level and the
information acquisition efficiency of food news
event data query are effectively improved.