-
Notifications
You must be signed in to change notification settings - Fork 498
RAG Library Mode integration #1440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ericevans-nv
wants to merge
31
commits into
NVIDIA:develop
Choose a base branch
from
ericevans-nv:rag-lib-mode-integration
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ed9de49
Adding RAG lib integration stubs.
ericevans-nv 2ea545b
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv a76d50e
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 7f77bc8
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv fe095df
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 0c05f40
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 22c9e10
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv ca34fda
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 56353ee
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 229028b
Pushing package structure for testing.
ericevans-nv 13a2dae
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 0146a2f
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv b3a6508
Add rag_lib subpackage to support NVIDIA RAG Blueprint library with p…
ericevans-nv 1978f2f
Add rag library mode search and generate tools.
ericevans-nv 5329557
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 5676a6d
Add Advanced RAG example using nvidia_rag_lib package
ericevans-nv c16d36f
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv ddf8d34
Improve nvidia_rag_lib optional dependency handling and test quality
ericevans-nv a6edc40
Refine README and update copyright dates
ericevans-nv e1e3b64
Pushing temp wheel file
ericevans-nv 760ba4c
enh(rag): improve config interface; change import deferment
willkill07 5b98ec5
propagate exceptions, require collection_names, cleanup tests
ericevans-nv abcd328
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 27855e1
adding docstrings
ericevans-nv 04db967
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 0bd20be
Add reranking to Vale
ericevans-nv 16401ff
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 044299e
Renaming conflicting test file
ericevans-nv aaba429
Fixing test file
ericevans-nv 95ff54c
Merge branch 'develop' of github.com:NVIDIA/NeMo-Agent-Toolkit into r…
ericevans-nv 62d3001
improve doc clarity
ericevans-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
67 changes: 67 additions & 0 deletions
67
examples/RAG/simple_rag/configs/rag_library_mode_config.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| llms: | ||
| nim_llm: | ||
| _type: nim | ||
| model_name: meta/llama-3.3-70b-instruct | ||
| base_url: https://integrate.api.nvidia.com/v1 | ||
| temperature: 0 | ||
| max_tokens: 4096 | ||
| top_p: 1 | ||
|
|
||
| embedders: | ||
| nim_embedder: | ||
| _type: nim | ||
| model_name: nvidia/llama-3.2-nv-embedqa-1b-v2 | ||
| base_url: https://integrate.api.nvidia.com/v1 | ||
| truncate: "END" | ||
|
|
||
| retrievers: | ||
| cuda_retriever: | ||
| _type: milvus_retriever | ||
| uri: http://localhost:19530 | ||
| collection_name: cuda_docs | ||
| embedding_model: nim_embedder | ||
| top_k: 100 | ||
|
|
||
| function_groups: | ||
| cuda_search: | ||
| _type: nvidia_rag_lib | ||
| include: | ||
| - search | ||
| llm: nim_llm | ||
| embedder: nim_embedder | ||
| retriever: cuda_retriever | ||
| topic: NVIDIA CUDA library | ||
| collection_names: | ||
| - cuda_docs | ||
| reranker_top_k: 10 | ||
| rag_pipeline: | ||
| enable_citations: true | ||
| default_confidence_threshold: 0.25 | ||
| ranking: | ||
| enable_reranker: true | ||
| model_name: nvidia/llama-3.2-nv-rerankqa-1b-v2 | ||
| query_rewriter: | ||
| enabled: true | ||
|
|
||
| workflow: | ||
| _type: react_agent | ||
| tool_names: | ||
| - cuda_search | ||
| verbose: true | ||
| llm_name: nim_llm |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,4 +100,3 @@ services: | |
| networks: | ||
| default: | ||
| name: nvidia-rag-test | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../LICENSE-3rd-party.txt |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../LICENSE.md | ||
ericevans-nv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| [build-system] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["setuptools >= 64", "setuptools-scm>=8"] | ||
|
|
||
|
|
||
| [tool.setuptools.packages.find] | ||
| where = ["src"] | ||
| include = ["nat.*"] | ||
|
|
||
|
|
||
| [tool.setuptools_scm] | ||
| git_describe_command = "git describe --long --first-parent" | ||
| root = "../.." | ||
|
|
||
|
|
||
| [project] | ||
| name = "nvidia-nat-rag-lib" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dislike this package name. Can we ask the RAG blueprint team if there is a better alternative. Like |
||
| dynamic = ["version"] | ||
| dependencies = [ | ||
| # Keep package version constraints as open as possible to avoid conflicts with other packages. Always define a minimum | ||
| # version when adding a new package. If unsure, default to using `~=` instead of `==`. Does not apply to nvidia-nat packages. | ||
| # Keep sorted!!! | ||
| "nvidia-nat~=1.5", | ||
| "nvidia-rag>=2.4.0", # TODO: Update version constraint when nvidia-rag is published to PyPI | ||
mnajafian-nv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ] | ||
| requires-python = ">=3.11,<3.14" | ||
| description = "Subpackage for NVIDIA RAG library in NeMo Agent toolkit" | ||
| readme = "src/nat/meta/pypi.md" | ||
| keywords = ["ai", "rag", "agents", "retrieval"] | ||
| license = { text = "Apache-2.0" } | ||
| authors = [{ name = "NVIDIA Corporation" }] | ||
| maintainers = [{ name = "NVIDIA Corporation" }] | ||
| classifiers = [ | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| documentation = "https://docs.nvidia.com/nemo/agent-toolkit/latest/" | ||
| source = "https://github.com/NVIDIA/NeMo-Agent-Toolkit" | ||
|
|
||
|
|
||
| [tool.uv] | ||
| managed = true | ||
| config-settings = { editable_mode = "compat" } | ||
|
|
||
|
|
||
| [tool.uv.sources] | ||
| nvidia-nat = { workspace = true } | ||
| nvidia-rag = { path = "vendor/nvidia_rag-2.4.0.dev0-py3-none-any.whl" } # TODO: Remove when nvidia-rag>=2.4.0 is on PyPI | ||
ericevans-nv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| [project.entry-points.'nat.components'] | ||
| nat_rag_lib = "nat.plugins.rag_lib.register" | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.