Repository navigation
feat(rag): partition-bound retrieval (createPartitionedRAG) - #1829
Merged
Merged
Conversation
Contributor
Lighthouse
Run by |
7 of 11 tasks
EmersonBraun
force-pushed
the
feat/rag-partitioned-retriever
branch
from
October 8, 2026 02:09
fce18fd to
5dfaaac
Compare
Contributor
Lighthouse
Run by |
EmersonBraun
force-pushed
the
feat/rag-partitioned-retriever
branch
from
October 8, 2026 03:22
5dfaaac to
35e974f
Compare
Contributor
Lighthouse
Run by |
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.
What
Adds
createPartitionedRAGto@agentskit/rag: a RAG instance bound to one partition, so that retrieval from a shared vector store never returns chunks that belong to other partitions.Why
Shared vector stores need retrieval isolation, for example one partition per repository or tenant. Today
search()never forwards a filter tostore.search, andRetrieverRequestcarries no filter. This adds isolation without changing the stable Retriever contract in ADR 0004 or the existingcreateRAGbehaviour.How
createRAGwith a partition-boundVectorMemorywrapper._akPartitionmetadata key and an ID namespaced as a JSON tuple. Deletions use the same namespaced IDs, so one partition can never overwrite or delete another's chunks.topK × overfetchFactor(1–16, default 4). A mandatoryonDiagnosticscallback reports any potentially reduced recall.options.filteris currently replaced by the partition filter instead of being combined with it (logical AND).Reuse
This reuses
VectorFilterandVectorSearchOptions.filterfrom@agentskit/coreand composes the existingcreateRAG. No new dependency, no core contract change and no backend change; the maintainers chose not to add a filter toRetrieverRequestin core.Type of change
RFC / ADR reference
docs/architecture/adrs/0043-partition-bound-rag.md(Proposed)Validation
pnpm test): two partitions never leak, tested with realfileVectorMemory(including reopening it) and with synthetic stores that honour and that ignore filters; bounded over-fetch; diagnostics.pnpm lint)public-api-v1.jsonlists the three new exports)pnpm changeset) — minor for@agentskit/rag