Data Quality Status = expired, and the AI-ready slice excludes them. In the app this is the Freshness tab of the Data Quality screen; this cookbook runs the same flow headlessly through the SDK.
You are not extracting dates yourself. Ingestion captures
Last Modified from the source system automatically, and classification extracts Document Date (the date a document states about itself) as one of the platform’s standard quality tags. This cookbook reuses those signals; expired files are tagged and excluded, not deleted, so every decision is auditable and reversible.The Flow
Configuration
The cutoff is your use case’s rule. A policy library might expire documents after three years; a contracts workspace might never expire signed agreements.Step 1. Read the Platform’s Date Tags
Document Date is the strongest signal (what the document says about itself); Last Modified from the source system is the fallback. This is the same signal priority the platform’s own latest-version selection uses.
Document Date, run a classification job for it first, as in Prepare an AI-Ready Dataset. Undated files are your curation backlog.
Step 2. Group Versions with Platform Versioning
The platform’s versioning job clusters documents that are versions of the same logical document. It runs as a background job; the result is version groups you can combine with the date signals to find superseded copies.Choosing the canonical copy within each group is what the platform’s duplicate detection does on the Data Quality screen: it recommends the latest version by
Document Date, then source timestamps, then extracted Version, and flags the rest. Review those recommendations in the app’s Uniqueness tab.Step 3. Apply the Cutoff and Write the Signal
Files older than your cutoff getData Quality Status = expired, written through metadata.upsert. This is the same signal-write path the app’s freshness service uses, so the result is indistinguishable from running the flow in the UI.
Step 4. Slice to Current Documents
Freshness is the share of files not taggedexpired. The not_exists condition below excludes every file carrying any Data Quality Status value, whether expired from this rule, redundant from the platform’s duplicate detection, or otherwise flagged. Only unflagged documents make the authoritative set, the same condition the platform’s AI-ready slice creation uses.
How to Use This
- As an agent guardrail. Point agents and RAG pipelines at the authoritative slice so they never answer from expired content.
- Per use case. The cutoff belongs to the use case, not the corpus. The same file can be current for one slice and expired for another.
- On a schedule. Re-run the flow with a Workflow so freshness keeps up as documents change.
Next Steps
Prepare an AI-Ready Dataset
The full readiness flow this rule plugs into.
Scope Chatbot Answers with Metadata
Let users scope questions to current documents.
Workflows
Schedule the freshness re-scan.
Data Slices
The condition syntax behind the authoritative slice.
