Microservice Discovery Using LLM Embeddings and Clustered Search
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing microservice registration and discovery systems rely on name-based searches, which are inefficient and fail to account for semantic similarities, leading to suboptimal service matching and increased computational load.
Innovation Solution
Utilizing a large language model (LLM) to generate vector representations of microservice descriptions, enabling search and discovery by description rather than name, and employing clustering to reduce comparison complexity through K-means clustering and cosine correlation coefficients.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If name-based search is used for microservice discovery, then the system is simple to implement, but the search efficiency and accuracy are insufficient
Solution Approach 1:
The patent transforms the search parameter from service name (string matching) to service description (semantic vector matching). By changing the search parameter from exact name matching to semantic similarity based on vector representations generated by LLMs, the system achieves more accurate and efficient service discovery while handling natural language queries.
Solution Approach 2:
The patent introduces vector representations as an intermediary between service descriptions and search queries. LLMs convert both service descriptions and user queries into vector embeddings, which then serve as the basis for similarity comparison. This intermediary enables semantic matching without requiring exact name matches.
2Measurement precision
If exhaustive comparison of service descriptions is performed, then accurate matching is achieved, but computational load increases significantly
Solution Approach 1:
The patent performs preliminary action by pre-computing vector representations for all service descriptions and storing them in the register center. When a discovery request arrives, the system only needs to compare the query vector against pre-computed service vectors, avoiding the need for real-time text processing and reducing computational load during query execution.
Solution Approach 2:
The patent replaces the mechanical text comparison process with vector-based similarity computation. Instead of performing exhaustive string matching or keyword comparison, the system uses vector embedding similarity (e.g., cosine similarity) to rapidly assess semantic matching, significantly reducing computational complexity.
3Measurement precision
If semantic matching is implemented, then service discovery accuracy improves, but the complexity of the matching mechanism increases
Solution Approach 1:
The patent enables self-service by allowing the LLM to automatically generate vector representations from service descriptions without manual intervention. The system autonomously transforms unstructured text into structured vector embeddings, eliminating the need for manual feature extraction or complex matching algorithm design.
Data Source
AI summary
When registering with a microservice system, each service provides a natural-language description of itself. An application programming interface (API) is used to generate a vector representation of the description, referred to as a service vector. A user searches for a service by providing a natural-language description of the service. The API is used to generate a vector representation of the provided description, referred to as a search vector. This vector representation is compared to vector representations stored in the database to identify one or more candidate services. Efficiency of the search is improved by clustering the services. A vector representation for each cluster, referred to as a cluster vector, may be generated. The search vector may be compared to the cluster vectors. Once a closest matching cluster vector is identified, the search vector may be compared to the service vectors for the services in the cluster.


