RAG Engineer
A RAG Engineer designs and builds Retrieval-Augmented Generation pipelines that ground large language model outputs in authoritati…
Skill Guide
The implementation of security policies directly within the retrieval pipeline of a RAG or search system, using metadata attributes and document-level access control lists (ACLs) to filter, gate, or rank results before they are presented to the user or LLM.
Scenario
You are building a SaaS search feature for a multi-tenant application. Each tenant's documents must be completely isolated from others. Users should only see documents belonging to their own company (tenant).
Scenario
A knowledge base for a corporation contains documents tagged with 'department' (HR, Engineering, Finance) and 'access_level' (public, internal, confidential). An employee in the 'Engineering' department with 'internal' access should see public and internal engineering docs, but not HR confidential docs.
Scenario
Design a RAG system for a legal firm where the answer to a query must only be synthesized from documents the querying lawyer is explicitly authorized to view, and every retrieval step must be logged for audit trails.
These are the primary data stores for implementing retrieval. Their native support for metadata filtering, pre-filtering, and hybrid search (keyword + vector) is foundational for building secure retrieval layers. Choose based on needed filter complexity, scalability, and operational model.
Used to authenticate users and provide the foundational claims (user ID, roles, groups, tenant) that are translated into retrieval-layer filters. The retrieval system must integrate with these services to obtain and validate user context.
These frameworks provide abstractions to insert custom filtering logic into the retrieval pipeline (e.g., LlamaIndex's `MetadataReplacementPostProcessor`). They simplify integrating IAM context with retrieval queries, but require careful configuration to avoid security bypasses.
Answer Strategy
Use a structured system design approach: 1. Data Model (ACLs in metadata), 2. Auth Integration (how to get user roles), 3. Query Pipeline (where filtering happens), 4. Fallbacks (what if filter is empty). Sample: 'I would store documents with metadata fields for department and a numeric sensitivity level. Upon user query, the service would fetch the user's department and clearance level from the IAM system. The retrieval query to the vector database would include a pre-filter requiring the document's department match the user's and its sensitivity level be <= the user's clearance. This is applied before the similarity search, ensuring unauthorized docs never enter the context window. For edge cases like cross-department projects, I would implement tag-based ACLs as an override.'
Answer Strategy
Tests negotiation skills and understanding of non-functional requirements. The core competency is balancing security/compliance with performance. Sample: 'I would acknowledge the latency concern and present data on the current performance. However, I would explain that metadata filtering is a security-critical control, not just a feature. Removing it would violate our compliance policies for data isolation. Instead, I would propose optimizing the filter chain-for example, by indexing the most restrictive metadata fields first, or using a faster, albeit less precise, pre-filter before a more expensive vector search. We can also explore caching user permission sets. I'd request a joint session with security/compliance to align on acceptable trade-offs.'
1 career found
Try a different search term.