Skip to content

[WIP] New training code with improved rag and parallel tool call#16

Merged
nguyenhoangthuan99 merged 6 commits into
mainfrom
feat/add-data-reward-code
Dec 30, 2025
Merged

[WIP] New training code with improved rag and parallel tool call#16
nguyenhoangthuan99 merged 6 commits into
mainfrom
feat/add-data-reward-code

Conversation

@bachvudinh

@bachvudinh bachvudinh commented Dec 27, 2025

Copy link
Copy Markdown

Methodology

Data and Rag problem

Previously, due to the context length limitations of embedding models (e.g., 512 or 768 tokens), large documents (such as Wiki articles) were truncated into multiple chunks sharing the same title. This resulted in search results containing duplicate titles with fragmented previews. Consequently, the model frequently issued redundant scrape tool calls for the same document to piece together information, leading to the same repetitive behavior of the model during real usage.

The Fix:

  • Unique Title Filtering: The retrieval logic has been updated to return the top-k unique titles only. We prioritize the highest-scoring chunk for a given title and filter out subsequent duplicates from the retrieval view.
  • Full Document Merging: We implemented a DocumentStore mechanism that reconstructs the full document content from its chunks. Now, when the model selects a result to scrape, it maps the chunk ID to the fully merged content, providing the complete global context in a single step.

Parallel Tool call

Model now can't do bulk tool call.

Task

  • Improved rag server:
  • Paralel Function calling Ability
    • Todo1
    • Todo2

@bachvudinh bachvudinh changed the title Feat/add data reward code [WIP] New training code with improved rag and parallel tool call Dec 27, 2025
@bachvudinh bachvudinh self-assigned this Dec 27, 2025
@nguyenhoangthuan99
nguyenhoangthuan99 merged commit 26f8453 into main Dec 30, 2025
3 of 19 checks passed
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.

2 participants