Embedding Vector Validator
ai.embedding_vector_validate
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
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
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| vector | array | Yes | Bounded array of 1 through 10001 numbers; runtime accepts at most 8192 finite components and never echoes them. |
| expectedDimensions | integer | No | Optional required length from 1 through 10001; omit it to accept any legal length. |
| normalization | string | No | NONE or L2_UNIT. Omit it for NONE, which does not judge unit length. |
| unitTolerance | number | No | Absolute L2 distance from 1.0 allowed under L2_UNIT. Omit it for 0.000001. |
| zeroVector | string | No | ALLOW or REJECT. Omit it for REJECT, which fails an all-zero vector. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | Whether every published structural and numerical check passed. |
| dimensions | integer | Yes | How many components were supplied. |
| l1Norm | number | Yes | Compensated L1 norm of the supplied components. |
| l2Norm | number | Yes | Overflow-resistant L2 norm of the supplied components. |
| min | number | Yes | Smallest finite component. |
| max | number | Yes | Largest finite component. |
| zeroCount | integer | Yes | How many components compare equal to zero. |
| nonFiniteCount | integer | Yes | How many components were not finite. |
| normalization | string | Yes | Applied normalization check, NONE or L2_UNIT. |
| zeroVector | string | Yes | Applied zero-vector policy, ALLOW or REJECT. |
| unitTolerance | number | Yes | Absolute L2 tolerance used when judging unit length. |
| diagnostics | array | Yes | Bounded array of 0 through 500 closed diagnostics sorted by path, severity and code. |
API contract
POST /v1/executecurl -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"}}'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
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| VECTOR_INVALID | 400 | No | The request payload failed this skill's input validation. |
| VECTOR_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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)
{
"skillKey": "ai.embedding_vector_validate",
"input": {
"vector": [
0.6,
0.8
],
"normalization": "L2_UNIT"
}
}Examples
A 3-4-5 unit vector passes L2_UNIT
{
"vector": [
0.6,
0.8
],
"normalization": "L2_UNIT"
}{
"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
}Zero vector and a length mismatch fail the checks
{
"vector": [
0,
0
],
"expectedDimensions": 3
}{
"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
}Recommended use cases
- 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
Related skills
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.