Natural-Language Query Translation With AI Code Explanations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Many users lack the knowledge of programming languages, particularly complex domain-specific languages like SPL, limiting their ability to perform desired operations on databases due to the steep learning curve and syntax requirements.
Innovation Solution
A system and method that utilizes generative artificial intelligence to translate natural language descriptions into executable search queries using a plurality of large learning models (LLMs), incorporating user feedback to refine the translation accuracy and align with user preferences.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If users are required to learn programming languages with complex syntax to perform database operations, then the functionality and precision of data processing is improved, but the ease of operation deteriorates
Solution Approach 1:
The patent introduces an intermediary system (the AI translation system) that mediates between the user's natural language queries and the complex programming language requirements. The system translates user-friendly natural language into executable programming queries, eliminating the need for users to directly learn and use complex syntax while maintaining precise data processing capabilities
Solution Approach 2:
The patent replaces the mechanical learning process (users manually learning programming syntax) with an automated AI translation mechanism. Instead of requiring users to mechanically learn and type correct programming syntax, the system automatically generates and translates queries, substituting human learning effort with AI-powered translation
2Reliability
If programming languages with strict syntax requirements are used, then the reliability and correctness of code execution is improved, but the ease of operation deteriorates
Solution Approach 1:
The AI translation system serves as an intermediary that ensures reliable code execution by translating natural language into syntactically correct programming queries. The system handles the complexity of syntax requirements, ensuring that generated code is reliable and executable while users only need to provide simple natural language descriptions
Solution Approach 2:
The patent incorporates feedback mechanisms where the system can learn from user interactions and corrections. When users provide feedback on translation accuracy or prefer certain query styles, the system uses this feedback to refine its translation capabilities, improving both reliability of generated code and ease of operation over time
3Adaptability or versatility
If multiple programming languages with different syntaxes are supported, then the versatility and adaptability of the system is improved, but the device complexity increases
Solution Approach 1:
The patent implements a universal translation approach where a single AI system can translate natural language into multiple different programming languages. Rather than requiring separate specialized systems for each language, the unified AI model handles multiple language translations, maintaining versatility while managing complexity through a single multi-functional platform
Data Source
AI summary
Implementations of this disclosure provide a computer-implemented method that includes operations of obtaining a user text pertaining to a search query via a graphical user interface, providing a prompt requesting a syntactic representation of the search query to a large language model (LLM), obtaining a result from the LLM, and dynamically updating the graphical user interface based on the result from the LLM including generating a graphical user interface displaying the syntactic representation of the search query including a plurality of code segments, and further displaying a natural language explanation for each of the plurality of code segments. In some examples, the user text is a natural language description of the search query. Additionally, the graphical user interface may include a user interface element configured to receive user input resulting in display of additional content related to the syntactic representation of the search query.


