OpenParable
Skip to content
← Back to skills

Weight Perturbation

Testing & Quality
weight-perturbation

Weight Perturbation is an Agent Skill for testing & quality published in the yogsoth-ai/de-anthropocentric-research-engine repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

SOP: Perturb weights to test gap-ranking stability, output a stability verdict

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/yogsoth-ai/de-anthropocentric-research-engine/blob/HEAD/skills/weight-perturbation/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/weight-perturbation, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Weight Perturbation

Perturb weights to test gap-ranking stability, output a stability verdict.

HARD-GATE

Pipeline

  1. Precheck: Verify the weight vector is normalized; verify the scoring matrix dimensions match the weight vector length
  2. Baseline ranking computation: Weight-sum the scoring matrix with the baseline weights to obtain the baseline ranking
  3. Perturbation scenario generation: Apply +20% and -20% perturbations to each dimension separately (re-normalizing afterward), generating 2×n perturbation scenarios
  4. Re-compute rankings: Compute a new ranking for each perturbation scenario
  5. Compare change magnitude: Count the number of gaps whose ranking changed in each scenario; compute Kendall τ correlation against the baseline ranking
  6. Stability verdict: stable (all scenarios τ ≥ 0.8) / sensitive (any scenario 0.5 ≤ τ < 0.8) / unstable (any scenario τ < 0.5)
  7. Output: Return a PerturbationReport object

Output Format

{
  "baseline_ranking": ["gap_003", "gap_001", "gap_002"],
  "perturbation_scenarios": [
    {
      "scenario_id": "importance_+20%",
      "perturbed_weights": { "importance": 0.48, "feasibility": 0.18, "novelty": 0.17, "impact": 0.17 },
      "ranking": ["gap_003", "gap_001", "gap_002"],
      "kendall_tau": 1.0,
      "rank_changes": 0
    }
  ],
  "min_kendall_tau": 0.87,
  "stability_verdict": "stable",
  "sensitive_dimensions": [],
  "summary": "Stability summary (2-3 sentences)"
}