Contextual LLM Prompts for Accurate Conversational Plugin Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Cloud-based generative AI-assistants face challenges in accurately determining which plugin a user intends to invoke due to ambiguous or nonspecific user inputs, requiring complex natural language processing and understanding to discern nuanced intents while maintaining a seamless user experience.

Innovation Solution

The system employs contextual large language model prompts enriched with retrieved text passages and detailed plugin characterizations to enhance plugin selection, leveraging a dialog manager that crafts prompts incorporating user inputs, relevant text passages, and plugin descriptions to guide the LLM in selecting the most appropriate plugin.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If the assistant uses simple plugin invocation mechanisms, then the ease of operation is improved, but the accuracy of plugin selection deteriorates due to ambiguous user inputs

Engineering Contradiction:
Improveease of plugin invocationVSAvoidaccuracy of plugin selection
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent introduces a text passage retrieval service as an intermediary component between the user input and the LLM. This service retrieves relevant text passages from a knowledge base and feeds them to the LLM, enabling the system to disambiguate user intentions more accurately without requiring users to use complex or precise commands. The text passages act as a mediator that bridges the gap between simple user input and accurate plugin selection.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary action by retrieving and preparing relevant text passages before the LLM processes the user input. The text passage retrieval service proactively fetches appropriate context from the knowledge base in advance, so that when the LLM needs to make its decision, the necessary information is already ready. This preliminary retrieval of contextual information enables more accurate plugin selection while maintaining simple user interaction.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If the system retrieves and processes more text passages for context, then the accuracy of plugin selection is improved, but the device complexity increases

Engineering Contradiction:
Improveaccuracy of plugin selectionVSAvoidcomplexity of NLP processing system
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the complex NLP processing system into distinct functional components: a text passage retrieval service, an LLM service, and a dialog manager. The text passage retrieval service is separated as an independent module that handles data fetching, while the LLM service handles the actual decision-making. This segmentation allows each component to be optimized independently and simplifies the overall system architecture despite the increased functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The text passage retrieval service serves as an intermediary layer that simplifies the interaction between the dialog manager and the LLM. Instead of the dialog manager needing to directly manage complex retrieval operations, it simply calls the retrieval service and passes the results to the LLM. This intermediary approach reduces the complexity burden on the main processing system while enabling more accurate plugin selection through richer context.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If the assistant uses complex NLP and understanding capabilities to discern user intent, then the accuracy of plugin selection is improved, but the loss of time increases

Engineering Contradiction:
Improveaccuracy of plugin selectionVSAvoidtime for intent analysis
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary retrieval of text passages in advance, so that when the user inputs a query, the relevant context is already ready for the LLM to process. This preliminary action eliminates the need for time-consuming real-time retrieval operations during the decision-making process, thereby reducing the overall time loss while maintaining high accuracy through comprehensive contextual analysis.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The text passage retrieval service acts as an efficient intermediary that pre-processes and organizes contextual information. By separating the retrieval function from the decision-making function, the system can optimize the retrieval process independently and make the LLM's processing more efficient. This intermediary approach reduces the time required for intent analysis by providing pre-organized context rather than requiring real-time processing of raw data.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250298970A1Enhanced plugin selection in conversational artificial intelligence systems through contextual large language model prompts
Publication Date: 2025.09.25 AMAZON TECH INC
  • US20250298970A1 patent drawing
  • US20250298970A1 patent drawing
  • US20250298970A1 patent drawing

AI summary

Techniques disclosed integrate generative AI assistant plugins with a large language model (LLM) to enhance conversational interactions. The techniques include receiving a user's input and retrieving relevant text passages based on a query derived from this input. A complex LLM prompt is generated, including these passages, descriptions of candidate plugins, and the user's input. This prompt is sent to an LLM service, which selects the most suitable plugin for the user's needs. Following this, a query is sent to the chosen plugin, and its response is used to craft the agent's reply to the user. The techniques emphasize dynamic selection and integration of specialized plugins based on real-time user input, leveraging LLM capabilities to interpret and recommend the best plugin response. This approach ensures tailored, informed interactions by providing responses that are both relevant and enriched with specialized plugin knowledge or functionality.