Skip to content

Conversation

oryx1729
Copy link

Description

Adds a blueprint demonstrating how to build a deep research agent using Haystack Framework that combines web search and Retrieval-Augmented Generation (RAG) using the NeMo-Agent-Toolkit.

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Copy link

copy-pr-bot bot commented Jul 21, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@mdemoret-nv mdemoret-nv added enhancement non-breaking Non-breaking change labels Jul 21, 2025
@mdemoret-nv
Copy link
Collaborator

@oryx1729 Can you update your commits to contain the DCO? More info here: https://github.com/NVIDIA/NeMo-Agent-Toolkit/pull/461/checks?check_run_id=46372766560

@oryx1729
Copy link
Author

Hi @mdemoret-nv, @mpangrazzi is on vacation and will be back next week. Is it be possible to start the review and have the DCO done when he's back?

@mdemoret-nv
Copy link
Collaborator

@oryx1729 No problem.

@mdemoret-nv mdemoret-nv added feature request New feature or request and removed enhancement labels Jul 25, 2025
@mpangrazzi
Copy link

@mdemoret-nv Hi! Commits should be compliant with DCO now.

@mpangrazzi mpangrazzi force-pushed the develop branch 2 times, most recently from 70b2319 to 6ccb74a Compare August 21, 2025 08:55
Copy link
Collaborator

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to utilize the LLM top level object.

Comment on lines 21 to 23
agent_model: nvidia/llama-3.3-nemotron-super-49b-v1
rag_model: nvidia/llama-3.3-nemotron-super-49b-v1
nvidia_api_url: https://integrate.api.nvidia.com/v1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would want this to use the llm interface for specifying these models. Instead of referencing them directly, can we use the llms: top level object to specify this?

Copy link
Member

@willkill07 willkill07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good.

Please ensure that all "public" functions have full documentation and that all functions have type annotations. It really helps with clarity.

I can imagine in the future a complete haystack plugin with various features :)

The workflow demonstrates several key NeMo-Agent-Toolkit patterns:

- **Function Registration**: Each tool is registered as a function with its own configuration
- **Builder Pattern**: The NeMo-Agent-Toolkit Builder is used to create and manage tools and LLMs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently does not use the builder at all


The workflow demonstrates several key NeMo-Agent-Toolkit patterns:

- **Function Registration**: Each tool is registered as a function with its own configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No functions are registered with the toolkit directly. You are creating internal tools and building them within your specific workflow.


general:
use_uvloop: true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can envision a more robust separation of components, but the scope of that would be far too large. Instead, let's consider some enhancements to your existing configuration:

general:
  use_uvloop: true

llms:
  rag_llm:
    _type: nim
    model: nvidia/llama-3.3-nemotron-super-49b-v1
    api_key: ${NVIDIA_API_KEY}
  agent_llm:
    _type: nim
    model: nvidia/llama-3.3-nemotron-super-49b-v1
    api_key: ${NVIDIA_API_KEY}

workflow:
  _type: haystack_deep_research_agent
  max_agent_steps: 20
  search_top_k: 10
  rag_top_k: 15
  opensearch_url: http://localhost:9200
  data_dir: /data
  index_on_startup: true

By specifying the LLMs separately, they can automatically take advantage of other parameters like temperature. You can also still easily get the configuration by doing:

You can then get the configuration from rag_llm and instantiate the LLM by:

config = builder.get_llm_config("rag_llm")
generator = NVIDIAChatGenerator(**config.model_dump_json(exclude={"type"}))

You can do the same for agent_llm

mpangrazzi and others added 5 commits August 22, 2025 15:34
Signed-off-by: oryx1729 <[email protected]>
Signed-off-by: Michele Pangrazzi <[email protected]>
…iaChatGenerator ; Rewrote tests

Signed-off-by: Michele Pangrazzi <[email protected]>
@mpangrazzi
Copy link

@willkill07 @mdemoret-nv Thank you! I've just did another iteration following your suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants