Grammar-Based Question-Query Pair Generation from Knowledge Bases
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating question/query pairs require significant human input and are not scalable for creating large datasets needed for effective machine learning training in AI modules and software applications.
Innovation Solution
An automated system that leverages WikiData as a knowledge base, using multiple layers of question templating and context-free grammar rules to generate natural language questions and formal language queries with minimal human intervention.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If automated question/query pair generation is implemented, then productivity is improved, but device complexity increases
Solution Approach 1:
The system divides the question generation process into distinct modules: a template generator that creates question templates from context-free grammar rules, a knowledge base processing module that extracts entities and relationships, and a pair generation module that combines templates with knowledge base data. This segmentation allows each module to be independently optimized and maintained, reducing overall system complexity while enabling high-throughput automated generation of question/query pairs
Solution Approach 2:
The system performs preliminary action by pre-generating question templates from context-free grammar rules and storing them in a template repository before actual question generation. This allows the system to efficiently generate large numbers of questions by simply filling templates with knowledge base data, rather than generating each question from scratch, thereby improving productivity without proportionally increasing complexity
2Measurement precision
If large datasets are generated for machine learning training, then measurement precision is improved, but loss of time increases
Solution Approach 1:
The system enables continuous generation of question/query pairs by maintaining an operational knowledge base connection and continuously producing training data. The automated pipeline processes knowledge base entries through templates without interruption, generating large volumes of high-quality training data efficiently. This continuous operation eliminates manual dataset creation bottlenecks and provides sufficient training data for machine learning models without excessive time investment
Data Source
AI summary
Disclosed is a method and system for automatically generating question and query pair from a knowledge base that involves accessing a knowledge base to extract one or more entities and one or more predicates, generating a baseline question template from a context free grammar rule, inputting the one or more entities and the one or more predicates into the baseline question template to generate a numbered question template, generating a typed question template by traversing the numbered question template through a predicate type-graph, generating a SPARQL query by inputting the one or more entities and the one or more predicates into a SPARQL query template, generating a question by inputting the one or more entities and the one or more predicates into the typed question template, and constructing a question and query pair by combining the question and the SPARQL query.


