LLM Input Structuring and Rich Debugging via Ontology

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models (LLMs) are opaque, imprecise, and inconsistent in their responses, making them challenging to debug and requiring complex prompt engineering, which can lead to undesirable results due to difficulties in constructing effective natural language inputs and processing responses.

Innovation Solution

An artificial intelligence system that enhances user interactions with LLMs by providing an input form with data fields for users to input tasks, augmenting prompts with additional information, and allowing interaction with an ontology to structure and debug outputs, enabling rich debugging and efficient data retrieval through pre-configured schemas and variable assignment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If complex prompt engineering is used to construct effective natural language inputs, then the LLM can generate more accurate and relevant responses, but the process becomes more time-consuming and difficult to master

Engineering Contradiction:
Improveresponse accuracyVSAvoidprompt construction time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent introduces a structured input form as an intermediary between the user and the LLM. This form includes fields for task description, context information, constraints, and output format specifications. The form automatically generates optimized prompts by filling in these structured fields, eliminating the need for users to manually craft complex natural language prompts while maintaining high response accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary processing by automatically generating prompts based on user inputs into structured forms. The prompt generation module pre-processes the information from form fields, organizes it according to best practices, and creates optimized prompts before they are sent to the LLM. This preliminary action saves users time and ensures prompt effectiveness without requiring manual optimization.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If existing LLM systems only accept string inputs, then the system remains simple, but prompt engineering becomes difficult and time-consuming for complex tasks

Engineering Contradiction:
Improveinput format flexibilityVSAvoidsystem structure
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent creates a universal input interface that accepts multiple data types (text, numbers, dates, booleans, etc.) through a single structured form. The form can handle various input scenarios including simple queries, complex data processing tasks, and multi-step operations. This universal interface simplifies user interaction while enabling diverse and complex prompt engineering capabilities.

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

Solution Approach 2:

The structured input form acts as an intermediary layer between the user and the LLM's string-based processing. It translates diverse user inputs into properly formatted prompt components, handling type conversions and format optimizations automatically. This intermediary enables flexible input handling without requiring changes to the LLM's core string-processing architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If LLM responses are returned as-is, then the system remains simple, but the responses are often in formats unsuitable for subsequent data functions or operations

Engineering Contradiction:
Improvedata processing efficiencyVSAvoidoutput processing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary output processing by automatically formatting LLM responses before they are returned to the user or integrated into other systems. The prompt generation module includes output formatting capabilities that pre-structure responses in JSON, CSV, or other desired formats, eliminating the need for post-processing and improving data processing efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system incorporates output format specifications as feedback from the user into the prompt generation process. Users can specify desired output formats in the structured form, and the system uses this feedback to generate prompts that elicit appropriately formatted responses from the LLM. This feedback mechanism ensures outputs are ready for immediate use in data functions without additional processing.

Inventive Principle:
Principle #23Feedback

4Adaptability or versatility

If multiple back-and-forth responses are used in complex calls, then the LLM can handle complex tasks, but consistency and predictability of results become harder to maintain

Engineering Contradiction:
Improvetask complexity handlingVSAvoidresponse consistency
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments complex tasks into distinct components within the structured input form: task description, context information, constraints, and output format. This segmentation allows the system to control each component independently, ensuring consistent and predictable results. The segmented structure makes it easier to reproduce complex multi-step operations while maintaining reliability through explicit constraint specifications.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20240403194A1Structuring and rich debugging of inputs and outputs to large language models
Publication Date: 2024.12.05 PALANTIR TECHNOLOGIES INC
  • US20240403194A1 patent drawing
  • US20240403194A1 patent drawing
  • US20240403194A1 patent drawing

AI summary

The disclosure is directed to methods and systems for improving interactions with a Large Language Model (LLM). An artificial intelligence system (AIS) can receive user inputs via a graphical user interface indicating a task to be performed by the LLM, one or more tools which may be accessed by the AIS in response to tool calls from the LLM, and an output schema for structuring a format of a response from the LLM. The AIS can generate a prompt for the LLM based on the user input. The prompt can include indications of the one or more tools, one or more example tool operations, the task to be performed, and an indication of the output schema. The AIS can include a debugging application or module enabling rich debugging of language model interactions in a single view.