# RAG Test Harness Figures
Retrieval Trust Topology
RAG security depends on the full path from query and corpus boundaries through ranking, prompt assembly, model behavior, and output.
Graph showing a user query, retriever, tenant-filtered corpus, ranking, prompt assembly, model, optional tool, output, and provenance.
RAG Failure-Mode Coverage
A useful harness separates prompt injection, corpus poisoning, cross-tenant retrieval, provenance loss, and unsafe action propagation.
Matrix showing RAG failure modes across ingest, retrieval, prompt assembly, generation, action, and retest stages.
Indirect prompt injection
Hostile instructions enter through retrieved content.
Corpus poisoning
Malicious or misleading content affects retrieval and generation.
Cross-tenant retrieval
Content crosses an intended tenant or access boundary.
Provenance loss
The system cannot preserve or communicate source origin and trust.
Unsafe action propagation
Retrieved content influences a tool or consequential action.
Indirect prompt injection
Hostile instructions enter through retrieved content.
- Ingest
- Covered
- Retrieve
- Covered
- Assemble
- Covered
- Generate
- Covered
- Act
- Partial
- Retest
- Covered
Corpus poisoning
Malicious or misleading content affects retrieval and generation.
- Ingest
- Covered
- Retrieve
- Covered
- Assemble
- Partial
- Generate
- Covered
- Act
- Partial
- Retest
- Covered
Cross-tenant retrieval
Content crosses an intended tenant or access boundary.
- Ingest
- Partial
- Retrieve
- Covered
- Assemble
- Covered
- Generate
- Covered
- Act
- Partial
- Retest
- Planned
Provenance loss
The system cannot preserve or communicate source origin and trust.
- Ingest
- Covered
- Retrieve
- Covered
- Assemble
- Covered
- Generate
- Partial
- Act
- Unknown
- Retest
- Covered
Unsafe action propagation
Retrieved content influences a tool or consequential action.
- Ingest
- Not applicable
- Retrieve
- Partial
- Assemble
- Covered
- Generate
- Covered
- Act
- Covered
- Retest
- Partial
Coverage states
RAG Retest and Evidence Flow
A retrieval failure is closed only after corpus, ranking, policy, or action controls are changed and replayed.
RAG remediation lifecycle from failure reproduction through corpus or policy change, replay, evidence review, and closure or residual state.
- 1Reproduce the failureCapture query, retrieved content, ranking, prompt assembly, model output, and action state.
- 2Identify the control boundaryDetermine whether the failure arises in ingest, retrieval, isolation, provenance, prompt assembly, or action policy.
- 3Change the controlUpdate corpus, ranking, metadata, tenant policy, prompt policy, or tool policy.
- 4Replay the scenarioUse the original and adversarial variants under the changed system.
- 5Review the evidenceConfirm the intended boundary and inspect alternative failure paths.
- Closed
- Residual
- Failed
- Inconclusive