feat: add ChromaDB retrieval filtering example#26
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Python ChromaDB retrieval-filtering example using the HR policy lookup domain.
The example demonstrates host-side retrieval filtering where Context Compiler authoritative state determines which documents are eligible before retrieval results are returned.
Why
Retrieval filtering is an important enforcement point because authorization and eligibility decisions should occur before documents are returned to downstream systems.
This example shows how a retrieval layer can use authoritative Context Compiler state to constrain retrieval results rather than relying on prompt instructions or post-generation filtering.
Example metadata
Checklist
Notes
The example demonstrates:
This example intentionally uses the direct ChromaDB Python client rather than a higher-level retrieval framework so the enforcement boundary remains explicit and easy to inspect.
No TypeScript technology-specific retrieval example is included in this PR. The existing generic TypeScript retrieval-filtering example remains the TypeScript baseline. A TypeScript-native retrieval technology can be evaluated independently in a future PR.
Validation