Context Variable Mechanism for Passing Complex Data in LLM Processes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Models (LLMs) face challenges in processing and outputting meaningful responses to prompts containing 'non-language text' or complex data, which can result in erroneous outputs or exceed prompt length limits.

Innovation Solution

The method involves constructing a prompt based on user input, using an orchestrator to select AI plugins and form context variables to represent complex data, and modifying the prompt to include references to these context variables without including the complex data itself, allowing for efficient passing of complex data between AI plugins and generative models.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If complex data is included directly in the prompt input to LLMs, then the LLM can process and output meaningful responses, but the prompt length may exceed token limits and erroneous outputs may occur

Engineering Contradiction:
Improveoutput accuracyVSAvoidprompt length
Core Design Contradiction:
ReliabilityVSLength of moving object

Solution Approach 1:

The patent segments the data into two distinct parts: a compressed representation (context variable name) that is passed to the LLM, and the full complex data object that is stored separately and accessed via the context variable. This segmentation allows the prompt to remain within token limits while the LLM can still access meaningful information about the data through the compressed reference.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts only the essential identifier (context variable name) from the complex data object and passes this extracted reference to the LLM, while leaving the full complex data object outside the prompt. This extraction approach reduces prompt length significantly while maintaining the ability to access meaningful data through the reference.

Inventive Principle:
Principle #2Taking out (Extraction)

2Adaptability or versatility

If complex data is passed between AI plugins sequentially, then data can be shared between plugins, but processing speed decreases due to sequential operations

Engineering Contradiction:
Improvedata sharing capabilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent creates a universal context variable mechanism that serves multiple functions simultaneously: it acts as a data reference for LLMs, enables data sharing between AI plugins, and provides a standardized interface for accessing complex data. This multi-functionality allows different components to access shared data without requiring sequential passing, thereby improving processing speed while maintaining versatility.

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

3Length of moving object

If context variables are used to reference complex data, then prompt length is reduced and token limits are avoided, but the system complexity increases due to additional context management

Engineering Contradiction:
Improveprompt lengthVSAvoidcontext management complexity
Core Design Contradiction:
Length of moving objectVSDevice complexity

Solution Approach 1:

The patent introduces context variables as intermediary references that mediate between the complex data objects and the LLM. These context variables serve as simple, manageable placeholders that the LLM can work with without needing to handle the full complexity of the underlying data structures, thereby reducing prompt length while the intermediary layer manages the complexity of data access.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250103858A1Passing complex data objects in large language model processes
Publication Date: 2025.03.27 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250103858A1 patent drawing
  • US20250103858A1 patent drawing
  • US20250103858A1 patent drawing

AI summary

Examples are disclosed that relate to passing complex data objects as context variables between iterative prompts to AI models. One example provides a method, comprising receiving an input, constructing a prompt based upon the input, and inputting the prompt into an orchestrator. The method further comprises, based on the prompt, forming a context variable to reference complex data. The method further comprises providing modified input to a first AI plugin at a first orchestration stage, receiving the complex data from the first AI plugin, and storing the complex data as the context variable. The method further comprises modifying the prompt to include a reference to the context variable without modifying the prompt to include the complex data, thereby forming a modified prompt. The method further comprises providing the modified prompt to a generative model, receiving generated text from the generative model, and outputting the generated text with the complex data.