Originally posted on , a platform for building and operating the embedding pipelines that keep the vector representation of your operational data in sync as it changes. You register data sources, embedding model(s), vector stores (destination), and OmniVec does the rest: initial backfill, change tracking, model invocation to generate, and writing them back to your vector store. We are shipping this with support for (destination). You deploy OmniVec in your own Azure subscription, and use the web UI, CLI, or the REST API to manage it.
Most AI applications end up building the same plumbing to keep that vector representation in sync: a change-capture process on the source, a consumer pool that generates embeddings, retry and backfill logic, dead-letter handling, and the operational work to keep it all running. OmniVec collapses that stack into four configurable components: a source, a model, a destination, and a pipeline that wires the first three together.
Deep Dive
Deploying OmniVec into your Azure subscription provisions multiple Azure resources, including an that stores the service images AKS pulls from, and more. You control the choices that affect cost and capacity, such as the embedding model (hosted Azure OpenAI or a self-hosted GPU model), the AKS node size and count, and whether to provision a GPU pool, etc.
Key concepts
or a self-hosted GPU model.
Metadata store: An Azure Cosmos DB account that the deployment provisions for you. It holds pipeline definitions, job state, progress metrics, etc.
OmniVec in action
Let's put OmniVec to work end to end. In this walkthrough, you will:
- deploy it into your subscription
- point it at an Azure Cosmos DB container
- wire up a pipeline to automatically generate vector embeddings
- then run vector search over this data
We use Azure Cosmos DB as both the source and the destination here as an example, but this applies to any supported combination of sources, models, and destinations.
Prerequisites
Before you start, make sure you have:
- An Azure subscription with permissions to create resource groups, an AKS cluster, an ACR, and an Azure Cosmos DB account.
- An embedding model. This walkthrough uses an and note the endpoint, model name, and API key. You'll configure them in OmniVec later.
- CLI tools:
to setup Azure Cosmos DB (but you can also do it directly via the Azure portal).
- OmniVec CLI from the before continuing.
Sign in to the Azure CLI and select the subscription that holds the account:
CODEaz login
az account set --subscription "$SUBSCRIPTION_ID"
Your signed-in user needs permission to create a database and container on the account. The built-in
Cosmos DB Operatorrole (or any role grantingMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/*and.../containers/*write actions) is sufficient. AccountContributororOwneralso works.
Set the names you'll use throughout the rest of the walkthrough:
CODEexport RG=<your-resource-group>
export COSMOS_ACCOUNT=<your-cosmos-account>
export COSMOS_DB=omnivec-demodb
export COSMOS_CONTAINER=demo-container
Create the database:
CODEaz cosmosdb sql database create \
--account-name $COSMOS_ACCOUNT \
--resource-group $RG \
--name $COSMOS_DB
Create the container with a vector embedding policy and a DiskANN vector index on
/embedding. The1536dimension matchestext-embedding-3-small; change it if you registered a different model:
CODEaz cosmosdb sql container create \
--account-name $COSMOS_ACCOUNT \
--resource-group $RG \
--database-name $COSMOS_DB \
--name $COSMOS_CONTAINER \
--partition-key-path /id \
--vector-embeddings '{"vectorEmbeddings":[{"path":"/embedding","dataType":"float32","dimensions":1536,"distanceFunction":"cosine"}]}' \
--idx '{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"},{"path":"/embedding/*"}],"vectorIndexes":[{"path":"/embedding","type":"diskANN"}]}'
Now seed it with sample data. The seed script uses
DefaultAzureCredential, so first grant your signed-in user theCosmos DB Built-in Data Contributorrole on the Azure Cosmos DB account:
CODEexport USER_PRINCIPAL_ID=$(az ad signed-in-user show --query id -o tsv)
az cosmosdb sql role assignment create \
--account-name "$COSMOS_ACCOUNT" \
--resource-group "$RG" \
--role-definition-id "00000000-0000-0000-0000-000000000002" \
--principal-id "$USER_PRINCIPAL_ID" \
--scope "/"
Then install the sample app's dependencies and run the seed script (it reads
COSMOS_ACCOUNT,COSMOS_DB, andCOSMOS_CONTAINERfrom the environment):
CODEcd sample-app
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python insert_sample_data.py
You should now have 100 product documents in the container, each with name and description fields.
Grant OmniVec access to Azure Cosmos DB
OmniVec pods authenticate to Azure Cosmos DB using a managed identity, not a connection string. Before you create a source or destination, grant that identity two roles on the Azure Cosmos DB account:
Data plane (Cosmos DB Built-in Data Contributor): read source documents and write embeddings.
Control plane (Cosmos DB Account Reader Role): read the account-level metadata and vector policies that the change-feed processor inspects at startup. Skipping it causes pipeline failures with areadMetadataerror.
First, find the principal ID of the OmniVec workload identity. It lives in the OmniVec deployment's resource group (not the Azure Cosmos DB account's
$RG). That resource group has several managed identities, so filter by the client ID thatazdexported rather than picking the first one:
CODEexport OMNIVEC_RG=$(azd env get-value AZURE_RESOURCE_GROUP)
export OMNIVEC_PRINCIPAL_ID=$(az identity list -g "$OMNIVEC_RG" \
--query "[?clientId=='$(azd env get-value AZURE_IDENTITY_CLIENT_ID)'].principalId" -o tsv)
Grant the data-plane role:
CODEaz cosmosdb sql role assignment create \
--account-name "$COSMOS_ACCOUNT" \
--resource-group "$RG" \
--role-definition-id "00000000-0000-0000-0000-000000000002" \
--principal-id "$OMNIVEC_PRINCIPAL_ID" \
--scope "/"
Grant the control-plane role:
CODEaz role assignment create \
--assignee "$OMNIVEC_PRINCIPAL_ID" \
--role "Cosmos DB Account Reader Role" \
--scope "$(az cosmosdb show -n "$COSMOS_ACCOUNT" -g "$RG" --query id -o tsv)"
Wait 1–2 minutes for the assignments to propagate before moving on.
Wire up the pipeline
With Azure Cosmos DB ready and OmniVec authorized, the rest of the setup is three OmniVec resources: a source, a destination, and a pipeline that binds them to the model you registered earlier.
Register the Azure Cosmos DB container as a source. OmniVec will watch its change feed:
CODEomnivec source create --name demo-cosmosdb-source \
--type cosmosdb \
--config "{\"endpoint\":\"https://$COSMOS_ACCOUNT.documents.azure.com:443/\",\"database\":\"$COSMOS_DB\",\"container\":\"$COSMOS_CONTAINER\",\"auth_type\":\"managed-identity\"}"
Register the same Azure Cosmos DB container as a destination. OmniVec will write embeddings back into it:
CODEomnivec destination create --name demo-cosmosdb-destination \
--type cosmosdb-vector \
--config "{\"endpoint\":\"https://$COSMOS_ACCOUNT.documents.azure.com:443/\",\"database\":\"$COSMOS_DB\",\"container\":\"$COSMOS_CONTAINER\",\"auth_type\":\"managed-identity\"}"
The pipeline needs three IDs: source, destination, and model. Grab the source and destination IDs from
omnivec source listandomnivec destination list(they look likesrc-…anddst-…). For the model, the registered name (demo-foundry-oai-model) isn't the ID; the internalmdl-ext-*ID is what the pipeline expects:
CODEexport SOURCE_ID=<src-id-from-source-list>
export DESTINATION_ID=<dst-id-from-destination-list>
export MODEL_ID=$(omnivec model test demo-foundry-oai-model | sed 's/^OK: Model test returned: //' | jq -r '.id')
Create the pipeline.
--content-fieldstells OmniVec which fields on each source document to embed (concatenated),--embedding-fieldis where the resulting vector lands on the destination document, and--vector-index-pathis the path the destination container's vector index looks at (it should match the path you set in theaz cosmosdb sql container createstep):
CODEomnivec pipeline create --name demo-cosmosdb-pipeline \
--source $SOURCE_ID --destination $DESTINATION_ID --model $MODEL_ID \
--content-fields name,description --embedding-field embedding \
--vector-index-path /embedding --processing-mode inline
You should see something like:
CODEOK: Pipeline created: pip-94348d5e (status: paused)
New pipelines start paused. Grab the pipeline ID from the output (or from
omnivec pipeline list) and resume it:
CODEexport PIPELINE_ID=<pip-id-from-create-output>
omnivec pipeline resume $PIPELINE_ID
Check the pipeline's progress:
CODEomnivec pipeline show $PIPELINE_ID
Once the workers have processed the seed data, you'll see output similar to the following (truncated for brevity):
CODEPipeline
ID: pip-94348d5e
Name: demo-cosmosdb-pipeline
Status: active
...
Stats
Documents Embedded: 100
Source Docs: 100
Completion: 100.0%
Failed: 0
Pending: 0
...
Completion: 100.0% means every seed document now has an embedding written back to its embedding field. From this point on, any insert or update to the source container flows through the change feed and gets re-embedded automatically.
Run vector search
The embeddings are in place, so you can run vector search against the destination. Use the OmniVec CLI's search command with a natural-language query:
CODEomnivec search "warm waterproof hiking pants" --index $DESTINATION_ID --top-k 3
Try another query to confirm it generalizes beyond the obvious matches:
CODEomnivec search "lightweight running shoes" --index $DESTINATION_ID --top-k 3
The web UI ships with a vector search playground that calls the same API.
. It is a public preview, so expect changes as it matures. Clone it, deploy it into your own subscription, and try it on one of your own datasets. Bug reports, feedback, and requests are all welcome through GitHub issues. And if you build something interesting on top of it, we'd love to hear about that too!
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
SOCIAL SHARE CARD GENERATOR