Retrieval Integrity Assessment logo

Retrieval Integrity Assessment

Organization
zero-lab-ai
retrieval-integrity-assessment

Assesses whether an authorized retrieval-augmented AI system preserves source, index, retrieval, context, and output integrity. Use when testing RAG poisoning, retrieval hijacking, context saturation, semantic substitution, or citation controls with benign canaries.

Overview

Publisherzero-lab-ai
Repositoryskills
Skill nameretrieval-integrity-assessment
Stars
232
Forks
14
Bundled files
2
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zero-lab-ai on GitHub. Read the source before you install it.

Installation

Install the Retrieval Integrity Assessment AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zero-lab-ai/skills/tree/main/plugins/rag-security/skills/retrieval-integrity-assessment
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zero-lab-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/rag-security/skills/retrieval-integrity-assessment .claude/skills/retrieval-integrity-assessment
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Retrieval Integrity Assessment in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Retrieval Integrity Assessment on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Retrieval Integrity Assessment is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Retrieval integrity assessment

Measure how content moves from an approved source through ingestion, indexing, retrieval, context assembly, and model output. Use benign canaries to distinguish acceptance from retrieval and retrieval from influence.

When to Use

  • Assessing an authorized RAG or enterprise-search deployment.
  • Validating content provenance, tenant isolation, ranking controls, citation fidelity, or retrieval monitoring.
  • Reproducing a suspected poisoning or retrieval-hijacking condition with controlled documents and reversible state.

When NOT to Use

  • Do not upload content, modify a corpus, or query a target without explicit authorization for that action and environment.
  • Do not use real secrets, impersonated safety guidance, executable content, or uncontrolled public documents as test fixtures.
  • Do not infer retrieval from an upload receipt or influence from a citation.

State model

Keep these states separate:

  1. submitted — the test document was offered to the ingestion boundary.
  2. accepted — the service acknowledged the document.
  3. indexed — index-origin evidence identifies the expected test artifact.
  4. retrieved — a retrieval receipt ties the artifact to a specific query run.
  5. context-used — the assembled model context contains the attributed content.
  6. output-influenced — the response changed in the predicted bounded way.
  7. downstream-acted — a separate consumer acted on that output.

Workflow

  1. Bind the test to the exact corpus, tenant, connector, index, model route, identity, time window, action authority, cleanup plan, and run identifier.
  2. Preserve a clean baseline: source set, query set, retrieval results, ranking, context where observable, response, citations, and telemetry.
  3. Create a unique inert canary document. Record its content digest, source, owner, labels, access policy, expected audience, and expiry.
  4. Introduce the canary only through the approved ingestion path. Capture separate source, acceptance, indexing, and access-control receipts.
  5. Run the same bounded query set. Record top results, scores where available, filters, chunk identifiers, context position, citation mapping, response, cache state, and target-origin timestamps.
  6. Test integrity questions independently:
    • source and tenant boundary enforcement;
    • stale, revoked, or deleted content handling;
    • ranking displacement and context saturation;
    • semantic substitution or misleading near-duplicate content;
    • instruction-like content crossing into control behavior;
    • citation-to-source fidelity;
    • embedding, chunking, metadata, and filter manipulation;
    • monitoring and rollback visibility.
  7. Compare baseline and canary runs. Do not attribute a response difference to retrieval when model, route, temperature, cache, corpus, or query also changed.
  8. Grade each state in the ladder with its own receipt. Record alternative explanations and the evidence needed for the next state.
  9. Remove the canary through the approved path, confirm source and index removal, expire caches where authorized, and record residual retrieval.

Deliverable

Return the bound system context, baseline, canary manifest, query matrix, state-ladder results, provenance and citation observations, tenant and policy findings, alternative explanations, telemetry gaps, and cleanup receipt.

Rationalizations to reject

  • “The upload succeeded, so poisoning is proven.” Acceptance does not prove indexing, retrieval, influence, or impact.
  • “The answer used the phrase, so the document was retrieved.” The model may already know it or another source may contain it.
  • “A citation proves source fidelity.” Verify that the cited chunk supports the claim and belongs to the expected source and tenant.
  • “Higher ranking means successful exploitation.” Ranking movement is an integrity observation, not automatically a security impact.
  • “Deletion from the source completes cleanup.” Indexes, caches, and derived stores can retain content.
  • “One strange answer proves a deterministic weakness.” Preserve model and retrieval variability and repeat only within the approved budget.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Retrieval Integrity Assessment AI skill do?

Assesses whether an authorized retrieval-augmented AI system preserves source, index, retrieval, context, and output integrity. Use when testing RAG poisoning, retrieval hijacking, context saturation, semantic substitution, or citation controls with benign canaries.

Why use Retrieval Integrity Assessment on TypingMind?

Because you install it once and use it with any model. Retrieval Integrity Assessment is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Retrieval Integrity Assessment in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zero-lab-ai/skills/tree/main/plugins/rag-security/skills/retrieval-integrity-assessment. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Retrieval Integrity Assessment?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Retrieval Integrity Assessment?

As many as you like. As long as a model supports skills, you can use Retrieval Integrity Assessment with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Retrieval Integrity Assessment AI skill free?

Yes. It is published on GitHub by zero-lab-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇