The application provides a question and answer method and
system based on a large
language model, which comprises the following steps: determining a current question of a user and a
natural language understanding prompt word; inputting the current question and the
natural language understanding prompt word into a pre-trained large
language model to obtain a question understanding result and a question to be answered output by the large
language model according to a
natural language understanding strategy; in the case that the question understanding result is a factual question, retrieving an answer from a
knowledge graph based on semantic analysis; inputting the retrieved answer and an answer
verification prompt word into the pre-trained large language model to obtain an answer
verification result; in the case that the
verification is reasonable, taking the retrieved answer as the final answer to the current question; and in the case that the verification is unreasonable, generating an answer by the large language model. In the multi-round question and answer task, the application can deeply understand the question of the user based on the context, effectively retrieve and integrate information from different
knowledge sources, and thus accurately and efficiently provide an answer to the current question.