Skip to main content
Glama

WAI Quantum job service

Approximate a matrix's top singular subspace by length-squared sampling

dequant_lowrank
Read-onlyIdempotent

The length-squared low-rank approximation of Frieze, Kannan and Vempala (2004): rows sampled by their squared norms, columns of the sampled rows by theirs, the small matrix decomposed, and the approximate top-k right singular vectors as combinations of the sampled rows. Where the reference is made, the achieved ‖A − A V̂V̂ᵀ‖_F and the found subspace's own are set beside the exact ‖A − A_k‖_F. The answer carries its label: each source theorem's sample count as a formula evaluated at this instance's ‖A‖_F, ‖A‖, σ_k, k, κ, ε, δ and η (exact where the full decomposition was made), its exponents and whether it states its constant, set beside the counts this run used; the error measured against the full decomposition where the matrix is small enough (at most 2^17 entries); and the work counted (entry queries, length-squared samples, random words, the small decomposition's operations). Sealed with the service's key; verify_quantum_result checks the seal and runs it again for the same bits. Seeded: the same request gives the same bits on every host. Refusals: J210, J211.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "matrix": "<matrix>"
    },
    "name": "dequant_lowrank"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoThe singular vectors kept (default the generated rank, else 4).
etaNoThe width of the singular-value threshold's band the label's theorems take (default 0.2).
seedNoThe kernel's seed (default 1): the same seed and request give the same bits on every host.
deltaNoThe failure probability the label's theorems are asked for (default 0.1).
matrixYesThe matrix: {"generate": {"rows", "cols", "rank", "condition", "noise", "seed"}} (a random rank-`rank` matrix, its singular values evenly from 1 down to 1/condition (default 2), plus Gaussian noise whose Frobenius norm is `noise` (default 0.01) of the low-rank part's, from `seed`) or {"entries": [[…], …]} (its rows). At most 2^20 entries.
epsilonNoThe error the label's theorems are asked for (default 0.1).
referenceNoHold the answer to the full decomposition where the matrix is small enough (at most 2^17 entries, a smaller side of at most 256; default true).
cols_sampledNoColumns sampled from the sampled rows (default 160).
rows_sampledNoRows sampled by their squared norms (default 160).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly, idempotent, and closed-world annotations, the description discloses deterministic seeding (same request gives same bits on every host), output labels with theorem sample counts and measured error/work, sealing with the service key, verification by verify_quantum_result, and refusal codes J210/J211. This is unusually rich behavioral context for a read-only computation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the algorithm and computation, but it is a single dense paragraph with many technical clauses and some repetition, making it harder to scan than it could be. The content is substantive, but the structure could be clearer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with an output schema and full input schema coverage, the description covers the computation, output label, reference behavior, seal verification, determinism, and refusals. Minor gaps remain: the meanings of J210/J211 are not explained and there is no explicit usage routing, but the definition is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds theoretical meaning to parameters such as epsilon, delta, and eta as quantities used in the label's theorem formulas, but it does not add much parameter-level detail beyond what the full schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation: length-squared low-rank approximation of a matrix's top singular subspace, naming the Frieze-Kannan-Vempala method and the approximate top-k right singular vectors. It is clear what the tool computes, though it does not explicitly contrast itself with siblings such as dequant_recommend or dequant_regress.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the algorithm and output labeling but gives no explicit guidance on when to choose this tool over alternatives or when not to use it. Usage is only implied by the tool name and the technical description of low-rank approximation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources