Ontology–LLM Query Routing for Faster Knowledge-Base Search
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing querying systems face significant computational demands and inefficiencies due to the lack of integration between graph-like ontologies and large language models (LLMs), as well as the inability to link knowledge bases with source documents, leading to time-consuming queries in large datasets.
Innovation Solution
A querying method and system that combines a lexical-conceptual ontology with a LLM, allowing queries to be resolved against either component based on query type variability, and includes a conceptual reverse index and vector index to reduce computational load, while updating the ontology with new relations from LLM outputs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a literal string-matching search system is used to query a large dataset, then the search can be performed, but the computational demands and time required become excessive
Solution Approach 1:
The system segments the knowledge representation into two distinct components: a lexical-conceptual ontology for precise classification queries and an LLM for broad-based natural language queries. This segmentation allows each component to handle specific query types efficiently, avoiding the need to process all queries through a single slow literal search system.
Solution Approach 2:
The patent introduces a query router as an intermediary component that analyzes incoming queries and directs them to the appropriate knowledge base component (ontology or LLM). This intermediary eliminates unnecessary computational overhead by preventing literal string-matching searches for queries that can be handled more efficiently by the other component.
2Measurement precision
If a lexical-conceptual ontology is used for precise classification queries, then classification accuracy is improved, but the system cannot handle broad-based natural language queries effectively
Solution Approach 1:
The patent creates a multi-functional querying system where the same architecture can handle both precise classification queries (via ontology) and broad-based natural language queries (via LLM). The query router enables the system to universally accept different query types and route them to the appropriate handler, making the system adaptable to various query requirements.
3Adaptability or versatility
If an LLM is used for broad-based natural language queries, then the system can provide generalized answers, but it cannot provide precise classifications based on predefined categories
Solution Approach 1:
The system segments query handling based on the type of query received. Structured queries seeking precise classifications are routed to the lexical-conceptual ontology, while unstructured natural language queries are routed to the LLM. This segmentation ensures that each component operates in its optimal domain, maintaining both classification precision and natural language capability.
4Productivity
If neither ontology nor LLM is linked to source documents, then the knowledge can be queried, but the sources on which knowledge is based cannot be retrieved
Solution Approach 1:
The patent introduces source document tracking as an intermediary layer that maintains links between queried information and original source documents. The query router and knowledge base components operate as intermediaries that can retrieve both the answered queries and their source document references, enabling users to access the underlying data without sacrificing query speed.
Data Source
Figure 1
Figure 2
Figure 3A
AI summary
There is provided a computer-implemented querying method using a knowledge base, the computer-implemented method comprising: obtaining the knowledge base comprising: a large language model (LLM); and lexical-conceptual ontology data representative of a lexical-conceptual ontology comprising a plurality of nodes and a plurality of edges connecting the nodes; wherein the plurality of nodes represent lemmas and concepts; and wherein the plurality of edges represent relation types between the nodes; obtaining a model query; resolving the model query against the lexical-conceptual ontology or the LLM based on the model query; and outputting a query result.