Knowledge Graph Query Templates from Question-Answer Pairs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The generation of query templates for knowledge-graph based question answering (KGQA) systems is laborious and time-consuming, relying heavily on manual labor and extensive training data, which hinders the efficiency of building these systems.

Innovation Solution

A method and system that automatically generates candidate query templates using the knowledge graph schema and filters them using a real question-answer corpus, reducing the need for manual development and accelerating the process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual methods are used to generate query templates, then the quality and accuracy of query templates can be ensured, but the time and labor required increase significantly

Engineering Contradiction:
Improvequery template accuracyVSAvoidtemplate generation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs self-service by automatically generating query templates through machine learning models that learn from existing question-answer pairs and knowledge graph schemas, eliminating the need for manual template creation while maintaining high accuracy through iterative learning and validation processes

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary action by pre-processing question-answer pairs to extract entities, relationships, and patterns before template generation, and by pre-defining knowledge graph schemas that guide the template synthesis process, thereby reducing the time required for actual template creation

Inventive Principle:
Principle #10Preliminary action

2Reliability

If extensive training data is used to build KGQA systems, then the system performance and accuracy improve, but the complexity and resource requirements increase

Engineering Contradiction:
Improvesystem performanceVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system extracts only the essential elements needed for query template generation from large corpora, including entity-relationship patterns, question templates, and knowledge graph schemas, rather than processing entire datasets, thereby reducing complexity while maintaining performance

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system segments the template generation process into distinct modules: question parsing, entity extraction, relationship identification, template selection, and validation. Each module handles specific tasks independently, reducing overall system complexity while achieving high performance through coordinated operation of specialized components

Inventive Principle:
Principle #1Segmentation

3Productivity

If automated methods are used to generate query templates, then the building speed of KGQA systems increases, but the precision and quality control become more challenging

Engineering Contradiction:
Improvesystem building speedVSAvoidtemplate quality control
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system implements feedback mechanisms where generated query templates are validated against the knowledge graph schema and tested with sample questions. Templates that fail validation or produce incorrect results are refined or rejected, ensuring quality control while maintaining automated generation speed through iterative improvement cycles

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system employs dynamic template generation that adapts to different knowledge graph schemas, question types, and domain-specific requirements. The generation process adjusts its parameters and strategies based on the input characteristics, maintaining high quality across diverse scenarios while preserving automation benefits

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12475113B2Generation of query templates for knowledge-graph based question answering system
Publication Date: 2025.11.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12475113B2 patent drawing
  • US12475113B2 patent drawing
  • US12475113B2 patent drawing

AI summary

A processor obtains a pair including a question and an answer in natural language; determines at least one entity in the question and an entity type of each of the at least one entity consistent with the schema of a knowledge graph (KG); identifies a subset of candidate query templates based on the entity type of each of the at least one entity, wherein the candidate query templates are generated based on the schema of the KG; composes a set of queries by populating the at least one entity into each of the subset of candidate query templates; executes the set of queries on the KG to generate respective answers; identifies a first answer from the respective answers that is matching with the answer in the pair; and determines a candidate query template, from the subset of candidate query templates, corresponding to the first answer as a query template.