The invention discloses a logic knowledge construction method and device based on a large
language model and
logic programming,
electronic equipment and a storage medium, and belongs to the field of
artificial intelligence knowledge engineering. According to the method, automatic conversion from multi-source heterogeneous knowledge to
machine reasonable logic knowledge is realized through combination of semantic understanding capability of a large
language model and standardized
processing of
logic programming. The method specifically comprises the steps of obtaining unstructured / semi-structured original knowledge data, performing entity relationship recognition and
predicate logic detection by utilizing a large
language model to generate a preliminary logic expression, performing grammar normalization
processing to form standard logic facts and rules, and constructing a consistent logic
knowledge base through a conflict detection and resolution mechanism. According to the method, a mixed conversion framework of
natural language and formalized logic is innovatively provided, and the
maintainability and expandability of the
knowledge base are remarkably improved by introducing
timestamp metadata, a rule dependence graph and an incremental updating mechanism. The technology provides structured logic support for subsequent
large model reasoning, and can be widely applied to intelligent
questions and answers, decision support and other scenes requiring precise logic reasoning.