HomeAI & Machine LearningRAG Access Control: Permission-Filtered Retrieval Simulator

RAG Access Control: Permission-Filtered Retrieval Simulator

Interactive 3D RAG retrieval simulator: chunks from four permission tiers cluster by topic in embedding space, and a query pulls its nearest neighbours through three retrieval strategies — no filter, pre-filter, or post-filter with backfill — so you can watch unauthorized chunks leak into the LLM context, or get safely filtered out.

AI & Machine Learning3DAdvanced60 FPS📱 Mobile-adapted
retrieval-augmented-generation ↗ Open standalone

A retrieval-augmented generation pipeline is only as safe as its access control. This simulator lays out 180 document chunks in a 3D embedding space, grouped into three topics but tagged with four permission tiers — Public, Engineering, Legal and Confidential — so that chunks about the same subject cluster together in space no matter who is allowed to read them. Pick which permission tiers the current user holds, fire a query, and compare three real retrieval strategies used by production vector databases: an insecure "no filter" top-K search that lets unauthorized chunks leak straight into the LLM's context, a metadata pre-filter that restricts the index before ranking, and a post-filter-with-backfill pass that scans deeper into the ranked list to replace blocked hits with the next authorized chunk. Live counters track how many chunks were scanned, how many blocked chunks were skipped, and — the metric that matters — how many unauthorized chunks actually leaked into the delivered result.

⚙ Under the hood

Chunks from four permission tiers cluster by topic in a 3D embedding space; fire a query and compare three real retrieval strategies — no filter, pre-filter, and post-filter with backfill — to see whether unauthorized chunks leak into the LLM's context.

RAGvector searchaccess controlembeddingsLLM securityretrieval

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)