Skip to content

feat: refine notebook retrieval context and folders - #176

Merged
EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/2026-09-11
Sep 11, 2026
Merged

EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/2026-09-11

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • add folder assignment and folder workspace flows
  • refine Answering Agent evidence/context assembly and connected asset handling
  • pass document scope through Knowhere retrieval and remove ID-only referenced chunks from model-facing context
  • keep retrieval retries bounded and preserve final answer submission

Verification

  • TypeScript: passed
  • ESLint on Git-tracked Notebook files: passed
  • Vitest: 824 passed, 14 skipped
  • git diff --check: passed

- Added support for assigning sources to folders, enhancing organization and management capabilities.
- Introduced new `folderId` property in various source-related files and updated relevant tests to ensure proper functionality.
- Modified source route service to handle folder assignments, including validation and error handling for folder-related requests.
- Updated tests across multiple domains to cover new folder assignment scenarios, ensuring comprehensive coverage.

This enhancement improves the user experience by allowing better categorization of sources within the application.
- Added support for retaining evidence picks after retrieval, introducing a new `retainPicks` method in the ledger.
- Implemented pending retention range management to track newly added evidence chunks.
- Updated the agent harness runtime to prepare answer context based on retained evidence, improving response accuracy.
- Refactored tests to cover new retention functionality and ensure proper integration with existing workflows.

This enhancement improves the agent's ability to manage and utilize evidence effectively, leading to more accurate and contextually relevant responses.
- Introduced a new `resolveRetainedConnectedAssets` method in the ledger to handle connected assets for retained evidence, improving the assembly of answer context.
- Refactored the `composeAnswerContext` function to support multiple asset types, including tables and images, ensuring accurate representation in responses.
- Updated tests to validate the new asset resolution functionality and its integration with the answer context generation process.

This enhancement improves the agent's ability to utilize connected assets effectively, leading to richer and more informative responses.
…ndling

- Enhanced the `composeAnswerContext` function to include handling for cases where no knowledge base or memory results are found, providing clearer feedback in the generated messages.
- Updated the test suite to cover new scenarios, ensuring that the context composition accurately reflects the absence of results and maintains the integrity of user interactions.
- Refactored memory item formatting to improve clarity and consistency in the output.

These changes enhance the agent's ability to communicate effectively when searches yield no results, leading to a more informative user experience.
- Removed the `referencedChunkCount` from the response structure to streamline data handling.
- Updated tests to ensure that responses do not contain unwanted fields, specifically checking for provenance-only IDs and other irrelevant data.
- Enhanced the logic for processing referenced chunks to focus on those with evidence, improving the accuracy of the citation pipeline.

These changes improve the clarity and relevance of the data returned by the agent, leading to more precise responses in user interactions.
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
knowhere-notebook-staging Ready Ready Preview Sep 11, 2026 5:13pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
knowhere-notebook Ignored Ignored Sep 11, 2026 5:13pm UTC

Request Review

@EricNGOntos
EricNGOntos merged commit 18a9795 into main Sep 11, 2026
7 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/2026-09-11 branch September 11, 2026 17:16
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