Introduction¶
The DeepSeek Harness (DSH) ecosystem follows the “everything is a plugin” philosophy. In model inference and agent development scenarios, ensuring the reliability of research conclusions is a major challenge. Existing tools usually optimize for “plausible text with links,” which leads to common problems such as citations that do not match the original text, false confirmation, and searching only for supporting evidence.
Kestrel is a deep research engine designed to address these issues. It exists both as a DeepSeek Harness plugin and as a standalone library. By replacing model self-review with mechanical code-level verification, it ensures the authenticity of citations and the independence of sources.
Installation and Activation¶
Install the plugin package using npm:
npm install dsh-deep-research
After installation, run the link command to inject the plugin into DSH’s web or dev configuration:
npm run install:dsh
Core Capabilities¶
Kestrel provides the following core functional modules:
- Mechanical Citation Anchoring: Supports exact matching, normalized matching, and fuzzy matching to prevent the model from fabricating citations.
- Independent Corroboration Scoring: Calculates source independence rather than simply counting sources, and identifies same-origin reprints.
- Fact Checking: Atomically decomposes text and automatically verifies or refutes claims.
- Deep Adversarial Investigation: Simulates prosecutor and defense roles to search for evidence and counter-evidence.
- Source Independence Analysis: Analyzes a set of URLs to determine whether same-origin reprints or circular citations exist.
- Credibility Evaluation: Scores the credibility of a single source.
- Evidence Graph Recall: Retrieves based on an evidence graph to avoid redundant work.
Working Mechanism¶
Mechanical Citation Anchoring¶
Kestrel requires every citation to include an original quote. Before a citation is accepted, code executes a literal substring check (such as String.indexOf). If the quote is shorter than 24 characters, it is rejected directly. In addition, documents are hashed with SHA-256 when fetched. If the source-text hash does not match, all citations based on that document are rejected.
Independent Corroboration Calculation¶
Kestrel does not treat “number of sources” as a proxy for truth, but instead uses “number of independent origins.” Through MinHash, LSH candidate filtering, lineage DAGs, and the Tarjan strongly connected components algorithm, it merges same-origin reports into a single independent witness.
Typical Usage¶
Using It in DSH¶
After installing and linking the plugin, you can invoke it directly in conversations:
- “Deep research: did the EU AI Act’s foundation-model rules change after the 2024 trilogue?”
- “Verify this article before I cite it.”
- “Are these six URLs actually independent sources?”
Using It as a Library¶
You can call the underlying mechanisms through the dsh-deep-research package:
import { anchorQuote, analyzeLineage } from 'dsh-deep-research'
// Mechanical citation verification
const anchor = anchorQuote('revenue reached 42 million dollars', sourceText)
if (!anchor.ok) throw new Error(anchor.reason)
console.log(anchor.charStart, anchor.charEnd) // Output exact position
// Independence analysis
const { ics, total, roots } = analyzeLineage(documents)
console.log(`${total} sources -> ${ics} independent origins`)
Notes¶
- Environment Requirement: Node.js version must be 20 or higher.
- Dependencies: The plugin has zero runtime dependencies.
- Quote Limit: Quotes shorter than 24 characters cannot pass verification.
- Permissions and Security: The plugin runs with the permissions of the current DSH process. It is recommended to inspect the source code and license (MIT) before installation.
Summary¶
Kestrel addresses the shortcomings of traditional research tools in citation accuracy and source independence through mechanical verification and independent-source calculation. It can demonstrate core workflows without requiring an API key or network configuration, making it suitable for developers who need to build high-confidence research agents in the DSH environment.