Graph Query Language With Embedded LLM Prompts for Single-Call Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for integrating large language models (LLMs) with graph queries require multiple system calls, leading to increased resource usage and lack of seamless summarization capabilities.
Innovation Solution
Incorporating LLM prompts directly into graph queries using native graph query language, allowing a single query to specify context data and trigger knowledge graph traversal for LLM analysis.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If multiple system calls are used to integrate LLMs with graph queries, then the integration capability is achieved, but resource usage increases
Solution Approach 1:
The patent combines LLM prompt execution and graph query traversal into a single integrated operation. The system allows LLM prompts to be embedded within graph query language, enabling both the LLM analysis and knowledge graph traversal to execute in one unified process rather than requiring separate system calls. This merging eliminates the back-and-forth communication overhead between multiple system components.
Solution Approach 2:
The graph query system is enhanced to serve multiple functions simultaneously: it can traverse the knowledge graph, execute LLM prompts, and retrieve results all within a single query operation. The unified query language supports both traditional graph traversal and LLM-based analysis, making the system versatile and reducing the need for specialized integration interfaces.
2Adaptability or versatility
If multiple system calls are used for LLM integration, then the functionality is achieved, but the number of operations increases
Solution Approach 1:
The patent merges multiple operational steps into a single unified operation. Instead of requiring separate system calls for LLM prompt execution and graph traversal, the system allows these operations to be combined in a single graph query that executes both functions atomically, reducing the total operation count and improving productivity.
Solution Approach 2:
The system prepares and executes the LLM prompt and graph traversal in a pre-coordinated manner through a single query submission. The query language is designed to pre-establish the connection between LLM execution and graph traversal, eliminating the need for sequential operations and intermediate processing steps.
3Ease of manufacture
If separate calls are used for graph traversal and LLM analysis, then modularity is maintained, but seamless summarization is lost
Solution Approach 1:
The patent merges graph traversal and LLM analysis into a unified operation that maintains the functional separation of concerns while enabling seamless interaction. The single query syntax allows users to express both graph exploration and LLM-based summarization in one coherent operation, providing ease of operation without sacrificing the underlying modular architecture.
Solution Approach 2:
The unified graph query language serves as an intermediary that bridges graph traversal and LLM execution. This intermediate query language allows users to express complex operations involving both graph data and LLM analysis in a single, seamless syntax, while the system internally coordinates the modular components to execute these queries efficiently.
Data Source
AI summary
Systems and methods are directed to incorporating large language model (LLM) prompts into graph queries using graph query language and executing these graph queries. The system receives a graph query that includes a LLM prompt in the graph query language. The LLM prompt comprises an input context and a query to be answered. Based on the graph query, the system traverses a knowledge graph to obtain context data associated with the input context. The context data may be constrained by access control policies of an enterprise providing the knowledge graph. A context table may be generated using the context data based on the input context indicated in the LLM prompt. The system then invokes an LLM to determine a result by applying the query of the LLM prompt to the context data obtained from the traversal of the knowledge graph. The result is then presented on a user interface of a client device.


