Detection of conflicts in multi-modal document-based LLM
A computer implemented method for conflict detection and data storage in a vector database. A processor set receives documents and splits the documents into a plurality of chunks. The processor set embeds the chunks and converts the chunks into numerical vector representations and performs a similarity check by comparing the vectors of the embedded chunks with vectors of existing chunks stored in the vector database. If no similarity is identified between the vectors of the embedded chunks and the vectors of existing chunks stored in the vector database, the processor set stores the embedded chunks in the vector database. If a similarity is identified, the processor set initiates a conflict detection check. If no conflict is identified, the processor set stores the embedded chunks in the vector database. If a conflict is identified, the processor set initiates a conflict resolution.
1 . A computer-implemented method for conflict detection and data storage in a vector database, comprising:
receiving documents and splitting the documents into a plurality of chunks;
embedding the chunks and converting the chunks into numerical vector representations;
performing a similarity check by comparing the vectors of the embedded chunks with vectors of existing chunks stored in the vector database; and
storing the embedded chunks in the vector database responsive to a determination that no similarity is identified between the vectors of the embedded chunks and the vectors of existing chunks stored in the vector database.
2 . The computer-implemented method of claim 1 , further comprising:
initiating a conflict detection check responsive to a determination that a similarity is identified; and
storing the embedded chunks in the vector database responsive to a determination that no conflict is identified.
3 . The computer-implemented method of claim 2 , further comprising initiating a conflict resolution responsive to a determination that a conflict is identified.
4 . The computer-implemented method of claim 2 , wherein the conflict detection check comprises:
extracting event information from text within the embedded chunks and generating event knowledge graphs;
extracting structure and elements from images and tables within the embedded chunks and generating structure graphs; and
analyzing the event knowledge graphs and structure graphs for conflict detection.
5 . The computer-implemented method of claim 4 , wherein the event knowledge graphs and structure graphs are analyzed using a large language model (LLM).
6 . The computer-implemented method of claim 5 , further comprising storing the embedded chunks in the vector database responsive to a determination that no conflict is identified by the LLM.
7 . A computer system comprising:
a processor set;
one or more computer-readable storage media; and
program instructions stored on the one or more storage media to cause the processor set to perform operations comprising:
receiving documents and splitting the documents into a plurality of chunks;
embedding the chunks and converting the chunks into numerical vector representations;
performing a similarity check by comparing the vectors of the embedded chunks with vectors of existing chunks stored in a vector database; and
storing the embedded chunks in the vector database responsive to a determination that no similarity is identified between the vectors of the embedded chunks and the vectors of existing chunks stored in the vector database.
8 . The computer system of claim 7 , wherein the operations further comprise:
initiating a conflict detection check responsive to a determination that a similarity is identified; and
storing the embedded chunks in the vector database responsive to a determination that no conflict is identified.
9 . The computer system of claim 8 , wherein the operations further comprise initiating a conflict resolution responsive to a determination that a conflict is identified.
10 . The computer system of claim 7 , wherein the operations further comprise:
pre-processing the embedded chunks and generating event knowledge graphs from text and structure graphs from images or tables; and
analyzing the event knowledge graphs and structure graphs to detect conflicts.
11 . The computer system of claim 10 , wherein the operations further comprise analyzing the event knowledge graphs and structure graphs using a large language model (LLM).
12 . The computer system of claim 11 , wherein the operations further comprise storing the embedded chunks in the vector database responsive to a determination that no conflict is identified by the LLM.
13 . A computer program product comprising:
one or more computer-readable storage media;
program instructions stored on the one or more storage media to perform operations comprising:
receiving documents and splitting the documents into a plurality of chunks;
embedding the chunks by converting the chunks into numerical vector representations;
performing a similarity check by comparing the vectors of the embedded chunks with vectors of existing chunks stored in a vector database; and
storing the embedded chunks in the vector database responsive to a determination that no similarity is identified between the vectors of the embedded chunks and the vectors of existing chunks stored in the vector database.
14 . The computer program product of claim 13 , wherein the operations further comprise:
initiating a conflict detection check responsive to a determination that a similarity is identified; and
storing the embedded chunks in the vector database responsive to a determination that no conflict is identified.
15 . The computer program product of claim 14 , wherein the operations further comprise initiating a conflict resolution responsive to a determination that a conflict is identified.
16 . The computer program product of claim 14 , wherein the conflict detection check comprises:
extracting event information from text within the chunks and generating event knowledge graphs;
extracting structure and elements from images and tables within the chunks and generating structure graphs; and
analyzing the event knowledge graphs and structure graphs to detect a conflict.
17 . The computer program product of claim 16 , wherein the event knowledge graphs and structure graphs are analyzed using a large language model (LLM).
18 . The computer program product of claim 17 , wherein the embedded chunks are stored in the vector database responsive to a determination that no conflict is identified by the LLM.
19 . The computer program product of claim 13 , wherein performing the similarity check comprises determining a similarity measure between the vectors of the embedded chunks and the existing vectors in the vector database.
20 . The computer program product of claim 13 , wherein the vector database is a storage unit.