RAG Retrieval Validation and Access Control
Last updated 144 days ago · Created Apr 10, 2026
Glossary
Input
Run
Verdict
Outcome
Metrics
Methodology
Test cases come from Meta's CyberSecEval, an independent third-party dataset spanning multiple programming languages. Manicode does not author them.
Each test case runs twice against the same model. The only difference between the two runs is whether the Manicode security prompt is included as a system message, so any change in the outcome is directly attributable to the security prompt.
Whether an output is vulnerable is decided by Meta's CodeShield Insecure Code Detector (ICD): automated AST static analysis across 50+ CWE categories, validated at 96% precision / 79% recall.
Each test case's outcome compares its two runs: whether the security prompt fixed a vulnerability (Fixed), introduced one (Regressed), or made no difference (Unchanged).
Prompt Details
- Lines
- 60
- Characters
- 7,199
- Tokens (est)
- ~1,800
Description
Harden RAG retrieval — database-layer mandatory ACL filters, relevance-score thresholds, diversity and concentration checks, query injection validation, post-rerank re-validation, and consistent filtering across hybrid/multi-index search. Use when implementing RAG retrieval or re-ranking.