Skip to content

feat(retrieval): apply include and exclude document IDs before tool results - #405

Merged
EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/retrieval-document-scope
Sep 11, 2026
Merged

feat(retrieval): apply include and exclude document IDs before tool results#405
EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/retrieval-document-scope

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Pass request-level include/exclude document IDs into Explore tools, classic retrieval, citations, and related media.
  • Filter at the database/tool boundary before results reach the model; exclusions still win over includes.
  • Cache keys distinguish unrestricted, empty, and explicit document sets.

Test plan

  • make check (lint + typecheck)
  • pytest apps/api/tests/contract/test_retrieval_document_scope.py (15 passed)
  • Remote PR CI green
  • After merge: confirm include_document_ids / exclude_document_ids are live on main

Made with Cursor

…esults

Keep request-level document scope on Explore tools, classic retrieval, and citations so excluded documents never reach the model.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EricNGOntos
EricNGOntos merged commit 66254a4 into main Sep 11, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/retrieval-document-scope branch September 11, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant