The application discloses a geometric embedding
knowledge graph question answering method based on a large
language model, first, aiming at the structural heterogeneity of
knowledge graph chain, level and cycle, entity and relationship embedding is learned in Euclidean space, hyperbolic space (Poincare ball model) and
spherical space (unit sphere) respectively, and the triple
score of the three geometric spaces is optimized by combining negative sampling and maximum interval loss. Secondly, in the reasoning stage, the large
language model analyzes the problem and identifies the key entity, constructs the relevant subgraph, and generates the candidate path by using the breadth-first search or
beam search; the path node is projected in three ways and spliced to calculate the attention weight, the fusion node representation and edge
level fusion score are obtained, and the path
score is accumulated. Finally, the structured prompt is formed by selecting the Top-K evidence path and its weight, contribution value, the
large model is constrained to generate the answer and explanation, the
traceability and accuracy are improved, the consistency is enhanced, and the illusion is reduced.