Intent Embeddings
Generate specific embeddings with phospho
This model is in preview. Contact us for production or latency sensitive specs.
You can generate embeddings for text using the intent-embed
model. Intent Embed is a mdoel that generates embeddings for text, specifically to represent the user intent. Potential use cases include:
- User Intent classification
- Intent similarity
- Out of topic exclusion
- Intent clustering and analytics
- And more
Read the technical paper here: Phospho Intent Embeddings.
Requirements
Create an account on phospho.ai and get your API key. You need to have setup a billing method. You can add a it in the Settings of your dashboard here.
Usage
Using the OpenAI client
The phospho embedding endpoint is OpenAI compatible. You can use the OpenAI client to send requests to the phospho API.
For now, the input must be a single string. Passing more than one string will result in an error.
Using the API directly
To send a request, add:
text
: The text to embed, usually a user query or message.model
: must be set tointent-embed
.
Optionally, to link this embedding to one of your projects, you can specify the following optional parameters:
project_id
: The project id you want to link this embedding to.
You will get a response with the embeddings for the input text. The embeddings are a list of floats.
These embeddings can stored in vector databases like Pinecone, Milvus, Chroma, Qdrand, etc. for similarity search, clustering, and other analytics.
Pricing
The pricing is based on the number of tokens in the input text.
Note: You need to have a billing method setup to use the model. Acces your billing portal to add one.
Model name | Price per 1M input tokens |
---|---|
intent-embed | $0.94 |
You are billed in $1 increment.
Contact us for high volume pricing.
Was this page helpful?