GraphQL Schema Chunking for Accurate Low-Latency Query Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language model (LLM) based solutions struggle with large schemas due to size limitations, leading to slow inference speeds, high latency, and increased hallucination, especially when retrieving data from large GraphQL SuperGraphs with thousands of entities and fields.

Innovation Solution

A system and method that involves chunking a GraphQL schema into smaller units, embedding these chunks into a vector database, and using natural language inputs to dynamically generate queries, reducing the size of the schema to improve performance and accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If full schemas are provided as context to LLMs, then the LLM can have deep understanding of relationships and connections, but inference speed slows down and latency increases

Engineering Contradiction:
ImproveLLM understanding accuracyVSAvoidinference latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the full GraphQL schema into smaller, relevant subschemas based on the user query. Instead of providing the entire schema to the LLM, the system identifies and extracts only the necessary portions (types, fields, and relationships) that are relevant to the specific query task, thereby reducing context size while maintaining understanding accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system extracts only the essential schema components needed for the specific query task. By analyzing the user query and the full schema, it extracts relevant types, fields, and relationships, removing unnecessary portions before presenting to the LLM, thus reducing latency while preserving understanding.

Inventive Principle:
Principle #2Taking out (Extraction)

2Loss of information

If full schemas are provided as context to LLMs, then complete information is available, but the LLM experiences hallucination and performance degradation

Engineering Contradiction:
Improveschema information completenessVSAvoidLLM output accuracy
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent applies local quality by providing different levels of schema detail to different parts of the LLM's context. The system identifies which specific types and fields are relevant to the query and provides detailed information about those while omitting or simplifying less relevant portions, creating a non-uniform context structure that improves reliability.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The schema context provided to the LLM is dynamic rather than static. The system adapts the schema content based on the specific user query, extracting and providing only the portions that are relevant to the current task. This dynamic adaptation prevents information overload and reduces hallucination while maintaining completeness for the specific query.

Inventive Principle:
Principle #15Dynamics

3Adaptability or versatility

If large schemas with thousands of entities and fields are used, then comprehensive data retrieval is possible, but developers have difficulty finding correct fields

Engineering Contradiction:
Improvedata retrieval capabilityVSAvoidfield discovery difficulty
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The system performs preliminary action by pre-processing the full schema and organizing it into structured, queryable components. Before the LLM needs to generate queries, the system has already parsed the schema, identified relationships, and made the information accessible through structured representations, thereby easing field discovery while maintaining comprehensive retrieval capability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20260037506A1System and method for enhanced schema discovery and query generation
Publication Date: 2026.02.05 INTUIT INC
  • US20260037506A1 patent drawing
  • US20260037506A1 patent drawing
  • US20260037506A1 patent drawing

AI summary

A system and method are provided for enhanced schema discovery and query generation.