The invention discloses a
knowledge base question and answer method based on a large
language model agent, and the method comprises the following specific steps: S1, receiving the input of a user, returning an answer to the user, and supporting multiple rounds of dialogues and context preservation; s2, understanding the
natural language input of the user, and generating an answer based on a pre-trained
language model; s3, storing and managing
domain knowledge, and supporting query of structured and
unstructured data; s4, receiving the output of the large
language model, and generating a final answer according to the
knowledge base information; and S5, monitoring and optimizing the reasoning efficiency of the large language model so as to improve the response speed of the
system. According to the method, complex question and answer tasks can be better understood and processed, the answer accuracy and response efficiency are improved, in addition, an
intelligent agent is formed by integrating the
knowledge base and the large language model, more flexible and diversified knowledge base question and answer can be carried out, and many problems in the prior art are solved.