Skip to main content

Embeddings

Create an embedding based on text input.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputThe column of text to create the embeddings for.string—Yes
outputThe output column the embeddings will be saved as.string, nullnullNo
Options
taskThe task type for the embedding model. Only applicable for the Jina provider. Selects the appropriate task-specific adapter.string, null; one of:
  • retrieval.query
  • retrieval.passage
  • text-matching
  • classification
  • separation
nullNo
Formatting
output_typeOutput the embeddings as a numpy array or a python list Default - python list.string; one of:
  • numpy array
  • python list
"python list"No
precisionThe precision of the embeddings. Default is float32. This should be used with output_type numpy array.string; one of:
  • float16
  • float32
"float32"No
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No
Execution
batch_sizeThe number of rows to submit per individual request.integer100No
threadsThe number of requests to submit in parallel. Each request contains the number of rows set as batch_size.integer10No
Errors
retriesThe number of times to retry if the request fails. This will apply exponential backoff to help with rate limiting.integer0No
Details
api_keyThe API key.string—Yes
modelThe specific model to use to generate the embeddings.string"text-embedding-3-small"No
urlThe endpoint to send embedding requests to. Defaults to the standard endpoint for the resolved provider. Setting a Jina URL without an explicit provider will automatically use Jina's request/response format.string"https://api.openai.com/v1/embeddings"No
providerControls the request/response format for the embedding API. When omitted, inferred from url (jina.ai → jina, otherwise openai). Setting provider also sets the default url for that provider, so you only need one of provider or url for standard endpoints. Use both together only when pointing to a custom endpoint that uses a non-default provider's API format (e.g. a Jina-compatible proxy).string, null; one of:
  • openai
  • jina
nullNo

Examples​

wrangles:
- create.embeddings:
input: my_column
api_key: ${my_key}
output: embeddings
my_column
angle grinder
jig saw
embeddings
[0.010793785, -0.010007165, 0.0028609, -0.0139...]
[-0.008975127, 0.009314879, -0.024150735, -0.0...]
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID14
Catalog keycreate.embeddings
Recipe keycreate.embeddings
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.embeddings
Legacy UUIDe3518afd-a819-40ec-8b49-eb25690220c1

Sources