The present disclosure provides a
knowledge base construction method and a
knowledge retrieval method based on a large
language model, and relates to the technical field of
artificial intelligence such as large language models, knowledge bases, cross-references, and pre-compilation. The method comprises: performing two-step chain
ingestion processing on the original knowledge document to be processed as shown below: in the analysis stage, the key entities, concepts and arguments are extracted from the original knowledge document by the large
language model, and based on the
summary information of the existing
knowledge base and the key entities, concepts and arguments, the potential association, contradiction and knowledge gap between the
knowledge content in the original knowledge document and the existing knowledge page are identified, and the output is a
structured analysis report; in the generation stage, the large
language model creates a new knowledge page or updates an existing knowledge page according to the
structured analysis report, and establishes cross-reference relationships between knowledge pages, and obtains a
knowledge base composed of pre-compiled knowledge pages that can be persistently stored. The knowledge base constructed by the method will be more convenient to improve the efficiency of subsequent query and retrieval.