-
Exchange: Exchange Contributor
-
Exchange: Exchange Administrator
-
Exchange: Exchange Creator
Configuring Semantic Services
Semantic services compare incoming requests to defined prompt topics to route traffic to the best-matching model path or block requests that match denylist topics. Model Proxy supports Basic Scale semantic services for simple routing and Advanced Scale semantic services for complex routing backed by an external vector database. Configure a semantic service before creating a model proxy that uses semantic routing.
Model Proxy supports two types of semantic services:
-
For complex semantic routing. Advanced scale semantic services use a vector database to store and compare prompt topic utterances. Advanced scale semantic services support unlimited prompt topics and 2000 utterances per prompt topic.
-
For simple semantic routing and blocking. Basic scale semantic services support up to 6 prompt topics and 10 utterances per prompt topic.
Before You Begin
Before getting started, make sure you have:
-
An Anypoint Platform account.
-
One of these permissions:
For more information, see Enhanced Experience Permissions.
Configure an Advanced Scale Semantic Service
-
In the navigation pane, select Model Proxies > Semantic Services.
-
Click Add Semantic Service > Semantic Routing Service.
-
Select Advanced Scale.
Advanced scale supports large utterance sets per topic and requires a dedicated external vector database connection.
-
Configure the embedding connection parameters:
-
Environment: The environment to use for the semantic service.
-
Embedding service provider: The provider of the embedding model. Select from these options:
-
OpenAI
-
Hugging Face
-
Azure OpenAI.
-
-
Service label: Label to identify the new service. Shown as the label in the Semantic Services catalog.
-
URL: The URL of the embedding service.
-
Model: The embedding model to use.
-
Auth key: The API authentication key for the embedding service.
-
-
Configure the vector connection parameters:
-
Environment: The environment to use for the vector database.
-
Vector Database provider: The provider of the vector database. Select from these options:
-
Qdrant
-
Pinecone
-
Azure AI Search
-
-
Host: The host URL of your vector database.
-
API Key: The API authentication key for the vector database.
-
Collection: The collection name in your vector database.
-
-
Define prompt topics:
Supports up to 2000 utterances per topic.
-
Click Create Prompt Topic.
-
Define a Prompt topic name.
-
Define prompt utterances or click Upload utterances to upload a plain text file containing your prompt utterances.
-
Create as many prompt topics as necessary. You can also create new prompt topics later by editing the semantic service.
To deny users from asking about certain subjects, create prompt topics for the subjects and apply them as deny list topics when configuring your Model Proxy.
-
-
Click Save & Download Script.
-
Open the downloaded
.shscript file in your database to populate it with your scaled vectors.
Configure a Basic Scale Semantic Service
-
In the navigation pane, click the Model Proxies dropdown arrow.
-
Select Semantic Services.
-
Click Add Semantic Service > Semantic Routing Service.
-
Select Basic Scale.
Basic scale supports up to six topics and 10 utterances per topic. Managed via internal Model Proxy configuration.
-
Configure the embedding connection parameters:
-
Environment: The environment to use for the semantic service.
-
Embedding service provider: The provider of the embedding model: OpenAI, Hugging Face, or Azure OpenAI.
-
Service label: Label to identify the new service. Shown as the label in the Semantic Services catalog.
-
URL: The URL of the embedding service.
-
Model: The embedding model to use.
-
Auth key: The API authentication key for the embedding service.
-
-
Click Save.
Edit a Semantic Service
To edit a semantic service:
-
From Semantic Service Setup, click the three-dots menu (
) of the semantic service you want to edit. -
Make the necessary edits.
-
Click either Save or Save & Download Script depending on your sematic service.
If creating new prompt topics for an advanced scale semantic service, you must download and run the vector script in your database again.



