Serverless LLM Routing Using Similarity-Matched Expert Endpoints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language model (LLM) systems face challenges in efficient routing of prompts to appropriate serverless functions, leading to wastage of computing resources and high costs due to large model sizes and inefficient domain-specific query handling.

Innovation Solution

A serverless function router that routes prompts to the most suitable endpoints with subject matter expert models by querying a vector database for similarity, using prompt-aware routing to minimize resource waste and optimize query handling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional LLM inference services route all prompts to general-purpose models, then model versatility is maintained, but computing resources are wasted and response efficiency decreases

Engineering Contradiction:
Improveresponse efficiencyVSAvoidcomputing resource waste
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system segments the model pool into specialized subject matter expert models (e.g., medical, legal, technical) and routes prompts to appropriate segments based on content analysis. This segmentation allows efficient matching without deploying all models for every query, reducing resource waste while maintaining versatility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A router component acts as an intermediary between incoming prompts and the model pool. The router analyzes prompt characteristics and directs queries to the most suitable subject matter expert models, preventing direct but inefficient routing to all models and optimizing resource allocation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If multiple specialized subject matter expert models are deployed, then routing precision improves, but system complexity increases

Engineering Contradiction:
Improverouting precisionVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The router is designed as a universal component that handles diverse prompt types across multiple domains. It uses a unified routing mechanism that can identify and direct to different subject matter expert models based on prompt content, reducing the need for separate routing logic for each model type.

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

Solution Approach 2:

The system changes routing parameters dynamically based on prompt characteristics. By analyzing prompt content and matching it against subject matter categories, the router adjusts routing decisions in real-time, achieving high precision without requiring complex static configurations for each model.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If prompt-aware routing with similarity matching is implemented, then resource allocation efficiency improves, but computational overhead for similarity calculation increases

Engineering Contradiction:
Improveresource allocation efficiencyVSAvoidcomputational overhead
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The system performs preliminary actions by pre-categorizing subject matter expert models and preparing routing criteria before actual inference. This preliminary organization enables faster matching during runtime, reducing the computational overhead of similarity calculations while maintaining efficient resource allocation.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12626070B2Serverless functional routing for large language model inference service
Publication Date: 2026.05.12 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12626070B2 patent drawing
  • US12626070B2 patent drawing
  • US12626070B2 patent drawing

AI summary

A computer-implemented method for serving a large language model (LLM) application via a serverless function router communicative with multiple endpoints that each have a set of subject matter expert models stored thereon is provided. The computer-implemented method includes receiving a prompt, querying a database comprising multiple datasets for an indication as to which one of the multiple datasets has a highest level of similarity with the prompt, recognizing one of the multiple endpoints as having the set of the expert models stored thereon which have a closest match with the one of the multiple datasets and routing the prompt to the one of the multiple endpoints having the set of the expert models stored thereon which have the closest match with the one of the multiple datasets.