Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Embedding Vector Validator

ai.embedding_vector_validate

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You send one embedding vector of 1 to 8,192 finite numbers. We report dimensions, compensated L1 and overflow-resistant L2 norms, min, max, zero count and diagnostics, and we never echo the vector. expectedDimensions, when sent, must match the length. normalization L2_UNIT holds the L2 norm to unitTolerance (default 0.000001). zeroVector REJECT, the default, fails a all-zero vector; ALLOW keeps it. We do not generate embeddings, compare two vectors, or change normalization.

An index that assumed 1,536 dimensions or a unit vector silently stores a zero or a short row and poisons retrieval.

Reliability

Fully deterministic compensated L1 and scaled L2; no clock or network. VECTOR_INVALID — trigger: a component is not a finite number or an enum is unknown; retryable: no; next: send finite numbers and published enums. VECTOR_LIMIT_EXCEEDED — trigger: more than 8,192 components or expectedDimensions above 8,192; retryable: no; next: split or truncate the vector.

Context footprint

Norms, extrema and diagnostics only. The vector is never returned. A successful call costs 1 execution credit.

When to use it

Just after you receive an embedding from a provider and before you write it to an index.

When you need a new embedding, a distance, or a re-normalized copy of the vector.

Scope

Note
Validates one embedding vector for length, finiteness, optional unit-norm and zero-vector policy without echoing it.

Non-goals

  • Does not generate embeddings or call a model
  • Does not compare two vectors or judge semantic quality
  • Does not re-normalize the vector or return a unit copy

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
vectorarrayYesBounded array of 1 through 10001 numbers; runtime accepts at most 8192 finite components and never echoes them.
expectedDimensionsintegerNoOptional required length from 1 through 10001; omit it to accept any legal length.
normalizationstringNoNONE or L2_UNIT. Omit it for NONE, which does not judge unit length.
unitTolerancenumberNoAbsolute L2 distance from 1.0 allowed under L2_UNIT. Omit it for 0.000001.
zeroVectorstringNoALLOW or REJECT. Omit it for REJECT, which fails an all-zero vector.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether every published structural and numerical check passed.
dimensionsintegerYesHow many components were supplied.
l1NormnumberYesCompensated L1 norm of the supplied components.
l2NormnumberYesOverflow-resistant L2 norm of the supplied components.
minnumberYesSmallest finite component.
maxnumberYesLargest finite component.
zeroCountintegerYesHow many components compare equal to zero.
nonFiniteCountintegerYesHow many components were not finite.
normalizationstringYesApplied normalization check, NONE or L2_UNIT.
zeroVectorstringYesApplied zero-vector policy, ALLOW or REJECT.
unitTolerancenumberYesAbsolute L2 tolerance used when judging unit length.
diagnosticsarrayYesBounded array of 0 through 500 closed diagnostics sorted by path, severity and code.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"ai.embedding_vector_validate","input":{"vector":[0.6,0.8],"normalization":"L2_UNIT"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("ai.embedding_vector_validate", {"vector":[0.6,0.8],"normalization":"L2_UNIT"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
VECTOR_INVALID400NoThe request payload failed this skill's input validation.
VECTOR_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not generate embeddings or call a model
  • Does not compare two vectors or judge semantic quality
  • Does not re-normalize the vector or return a unit copy
  • Producing embeddings
  • Nearest-neighbour search

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "ai.embedding_vector_validate",
  "input": {
    "vector": [
      0.6,
      0.8
    ],
    "normalization": "L2_UNIT"
  }
}

Examples

A 3-4-5 unit vector passes L2_UNIT

Inputjson
{
  "vector": [
    0.6,
    0.8
  ],
  "normalization": "L2_UNIT"
}
Expected outputjson
{
  "valid": true,
  "normalization": "L2_UNIT",
  "min": 0.6,
  "nonFiniteCount": 0,
  "max": 0.8,
  "zeroVector": "REJECT",
  "zeroCount": 0,
  "l1Norm": 1.4,
  "l2Norm": 1,
  "diagnostics": [],
  "dimensions": 2,
  "unitTolerance": 0.000001
}
Tip
0.6 and 0.8 have L2 1.0, so valid stays true and the vector is not echoed.

Zero vector and a length mismatch fail the checks

Inputjson
{
  "vector": [
    0,
    0
  ],
  "expectedDimensions": 3
}
Expected outputjson
{
  "valid": false,
  "normalization": "NONE",
  "min": 0,
  "nonFiniteCount": 0,
  "max": 0,
  "zeroVector": "REJECT",
  "zeroCount": 2,
  "l1Norm": 0,
  "l2Norm": 0,
  "diagnostics": [
    {
      "code": "DIMENSION_MISMATCH",
      "severity": "ERROR",
      "message": "The vector length does not match expectedDimensions.",
      "path": "/vector",
      "source": "squillify",
      "details": {}
    },
    {
      "code": "ZERO_VECTOR",
      "severity": "ERROR",
      "message": "A zero vector is rejected under the published zeroVector policy.",
      "path": "/vector",
      "source": "squillify",
      "details": {}
    }
  ],
  "dimensions": 2,
  "unitTolerance": 0.000001
}
Tip
expectedDimensions 3 against two zeros yields DIMENSION_MISMATCH and ZERO_VECTOR.
  • Reject a zero vector before you store it as an embedding
  • Confirm a provider vector has the dimensions your index expects

Avoid for

  • Producing embeddings
  • Nearest-neighbour search

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysisembeddingaivalidation