Recursive LLM Data Analysis via Automated Query Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current online systems face limitations in performing complex data analytics due to the 'hallucination problem' and context window constraints of large language models (LLMs), leading to unsatisfactory user experiences and high human labor requirements for processing large datasets.

Innovation Solution

An online system employs a recursive process that breaks down user analysis prompts into simpler questions, generates database queries, and iteratively retrieves data to answer these prompts, ensuring that the data analyzed by the LLM fits within its context window and reducing the likelihood of hallucination by simplifying the analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If LLMs are used to analyze large datasets, then data analysis capability is improved, but the context window limit restricts the amount of data that can be analyzed in one pass

Engineering Contradiction:
Improvedata analysis capabilityVSAvoidamount of data that can be analyzed
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent divides the large dataset into multiple smaller chunks or batches that can be processed iteratively. The system segments the data into manageable portions that fit within the LLM's context window, processing them in sequential or parallel batches to analyze the entire dataset without overwhelming the model's context limitations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a temporal or sequential dimension to data analysis by processing data across multiple turns or iterations. Instead of attempting to analyze all data simultaneously within a single context window, the system leverages the sequence of interactions to progressively load and analyze data, effectively expanding the usable data quantity beyond the single-pass context limit.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If LLMs generate analytics output, then analysis speed is improved, but the hallucination problem reduces reliability

Engineering Contradiction:
Improveanalysis speedVSAvoidaccuracy of analytics output
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback mechanisms where the system validates LLM-generated analytics against the actual data, corrects hallucinations, and iteratively refines outputs. The system monitors generated responses, compares them with data facts, and adjusts subsequent generations to reduce hallucinations while maintaining speed through automated correction processes.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces an intermediary validation layer between the LLM and the final output. This intermediary component acts as a fact-checking mechanism that verifies generated analytics against the source data, filters out hallucinations, and ensures accuracy before delivering results to the user, thus decoupling the speed of LLM generation from the reliability of final output.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If complex analytics are performed manually by human operators, then analysis accuracy is improved, but labor requirements and time increase

Engineering Contradiction:
Improveanalysis accuracyVSAvoidtime required for analysis
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements self-service analytics where the system automatically performs complex data analysis tasks without requiring human operators. The system autonomously generates queries, processes data, and delivers analytics based on user requests, eliminating the need for manual intervention while maintaining accuracy through automated validation and error correction mechanisms.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces manual human analysis with automated computational systems. Instead of requiring humans to manually query, process, and analyze data, the system uses automated LLM-driven query generation and execution mechanisms that perform the same functions at scale and speed, substituting mechanical human labor with automated digital processes.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Ease of operation

If basic analytics are performed through keyword mapping, then ease of operation is improved, but the system cannot handle complex user requests

Engineering Contradiction:
Improvesimplicity of analytics requestVSAvoidability to handle complex requests
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent creates a universal analytics system that can handle both simple keyword-based requests and complex analytical queries through a single unified interface. The system uses LLMs to interpret and adapt user requests of varying complexity, allowing the same simple interaction model to serve multiple functions from basic metrics to sophisticated data exploration without requiring different operational modes.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent dynamically changes the complexity parameter of query processing based on the user request. For simple requests, the system uses straightforward keyword mapping; for complex requests, it automatically activates LLM-based interpretation and multi-step query generation. This parameter adaptation allows the system to maintain ease of operation while expanding versatility based on the complexity of the incoming request.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20240370478A1Recursive data analysis through automated database query generation
Publication Date: 2024.11.07 NAVAN INC
  • US20240370478A1 patent drawing
  • US20240370478A1 patent drawing
  • US20240370478A1 patent drawing

AI summary

An online system performs a recursive process for analyzing data using an LLM. The online system receives an initial analysis prompt from a user's client device. The online system repeatedly retrieves data from a database of the online system that can be useful for answering the prompt provided by user's analysis prompt. In one of these iterations, the online system generates a recursive prompt for an LLM of a model serving system and generates database queries that correspond to these generated text prompts. The online system can thereby apply these dynamically-generated database queries to its database to retrieve data to answer the generated text prompts. The online system repeatedly performs this process until an end condition is met. The online system generates a final prompt based on the retrieved data, the generated prompts, and the initial analysis prompt, and receives the prompted analysis from the model serving system.