Skip to content

feat(resource): expose resource tools to LLM during overview generation#3106

Open
xiaochen-zhou wants to merge 1 commit into
volcengine:mainfrom
xiaochen-zhou:feat/resource-tools
Open

feat(resource): expose resource tools to LLM during overview generation#3106
xiaochen-zhou wants to merge 1 commit into
volcengine:mainfrom
xiaochen-zhou:feat/resource-tools

Conversation

@xiaochen-zhou

Copy link
Copy Markdown
Contributor

Description

The quality of .overview and .abstract directly determines retrieval quality. Currently, their generation relies solely on file summaries and children abstracts into the prompt the LLM cannot actively fetch supplementary information from external services during generation. Therefore, I think it is necessary to support resource tools, similar to the existing memory tool implementation, allowing users to define custom tools to assist .overview/.abstract generation and improve content quality.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  1. New openviking/resource/tools.py (179 lines)
  • ResourceTool ABC: defines tool interface (name, description, parameters, execute)
  1. New openviking/resource/resource_loop.py (236 lines)
  • ReAct loop: run_resource_tool_loop() drives multi-turn tool calling
  1. overview_generation.yaml (+27 lines)
  • New available_tools variable (boolean, default false)
  • New {% if available_tools %} conditional block: Optional Tools guidance (use sparingly, don't duplicate existing info, integrate rather than dump, degrade on failure)
  1. semantic_processor.py (+12 lines)
  • Integration point: routes to run_resource_tool_loop when tools are exposed, otherwise keeps original vlm.get_completion_async path
  1. openviking/resource/init.py (+29 lines)
  • Exports 13 public symbols
  1. New tests/resource/test_resource_tools.py (372 lines, 17 tests)

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

feat(resource): harden ReAct loop with dynamic iteration extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant