Dynamic LLM Prompt Generation for Rejection Code Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language models (LLMs) often provide suboptimal responses when faced with rejection requests containing numeric or alphanumeric codes due to poorly designed prompts, particularly in bureaucratic contexts like medical billing, where specific guidance is needed for remediation.

Innovation Solution

A method for dynamically generating prompts by retrieving related request code text and resolution text from external documents, using techniques like vector similarity and keyword matching, and incorporating supplemental data to enrich the prompt for improved LLM guidance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If a generic prompt is used for rejection requests with numeric or alphanumeric codes, then the prompt is simple and easy to apply, but the LLM response is suboptimal and lacks specific guidance for remediation

Engineering Contradiction:
Improveprompt simplicityVSAvoidLLM response accuracy
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The prompt is transformed from a static generic template into a dynamic structure that automatically adapts to specific rejection scenarios. The system retrieves relevant context about the rejected request code and refusal code, then dynamically inserts this information into the prompt, allowing the same prompt framework to deliver customized, scenario-specific guidance while maintaining ease of use through automation

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

An intermediary retrieval system is introduced between the generic prompt and the LLM. This intermediary component fetches relevant information about request codes and refusal codes from external sources, enriches the prompt with this context, and then presents it to the LLM. This mediator enables the system to bridge the gap between simple prompt application and accurate, context-aware responses

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If dynamic prompt generation with external document retrieval is implemented, then LLM response accuracy and guidance specificity are improved, but system complexity increases

Engineering Contradiction:
ImproveLLM response accuracyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The retrieval system is designed with universal functionality to handle multiple types of rejection scenarios through a single unified approach. It can retrieve context for various request code types (numeric, alphanumeric, categorical) and refusal codes from different external sources, making the system adaptable to diverse bureaucratic contexts without requiring separate specialized components for each scenario

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

Solution Approach 2:

The system performs preliminary retrieval and enrichment of context information before the LLM generates its response. By proactively fetching relevant data about the rejected request and refusal code in advance, the system ensures that the LLM receives well-prepared, context-rich prompts, reducing the need for complex real-time processing during the actual response generation phase

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20260057190A1Dynamic large language model prompt generation for request rejections
Publication Date: 2026.02.26 ROYAL BANK OF CANADA
  • US20260057190A1 patent drawing
  • US20260057190A1 patent drawing
  • US20260057190A1 patent drawing

AI summary

Rejection information for a request rejection for the rejected request is obtained. The rejection information comprises a rejected request code for the rejected request and a refusal code, which are extracted from the rejection information. The rejected request code is used to retrieve related request code text from a first document. The related request code text comprises a rejected request code characterization for the rejected request code itself, and additional request codes that are related to the rejected request code and respective additional request code characterizations for the additional request codes. The refusal code is used to retrieve at least one resolution text from a second document. At least part of the related request code text and at least part of the resolution text are dynamically combined into a prompt requesting a recommendation for resolving the request rejection, and the prompt is submitted to an LLM.