The invention relates to an entity extraction, storage and retrieval method based on LLM and multiple databases, entity information is extracted from a to-be-stored
data set by constructing a prompt based on the LLM, an entity ID is generated based on the entity information, and entity attributes and relationships are written into a full-text
library and a
graph database respectively in the data storage process and are bound through the entity ID, so that the entity extraction efficiency is improved, and the data
storage efficiency is improved. And the performance pressure of
mass data storage of a single-class
database is reduced. And after classification, synchronously writing into a full-text
library and a
graph database, writing entity attribute entries into the full-text
library and binding the entity attribute entries with entity IDs previously written into the full-text library, and writing entity relationships into the
graph database and binding the entity relationships with entity IDs previously written into the graph
database. The
data retrieval service is provided through the unified retrieval entry, the user does not need to increase the learning cost, the search scene is automatically judged to query the
target database, the performance advantages of each
database are fully played, and the
mass data storage and retrieval efficiency is further improved.