AI Agent Hub
Back to plugins
🤖

dsh-linalg

Model Inference Updated 2026.09.11

Run the following command in DeepSeek Harness:

dsh plugin install TYEclipse/dsh-linalg

Paste the following prompt into your AI chat to install this plugin:

This plugin (source at https://github.com/TYEclipse/dsh-linalg) can be installed into DeepSeek Harness by running dsh plugin install TYEclipse/dsh-linalg in your terminal; once installed, its linear-algebra tools are available directly in dsh sessions.

About this plugin

Large language models famously stumble on matrix multiplication, determinants, inverses, and linear systems. A flipped sign in one elimination step, a conflated row swap, or a singular matrix forced into a bogus inverse—these arithmetic slips show up in virtually every math-heavy prompt. dsh-linalg sidesteps the problem by handing the computation to deterministic local code: Gaussian elimination with partial pivoting, results correct to ten decimal places, with zero network calls, zero subprocesses, zero evals, and zero runtime dependencies.

Four tools cover the essentials. matrix_multiply performs dimension-checked A·B. matrix_compute handles one operation per call—transpose, determinant, inverse, trace, or RREF. solve_linear cracks Ax = b and classifies the answer as unique, infinite (reported with particular solution, nullspace basis, and free-variable count), or no solution. vector_ops takes care of dot product, 3-D cross product, norm, projection, and angle in degrees. Matrices are plain JSON arrays of arrays, capped at 20×20 by default, configurable on demand.

The numerics are deliberate. Values below 5e-12 snap to exact zero so negative zero never leaks out. Pivot tolerance sits at 1e-12, so numerically singular matrices are reported as singular instead of producing garbage, and singular-inverse or inconsistent-system requests both fail cleanly with a clear message. Whether you are verifying homework, double-checking an engineering matrix, or simply need a linear-algebra backstop that always returns the right number, dsh-linalg is the lightest option—install once, compute forever, with no service to spin up and no dependency tree to untangle.

Use Cases

  • Verifying matrix multiplication, determinant, or inverse results from LLMs
  • Solving linear systems with unique, infinite, or no solutions
  • Computing dot product, cross product, norm, projection, and angle

Best For

  • Engineers and students who need an exact linear-algebra backstop
  • Prompt developers who want to eliminate LLM arithmetic errors
  • Minimalists who prefer zero-dependency, purely local tools