Semantic similarity alone can't tell a current policy from a superseded one or an Australian rule from a US one. Metadata can.
Useful Metadata
- Source and document title.
- Dates: created, updated, effective, expiry.
- Version and status (draft, current, archived).
- Product, region, department, audience.
- Access permissions.
- Language.
How to Use It
- Hard filters: only search documents the user may see, in their region, that are current.
- Soft boosts: prefer newer documents or official sources without excluding others.
- Filters from the query: extract "in 2025" or "for enterprise customers" from the question into filters.
Permissions Are Not Optional
In enterprise RAG, filtering by the user's permissions is a security requirement. Apply it at retrieval time, so restricted content never reaches the prompt — not afterwards.
Keep Metadata Accurate
Metadata is only useful if it's correct and complete. Populate it during ingestion from source systems, validate it, and update it when documents change.
Pre- Versus Post-Filtering
Filtering before or during vector search is more efficient and reliable than retrieving broadly and discarding results afterwards, which can leave too few relevant results.
Show It to Users
Display source, date and version alongside answers so users can judge relevance and freshness themselves.