From 9105f35a813e7c9cfccb4caf6f7b7b34ce3f3e98 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Mon, 3 Aug 2026 22:45:30 -0700 Subject: [PATCH 1/9] update default model profiles Signed-off-by: Ajay Thorve --- .../assets/config-scaffold.yml | 46 ++++++-- .../references/composing-config.md | 2 +- .../references/config-profiles.md | 2 +- .../references/model-selection.md | 16 +-- .secrets.baseline | 2 +- README.md | 47 ++++---- configs/config_cli_default.yml | 53 ++++++--- configs/config_domain_routing_and_skills.yml | 26 +++-- configs/config_frontier_models.yml | 34 +++--- configs/config_mcp.yml | 53 ++++++--- configs/config_openshell.yml | 57 ++++++---- configs/config_web_azure_ai_search.yml | 59 ++++++---- configs/config_web_default_guardrails.yml | 67 ++++++----- configs/config_web_default_llamaindex.yml | 57 ++++++---- configs/config_web_frag.yml | 53 ++++++--- configs/config_web_frag_mcp_auth.yml | 53 ++++++--- configs/config_web_opensearch.yml | 55 +++++---- deploy/.env.example | 4 +- .../1_Deep_Researcher_Web_Search.ipynb | 104 +++++++++-------- .../2_Deep_Researcher_Customization.ipynb | 90 ++++++++------- .../architecture/agents/deep-researcher.md | 12 +- .../customization/configuration-reference.md | 105 +++++++++++------- docs/source/customization/knowledge-layer.md | 12 +- docs/source/customization/mcp-tools.md | 2 +- docs/source/customization/swapping-models.md | 71 ++++++------ .../source/customization/tools-and-sources.md | 2 +- .../deployment/aws-opensearch-serverless.md | 4 +- .../evaluation/benchmarks/deepsearch-qa.md | 2 +- docs/source/examples/cli-with-local-nims.md | 55 ++++----- .../examples/full-pipeline-llamaindex.md | 64 ++++++++--- docs/source/examples/full-pipeline-web.md | 67 ++++++++--- docs/source/examples/hybrid-frontier-model.md | 32 ++++-- docs/source/examples/minimal-shallow-only.md | 17 +-- docs/source/extending/adding-a-tool.md | 2 +- docs/source/get-started/installation.md | 11 +- docs/source/profiling/index.md | 11 +- docs/source/resources/troubleshooting.md | 34 ++---- .../configs/config_deep_research_bench.yml | 36 +++--- .../config_deep_research_bench_profiling.yml | 39 +++---- .../configs/config_tokenomics_pricing.yml | 12 +- frontends/benchmarks/deepsearch_qa/README.md | 2 +- .../configs/config_deepsearch_qa.yml | 38 +++---- .../freshqa/configs/config_full_workflow.yml | 59 +++++----- .../configs/config_shallow_research_only.yml | 18 +-- .../chat/lib/intermediate-step-parser.ts | 6 +- mcp/tests/test_config_and_packaging.py | 2 +- .../test_preclassification_integration.py | 2 +- sources/google_scholar_paper_search/README.md | 2 +- .../knowledge_layer/KNOWLEDGE-LAYER-SETUP.md | 8 +- .../src/azure_ai_search/adapter.py | 2 +- .../knowledge_layer/src/llamaindex/adapter.py | 14 +-- .../knowledge_layer/src/opensearch/adapter.py | 2 +- sources/knowledge_layer/src/register.py | 2 +- src/aiq_agent/tokenomics/README.md | 17 +-- .../aiq_agent/test_default_model_profiles.py | 101 +++++++++++++++++ .../test_azure_ai_search.py | 2 +- 56 files changed, 1056 insertions(+), 691 deletions(-) create mode 100644 tests/aiq_agent/test_default_model_profiles.py diff --git a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml index 504fc9255..abf33012f 100644 --- a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml +++ b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml @@ -17,13 +17,39 @@ general: # Web/API: copy general.front_end from config_web_default_llamaindex.yml llms: - main_llm: + nano_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false + + ultra_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + max_tokens: 32768 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false functions: data_sources: @@ -32,18 +58,18 @@ functions: intent_classifier: _type: intent_classifier - llm: main_llm + llm: nano_llm shallow_research_agent: _type: shallow_research_agent - llm: main_llm + llm: nano_llm deep_research_agent: _type: deep_research_agent - orchestrator_llm: main_llm - planner_llm: main_llm - researcher_llm: main_llm - writer_llm: main_llm + orchestrator_llm: ultra_llm + planner_llm: ultra_llm + researcher_llm: ultra_llm + writer_llm: ultra_writer_llm workflow: _type: chat_deepresearcher_agent diff --git a/.agents/skills/aiq-configure-workflow/references/composing-config.md b/.agents/skills/aiq-configure-workflow/references/composing-config.md index 60249ac95..6d03c5bbd 100644 --- a/.agents/skills/aiq-configure-workflow/references/composing-config.md +++ b/.agents/skills/aiq-configure-workflow/references/composing-config.md @@ -97,7 +97,7 @@ repointing role fields — no Python changes. | Parameter | Typical use | Notes | |-----------|-------------|-------| | `_type` | `nim` or `openai` | Provider plugin | -| `model_name` | required | e.g. `nvidia/nemotron-3-super-120b-a12b` | +| `model_name` | required | e.g. `nvidia/nemotron-3-ultra-550b-a55b` | | `base_url` | NIM / compatible endpoint | Set explicitly for hosted NIM | | `api_key` | optional | Falls back to `NVIDIA_API_KEY` for NIM | | `temperature`, `top_p`, `max_tokens` | per role | See role table in configuration-reference | diff --git a/.agents/skills/aiq-configure-workflow/references/config-profiles.md b/.agents/skills/aiq-configure-workflow/references/config-profiles.md index 6835f319c..0bfa86a27 100644 --- a/.agents/skills/aiq-configure-workflow/references/config-profiles.md +++ b/.agents/skills/aiq-configure-workflow/references/config-profiles.md @@ -17,7 +17,7 @@ the file from `configs/`. For the full nine-profile table, see 3. **Model family** - Nemotron → most profiles - GPT-5.2 orchestration/planning/writing → `config_frontier_models.yml` (`OPENAI_API_KEY`) - - GPT-OSS-120B → `config_web_default_guardrails.yml` or `config_openshell.yml` + - Default split → Nano for intent/shallow; Ultra for clarification and deep research 4. **Optional features** — copy blocks from: - Guardrails → `config_web_default_guardrails.yml` diff --git a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md index 2ae7dc367..13fad2a1b 100644 --- a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md +++ b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md @@ -15,12 +15,12 @@ an agent. Do not hard-code model names in Python. ```yaml llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim model_name: - gpt_oss_llm: + nemotron_nano_agent_llm: _type: nim # `openai` is also supported (also takes model_name) - model_name: + model_name: ``` ## Assign a model to an agent role @@ -54,11 +54,11 @@ There is **no** generic `llm` field on the deep research agent. functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_super_llm # required; also the default for unset roles - source_router_llm: nemotron_super_llm - researcher_llm: nemotron_super_llm - planner_llm: gpt_oss_llm # cheaper model for planning - writer_llm: gpt_oss_llm + orchestrator_llm: nemotron_ultra_llm # required; also the default for unset roles + source_router_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm ``` This mirrors the real configs (for example diff --git a/.secrets.baseline b/.secrets.baseline index 7ed8f8b7c..f3f20460b 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -133,7 +133,7 @@ "filename": "README.md", "hashed_secret": "73140b88094aaf220a03532196b27b58a03c9b09", "is_verified": false, - "line_number": 400 + "line_number": 395 } ], "deploy/.env.example": [ diff --git a/README.md b/README.md index c29311979..f9eb7a13c 100644 --- a/README.md +++ b/README.md @@ -108,17 +108,16 @@ The checked-in default CLI and web profiles use these core components: - [NVIDIA NeMo Agent Toolkit 1.8.0](https://docs.nvidia.com/nemo/agent-toolkit/latest/) - [LangChain Deep Agents](https://docs.langchain.com/oss/python/deepagents/overview) 0.6.5 or newer -- [NVIDIA Nemotron 3 Super 120B A12B](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b/modelcard) for intent classification, shallow research, and deep-research writing in the default profiles -- [NVIDIA Nemotron 3 Ultra 550B A55B](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b/modelcard) for deep-research source routing, orchestration, planning, and research in the default profiles -- [NVIDIA nemotron-mini-4b-instruct](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct/modelcard) (document summary, if used) -- [NVIDIA llama-nemotron-embed-vl-1b-v2](https://build.nvidia.com/nvidia/llama-nemotron-embed-vl-1b-v2) (embedding model for llamaindex knowledge layer implementation, if used) -- [NVIDIA nemotron-nano-12b-v2-vl](https://build.nvidia.com/nvidia/nemotron-nano-12b-v2-vl) (vision-language model for llamaindex knowledge layer implementation, if used) +- [NVIDIA Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) for intent classification and shallow research in the default profiles +- [NVIDIA Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for clarification and every deep-research role in the default profiles +- [Google Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) (document summary, if used) +- [NVIDIA Nemotron 3 Embed 1B](https://build.nvidia.com/nvidia/nemotron-3-embed-1b) (embedding model for the knowledge layer, if used) +- [NVIDIA Nemotron 3 Nano Omni 30B A3B Reasoning](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) (vision-language model for the LlamaIndex knowledge layer, if used) - [Tavily Search API](https://tavily.com/) for web search - Serper, SerpAPI, or SearchAPI for Google Scholar paper search -Focused profiles can instead use [GPT-OSS-120B](https://build.nvidia.com/openai/gpt-oss-120b/modelcard) -for deep-research orchestration, planning, and writing, or GPT-5.2 for those roles in the -frontier-model example. Refer to [Configuration Files](#configuration-files); there is no single +Focused profiles can instead use GPT-5.2 or other supported frontier models for selected +deep-research roles. Refer to [Configuration Files](#configuration-files); there is no single all-features profile. ## Target Audience @@ -151,11 +150,11 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent, shallow research, deep-research writer) | `nvidia/nemotron-3-super-120b-a12b` | [Nemotron 3 Super model card](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b/modelcard) | -| LLM (deep-research source router, orchestrator, planner, researcher) | `nvidia/nemotron-3-ultra-550b-a55b` in default profiles; GPT-OSS-120B or GPT-5.2 for selected roles in focused profiles | [Nemotron 3 Ultra model card](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b/modelcard) | -| Document summary (optional) | `nvidia/nemotron-mini-4b-instruct` | [Nemotron Mini 4B](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct/) | -| Text embedding | `nvidia/llama-nemotron-embed-vl-1b-v2` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | -| VLM (image/chart extraction, optional) | `nvidia/nemotron-nano-12b-v2-vl` | [Vision language model support matrix](https://docs.nvidia.com/nim/vision-language-models/latest/support-matrix.html#nemotron-nano-12b-v2-vl) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-nano-3.5-preview` | [Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) | +| LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | +| Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | +| Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | +| VLM (image/chart extraction, optional) | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | [Nemotron 3 Nano Omni](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) | | Knowledge layer (Foundational RAG, optional) | -- | [RAG Blueprint support matrix](https://docs.nvidia.com/rag/latest/support-matrix.html) | For detailed installation instructions, refer to [Installation -- Hardware Requirements](docs/source/get-started/installation.md#hardware-requirements). @@ -288,17 +287,17 @@ The `configs/` directory holds YAML workflow configs that define agents, tools, | Config | Models | Description | |--------|--------|-------------| -| `config_cli_default.yml` | Nemotron 3 Ultra; Nemotron 3 Super | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | -| `config_web_default_llamaindex.yml` | Nemotron 3 Ultra; Nemotron 3 Super; Nemotron Mini summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | -| `config_web_frag.yml` | Nemotron 3 Ultra; Nemotron 3 Super | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | -| `config_web_opensearch.yml` | Nemotron 3 Ultra; Nemotron 3 Super; NVIDIA embedding model | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | -| `config_web_azure_ai_search.yml` | Nemotron 3 Ultra; Nemotron 3 Super; NVIDIA embedding model | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | -| `config_frontier_models.yml` | GPT-5.2; Nemotron 3 Ultra; Nemotron 3 Super; Nemotron Mini summary | LlamaIndex profile using GPT-5.2 for orchestration/planning/writing, Nemotron Ultra for routing/research, and Nemotron Super for shallow research. Requires `OPENAI_API_KEY`. | -| `config_web_default_guardrails.yml` | GPT-OSS-120B; Nemotron 3 Ultra; Nemotron 3 Super; Nemotron Mini summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | -| `config_web_frag_mcp_auth.yml` | Nemotron 3 Ultra; Nemotron 3 Super | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | -| `config_domain_routing_and_skills.yml` | Nemotron 3 Ultra; Nemotron 3 Super; Nemotron Mini summary | Direct deep-research profile with domain routing, DuckDuckGo news, Polymarket, enabled Serper paper search, LlamaIndex, built-in skills, and a fresh per-job Modal sandbox. | -| `config_openshell.yml` | Nemotron 3 Ultra; Nemotron 3 Super; Nemotron Mini summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | -| `config_mcp.yml` | Nemotron 3 Ultra; Nemotron 3 Super | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | +| `config_cli_default.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | +| `config_web_default_llamaindex.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | +| `config_web_frag.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | +| `config_web_opensearch.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | +| `config_web_azure_ai_search.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | +| `config_frontier_models.yml` | GPT-5.2; Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile using GPT-5.2 for orchestration/planning/writing, Ultra for routing/research, and Nano for shallow research. Requires `OPENAI_API_KEY`. | +| `config_web_default_guardrails.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | +| `config_web_frag_mcp_auth.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | +| `config_domain_routing_and_skills.yml` | Nemotron 3 Ultra; Gemma 4 summary | Direct deep-research profile with domain routing, DuckDuckGo news, Polymarket, enabled Serper paper search, LlamaIndex, built-in skills, and a fresh per-job Modal sandbox. | +| `config_openshell.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | +| `config_mcp.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | ## Ways to Run the Agents diff --git a/configs/config_cli_default.yml b/configs/config_cli_default.yml index 18c6a7d62..9c7945256 100644 --- a/configs/config_cli_default.yml +++ b/configs/config_cli_default.yml @@ -16,38 +16,55 @@ general: # project: nvidia-aiq llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false functions: # ========================================================================= @@ -102,14 +119,14 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] # llm_timeout: 90 # optional; seconds for intent LLM call (default 90) clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -118,7 +135,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool @@ -132,7 +149,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm exclude_tools: - web_search_tool diff --git a/configs/config_domain_routing_and_skills.yml b/configs/config_domain_routing_and_skills.yml index 2d27a9c22..1c3a12cce 100644 --- a/configs/config_domain_routing_and_skills.yml +++ b/configs/config_domain_routing_and_skills.yml @@ -47,35 +47,37 @@ general: - "*" llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_ultra_llm: + nemotron_ultra_writer_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false # LLM for document summaries (required when generate_summary: true) summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 functions: @@ -214,7 +216,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove basic variant; deep uses advanced_web_search_tool - web_search_tool diff --git a/configs/config_frontier_models.yml b/configs/config_frontier_models.yml index f87e6dd9b..7eb2e8434 100644 --- a/configs/config_frontier_models.yml +++ b/configs/config_frontier_models.yml @@ -50,27 +50,31 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 - top_p: 0.3 - max_tokens: 16384 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false gpt_sol_agent_llm: _type: openai @@ -99,10 +103,10 @@ llms: # LLM for document summaries (required when generate_summary: true) summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 functions: @@ -136,7 +140,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm verbose: true tools: - web_search_tool @@ -155,7 +159,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm verbose: true tools: - web_search_tool diff --git a/configs/config_mcp.yml b/configs/config_mcp.yml index 6ffde33e0..c26ab6b05 100644 --- a/configs/config_mcp.yml +++ b/configs/config_mcp.yml @@ -26,38 +26,55 @@ general: level: INFO llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false functions: data_sources: @@ -82,19 +99,19 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # Defined for workflow compatibility but disabled at the workflow boundary. clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm max_turns: 3 log_response_max_chars: 2000 verbose: true shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm exclude_tools: - advanced_web_search_tool max_llm_turns: 10 @@ -107,7 +124,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm exclude_tools: - web_search_tool diff --git a/configs/config_openshell.yml b/configs/config_openshell.yml index c066fdc3e..edc7a2380 100644 --- a/configs/config_openshell.yml +++ b/configs/config_openshell.yml @@ -28,45 +28,62 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 functions: @@ -107,19 +124,19 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm verbose: true clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm max_turns: 3 log_response_max_chars: 2000 verbose: true shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm exclude_tools: - advanced_web_search_tool verbose: true @@ -176,7 +193,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm exclude_tools: - web_search_tool verbose: true diff --git a/configs/config_web_azure_ai_search.yml b/configs/config_web_azure_ai_search.yml index bafbe6e8d..301214f1e 100644 --- a/configs/config_web_azure_ai_search.yml +++ b/configs/config_web_azure_ai_search.yml @@ -47,46 +47,63 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false # LLM for document summaries (required when generate_summary: true) summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 functions: @@ -174,15 +191,15 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm - planner_llm: nemotron_super_llm + llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -192,7 +209,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool @@ -207,7 +224,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove basic variant; deep uses advanced_web_search_tool - web_search_tool diff --git a/configs/config_web_default_guardrails.yml b/configs/config_web_default_guardrails.yml index d419b2945..e910e6842 100644 --- a/configs/config_web_default_guardrails.yml +++ b/configs/config_web_default_guardrails.yml @@ -28,55 +28,64 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - gpt_oss_llm: + nemotron_ultra_writer_llm: _type: nim - model_name: openai/gpt-oss-120b - base_url: https://integrate.api.nvidia.com/v1 - temperature: 1.0 - top_p: 1.0 - max_tokens: 256000 + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - max_retries: 10 + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 middleware: @@ -212,19 +221,19 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm verbose: true clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm max_turns: 3 log_response_max_chars: 2000 verbose: true shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm exclude_tools: - advanced_web_search_tool verbose: true @@ -233,11 +242,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: gpt_oss_llm + orchestrator_llm: nemotron_ultra_llm source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm - planner_llm: gpt_oss_llm - writer_llm: gpt_oss_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm exclude_tools: - web_search_tool verbose: true diff --git a/configs/config_web_default_llamaindex.yml b/configs/config_web_default_llamaindex.yml index 69b4901b2..077aea58f 100644 --- a/configs/config_web_default_llamaindex.yml +++ b/configs/config_web_default_llamaindex.yml @@ -47,46 +47,63 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false # LLM for document summaries (required when generate_summary: true) summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 functions: @@ -175,14 +192,14 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -191,7 +208,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool @@ -206,7 +223,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove basic variant; deep uses advanced_web_search_tool - web_search_tool diff --git a/configs/config_web_frag.yml b/configs/config_web_frag.yml index ee3c21933..d60ac73bd 100644 --- a/configs/config_web_frag.yml +++ b/configs/config_web_frag.yml @@ -49,38 +49,55 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false functions: # ========================================================================= @@ -145,13 +162,13 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -160,7 +177,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool @@ -174,7 +191,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - web_search_tool diff --git a/configs/config_web_frag_mcp_auth.yml b/configs/config_web_frag_mcp_auth.yml index 33562dc90..3f3a4a921 100644 --- a/configs/config_web_frag_mcp_auth.yml +++ b/configs/config_web_frag_mcp_auth.yml @@ -56,38 +56,55 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false functions: # ========================================================================= @@ -194,13 +211,13 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -209,7 +226,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool @@ -223,7 +240,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - web_search_tool diff --git a/configs/config_web_opensearch.yml b/configs/config_web_opensearch.yml index 063443ca1..cb98a64d8 100644 --- a/configs/config_web_opensearch.yml +++ b/configs/config_web_opensearch.yml @@ -48,38 +48,55 @@ general: - "*" llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false functions: # ========================================================================= @@ -137,7 +154,7 @@ functions: opensearch_ingestion_mode: ${OPENSEARCH_INGESTION_MODE:-auto} opensearch_dask_scheduler_address: ${NAT_DASK_SCHEDULER_ADDRESS:-} opensearch_dask_file_transfer: ${OPENSEARCH_DASK_FILE_TRANSFER:-bytes} - embed_model: ${AIQ_EMBED_MODEL:-nvidia/llama-nemotron-embed-vl-1b-v2} + embed_model: ${AIQ_EMBED_MODEL:-nvidia/nemotron-3-embed-1b} embed_base_url: ${AIQ_EMBED_BASE_URL:-https://integrate.api.nvidia.com/v1} # Paper Search (optional - requires SERPER_API_KEY) @@ -152,13 +169,13 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] max_turns: 3 @@ -167,7 +184,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool @@ -181,7 +198,7 @@ functions: source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - web_search_tool diff --git a/deploy/.env.example b/deploy/.env.example index 84b0b2f6f..f5f1ebe92 100644 --- a/deploy/.env.example +++ b/deploy/.env.example @@ -185,11 +185,11 @@ AIQ_MAX_DEEP_RESEARCH_SUBMISSIONS_PER_MINUTE=20 # ----------------------------------------------------------------------------- # Embedding Model Environment Variables (optional, NVIDIA hosted models are used by default) # ----------------------------------------------------------------------------- -# AIQ_EMBED_MODEL=nvidia/llama-nemotron-embed-vl-1b-v2 +# AIQ_EMBED_MODEL=nvidia/nemotron-3-embed-1b # AIQ_EMBED_BASE_URL=https://integrate.api.nvidia.com/v1 # # VLM Model Environment Variables (optional, NVIDIA hosted models are used by default) -# AIQ_VLM_MODEL=nvidia/nemotron-nano-12b-v2-vl +# AIQ_VLM_MODEL=nvidia/nemotron-3-nano-omni-30b-a3b-reasoning # AIQ_VLM_BASE_URL=https://integrate.api.nvidia.com/v1 # # Image Extraction Environment Variables (optional) diff --git a/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb b/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb index 0564c50b9..ccd9339f3 100644 --- a/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb +++ b/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb @@ -341,11 +341,11 @@ "\n", "# One LLM for all roles (orchestrator, planner, researcher)\n", "llm = ChatNVIDIA(\n", - " model=\"nvidia/nemotron-3-super-120b-a12b\",\n", + " model=\"nvidia/nemotron-3-ultra-550b-a55b\",\n", " base_url=\"https://integrate.api.nvidia.com/v1\",\n", - " temperature=1.0,\n", - " top_p=1.0,\n", - " max_completion_tokens=128000,\n", + " temperature=0.2,\n", + " top_p=0.7,\n", + " max_completion_tokens=16384,\n", ")\n", "provider = LLMProvider()\n", "provider.set_default(llm)\n", @@ -431,26 +431,29 @@ " level: INFO\n", "\n", "llms:\n", - " gpt_oss_llm:\n", + " nemotron_ultra_llm:\n", " _type: nim\n", - " model_name: openai/gpt-oss-120b\n", - " base_url: https://integrate.api.nvidia.com/v1\n", - " temperature: 1.0\n", - " top_p: 1.0\n", - " max_tokens: 256000\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", + " base_url: \"https://integrate.api.nvidia.com/v1\"\n", " api_key: ${NVIDIA_API_KEY}\n", - " max_retries: 10\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 16384\n", + " num_retries: 5\n", + " chat_template_kwargs:\n", + " enable_thinking: false\n", "\n", - " nemotron_super_llm:\n", + " nemotron_ultra_writer_llm:\n", " _type: nim\n", - " model_name: nvidia/nemotron-3-super-120b-a12b\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", - " temperature: 1.0\n", - " top_p: 1.0 \n", - " max_tokens: 128000\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 32768\n", " num_retries: 5\n", " chat_template_kwargs:\n", - " enable_thinking: true\n", + " enable_thinking: false\n", "\n", "\n", "functions:\n", @@ -461,14 +464,16 @@ "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: gpt_oss_llm\n", - " planner_llm: gpt_oss_llm\n", - " researcher_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", + " source_router_llm: nemotron_ultra_llm\n", + " planner_llm: nemotron_ultra_llm\n", + " researcher_llm: nemotron_ultra_llm\n", + " writer_llm: nemotron_ultra_writer_llm\n", " tools:\n", " - advanced_web_search_tool\n", "\n", "workflow:\n", - " _type: deep_research_workflow" + " _type: deep_research_workflow\n" ] }, { @@ -593,47 +598,51 @@ " console:\n", " _type: console\n", " level: INFO\n", - " use_uvloop: true\n", "\n", "llms:\n", - " gpt_oss_llm:\n", + " nemotron_ultra_llm:\n", " _type: nim\n", - " model_name: openai/gpt-oss-120b\n", - " base_url: https://integrate.api.nvidia.com/v1\n", - " temperature: 1.0\n", - " top_p: 1.0\n", - " max_tokens: 256000\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", + " base_url: \"https://integrate.api.nvidia.com/v1\"\n", " api_key: ${NVIDIA_API_KEY}\n", - " max_retries: 10\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 16384\n", + " num_retries: 5\n", + " chat_template_kwargs:\n", + " enable_thinking: false\n", "\n", - " nemotron_super_llm:\n", + " nemotron_ultra_writer_llm:\n", " _type: nim\n", - " model_name: nvidia/nemotron-3-super-120b-a12b\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", - " temperature: 1.0\n", - " top_p: 1.0 \n", - " max_tokens: 128000\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 32768\n", " num_retries: 5\n", " chat_template_kwargs:\n", - " enable_thinking: true\n", + " enable_thinking: false\n", "\n", "\n", "functions:\n", + " advanced_web_search_tool:\n", + " _type: tavily_web_search\n", + " max_results: 5\n", + " advanced_search: true\n", + "\n", " paper_search_tool:\n", " _type: paper_search\n", " max_results: 5\n", " serper_api_key: ${SERPER_API_KEY}\n", "\n", - " advanced_web_search_tool:\n", - " _type: tavily_web_search\n", - " max_results: 2\n", - " advanced_search: true\n", - "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: gpt_oss_llm\n", - " planner_llm: gpt_oss_llm\n", - " researcher_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", + " source_router_llm: nemotron_ultra_llm\n", + " planner_llm: nemotron_ultra_llm\n", + " researcher_llm: nemotron_ultra_llm\n", + " writer_llm: nemotron_ultra_writer_llm\n", " tools:\n", " - paper_search_tool\n", " - advanced_web_search_tool\n", @@ -641,22 +650,19 @@ "workflow:\n", " _type: deep_research_workflow\n", "\n", + "\n", "eval:\n", " general:\n", " workflow_alias: \"aiq-deepresearcher\"\n", " output_dir: docs/notebooks/results\n", - " max_concurrency: 1 # update for higher concurrency\n", + " max_concurrency: 1\n", " dataset:\n", " _type: json\n", " file_path: frontends/benchmarks/deepresearch_bench/data/drb_full_dataset.json\n", " structure:\n", " question_key: question\n", " answer_key: expected_output\n", - " generated_answer_key: generated_answer\n", - " # filter:\n", - " # allowlist:\n", - " # field: # run sample of 16, for english only set 51-100, for all comment out the filter\n", - " # id: [88, 80, 84, 90, 59, 51, 94, 96, 91, 99, 93, 86, 67, 100, 72, 76]" + " generated_answer_key: generated_answer\n" ] }, { diff --git a/docs/notebooks/2_Deep_Researcher_Customization.ipynb b/docs/notebooks/2_Deep_Researcher_Customization.ipynb index e80fec557..d6bbf1504 100644 --- a/docs/notebooks/2_Deep_Researcher_Customization.ipynb +++ b/docs/notebooks/2_Deep_Researcher_Customization.ipynb @@ -175,7 +175,7 @@ "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", " tools:\n", " - paper_search_tool\n", " - advanced_web_search_tool\n", @@ -200,26 +200,29 @@ " level: INFO\n", "\n", "llms:\n", - " gpt_oss_llm:\n", + " nemotron_ultra_llm:\n", " _type: nim\n", - " model_name: openai/gpt-oss-120b\n", - " base_url: https://integrate.api.nvidia.com/v1\n", - " temperature: 1.0\n", - " top_p: 1.0\n", - " max_tokens: 256000\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", + " base_url: \"https://integrate.api.nvidia.com/v1\"\n", " api_key: ${NVIDIA_API_KEY}\n", - " max_retries: 10\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 16384\n", + " num_retries: 5\n", + " chat_template_kwargs:\n", + " enable_thinking: false\n", "\n", - " nemotron_super_llm:\n", + " nemotron_ultra_writer_llm:\n", " _type: nim\n", - " model_name: nvidia/nemotron-3-super-120b-a12b\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", - " temperature: 1.0\n", - " top_p: 1.0 \n", - " max_tokens: 128000\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 32768\n", " num_retries: 5\n", " chat_template_kwargs:\n", - " enable_thinking: true\n", + " enable_thinking: false\n", "\n", "\n", "functions:\n", @@ -235,15 +238,17 @@ "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: gpt_oss_llm\n", - " planner_llm: gpt_oss_llm\n", - " researcher_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", + " source_router_llm: nemotron_ultra_llm\n", + " planner_llm: nemotron_ultra_llm\n", + " researcher_llm: nemotron_ultra_llm\n", + " writer_llm: nemotron_ultra_writer_llm\n", " tools:\n", " - paper_search_tool\n", " - advanced_web_search_tool\n", "\n", "workflow:\n", - " _type: deep_research_workflow" + " _type: deep_research_workflow\n" ] }, { @@ -303,9 +308,9 @@ "\n", "```yaml\n", "llms:\n", - " nemotron_super_llm:\n", + " nemotron_ultra_llm:\n", " _type: nim\n", - " model_name: nvidia/nemotron-3-super-120b-a12b\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", " temperature: 1.0\n", " max_tokens: 128000\n", @@ -323,7 +328,7 @@ " _type: deep_research_agent\n", " orchestrator_llm: frontier_llm \n", " planner_llm: frontier_llm\n", - " researcher_llm: nemotron_super_llm\n", + " researcher_llm: nemotron_ultra_llm\n", " tools:\n", " - advanced_web_search_tool\n", "```\n", @@ -469,7 +474,7 @@ "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", " tools:\n", " - advanced_web_search_tool\n", " - knowledge_search\n", @@ -494,26 +499,29 @@ " level: INFO\n", "\n", "llms:\n", - " gpt_oss_llm:\n", + " nemotron_ultra_llm:\n", " _type: nim\n", - " model_name: openai/gpt-oss-120b\n", - " base_url: https://integrate.api.nvidia.com/v1\n", - " temperature: 1.0\n", - " top_p: 1.0\n", - " max_tokens: 256000\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", + " base_url: \"https://integrate.api.nvidia.com/v1\"\n", " api_key: ${NVIDIA_API_KEY}\n", - " max_retries: 10\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 16384\n", + " num_retries: 5\n", + " chat_template_kwargs:\n", + " enable_thinking: false\n", "\n", - " nemotron_super_llm:\n", + " nemotron_ultra_writer_llm:\n", " _type: nim\n", - " model_name: nvidia/nemotron-3-super-120b-a12b\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", - " temperature: 1.0\n", - " top_p: 1.0 \n", - " max_tokens: 128000\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 32768\n", " num_retries: 5\n", " chat_template_kwargs:\n", - " enable_thinking: true\n", + " enable_thinking: false\n", "\n", "\n", "functions:\n", @@ -531,15 +539,17 @@ "\n", " deep_research_agent:\n", " _type: deep_research_agent\n", - " orchestrator_llm: gpt_oss_llm\n", - " planner_llm: gpt_oss_llm\n", - " researcher_llm: nemotron_super_llm\n", + " orchestrator_llm: nemotron_ultra_llm\n", + " source_router_llm: nemotron_ultra_llm\n", + " planner_llm: nemotron_ultra_llm\n", + " researcher_llm: nemotron_ultra_llm\n", + " writer_llm: nemotron_ultra_writer_llm\n", " tools:\n", " - advanced_web_search_tool\n", " - knowledge_search\n", "\n", "workflow:\n", - " _type: deep_research_workflow" + " _type: deep_research_workflow\n" ] }, { @@ -552,7 +562,7 @@ "A single config can combine all of the above:\n", "\n", "- **Tools:** `paper_search_tool`, `advanced_web_search_tool`, `knowledge_search` in `deep_research_agent.tools`.\n", - "- **Models:** `orchestrator_llm: frontier_llm`, `planner_llm: nemotron_super_llm`, `researcher_llm: nemotron_super_llm` (with those LLMs defined in `llms:`).\n", + "- **Models:** `orchestrator_llm: frontier_llm`, `planner_llm: nemotron_ultra_llm`, `researcher_llm: nemotron_ultra_llm` (with those LLMs defined in `llms:`).\n", "- **Prompts:** No config change; edit `src/aiq_agent/agents/deep_researcher/prompts/*.j2` as needed.\n", "- **Knowledge layer:** Install a backend, define `knowledge_search` in `functions`, and add it to `deep_research_agent.tools`.\n", "\n", diff --git a/docs/source/architecture/agents/deep-researcher.md b/docs/source/architecture/agents/deep-researcher.md index d35cb0e04..3c5893515 100644 --- a/docs/source/architecture/agents/deep-researcher.md +++ b/docs/source/architecture/agents/deep-researcher.md @@ -236,11 +236,11 @@ for configuration details. functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_llm - source_router_llm: nemotron_super_llm - planner_llm: nemotron_llm - researcher_llm: nemotron_llm - writer_llm: nemotron_super_llm + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm enable_source_router: true enable_citation_verification: true max_research_concurrency: 6 @@ -261,7 +261,7 @@ similarly centralized and validated before shared-state mutation. See the for all enforced ceilings. ```{note} -**Hosted Endpoint Availability:** Nemotron Super (`nvidia/nemotron-3-super-120b-a12b`) and Nemotron Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their hosted endpoints can have limited availability during high demand (HTTP 429/503 responses). The default configs use Nemotron Super for the `writer_llm` role and Nemotron Ultra for the other deep-research roles. For production deployments requiring consistent throughput, refer to the model-specific [self-hosting guidance](../../resources/troubleshooting.md#nemotron-super-and-ultra--hosted-endpoint-availability). +**Hosted Endpoint Availability:** The default deep researcher uses Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) for every role, including `writer_llm`. Shared hosted endpoints can have limited availability during high demand (HTTP 429/503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). ``` ## Prompt Templates diff --git a/docs/source/customization/configuration-reference.md b/docs/source/customization/configuration-reference.md index afc593cc3..e06d753b1 100644 --- a/docs/source/customization/configuration-reference.md +++ b/docs/source/customization/configuration-reference.md @@ -92,32 +92,34 @@ and the [Observability](../deployment/observability.md) guide for: ## `llms` Section -Defines named LLM instances. Each entry gets a user-chosen key (for example, `nemotron_super_llm`) that agents reference. +Defines named LLM instances. Each entry gets a user-chosen key (for example, `nemotron_ultra_llm`) that agents reference. ```yaml llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 - top_p: 0.3 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false ``` | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `_type` | `str` | **required** | LLM provider type. Use `nim` for NVIDIA NIM endpoints, `openai` for OpenAI-compatible endpoints. | -| `model_name` | `str` | **required** | Model identifier (for example, `nvidia/nemotron-3-super-120b-a12b`, `azure/openai/gpt-4.1-mini`). | +| `model_name` | `str` | **required** | Model identifier (for example, `nvidia/nemotron-3-ultra-550b-a55b`, `azure/openai/gpt-4.1-mini`). | | `base_url` | `str` | `None` | API endpoint URL. Should always be set explicitly for NVIDIA NIM endpoints. | | `api_key` | `str` | -- | API key. If omitted, uses `NVIDIA_API_KEY` from the environment. | | `temperature` | `float` | `None` | Sampling temperature. Lower values produce more deterministic output. When `None`, the API uses its server-side default. | | `top_p` | `float` | `None` | Nucleus sampling threshold. When `None`, the API uses its server-side default. | | `max_tokens` | `int` | `300` | Maximum tokens in the response. Set higher values (for example, `16384` or `128000`) for research agents. | | `num_retries` | `int` | `5` | Number of retry attempts on API failure. | +| `parallel_tool_calls` | `bool` | Provider default | Whether the provider can emit parallel tool calls. The default Nano profile sets this to `false`. | | `chat_template_kwargs` | `object` | -- | Extra arguments passed to the chat template. Use `enable_thinking: true` to activate the model's chain-of-thought reasoning. | ### Common LLM Configurations @@ -126,10 +128,11 @@ Different agents benefit from different parameter profiles: | Role | Temperature | Top-p | Max Tokens | Notes | |------|------------|-------|------------|-------| -| Intent classifier | `0.5` | `0.9` | `4096` | Moderate creativity for classification | -| Shallow researcher | `0.1` | `0.3` | `16384` | Low temperature for factual accuracy | -| Deep research orchestrator | `1.0` | `1.0` | `128000` | High temperature with thinking enabled for deep reasoning | -| Summary LLM | `0.3` | -- | `100` | Conservative, short output for document summaries | +| Intent classifier (Nano) | `0.1` | `0.9` | `1024` | Short deterministic classification; thinking disabled | +| Shallow researcher (Nano) | `0.2` | `0.9` | `8192` | Tool-calling fast path; parallel tool calls and thinking disabled | +| Deep research roles (Ultra) | `0.2` | `0.7` | `16384` | Source routing, orchestration, planning, and research | +| Deep research writer (Ultra) | `0.2` | `0.7` | `32768` | Larger report-writing budget | +| Summary LLM (Gemma) | `0.1` | -- | `100` | Conservative, short document summaries | --- @@ -329,7 +332,7 @@ functions: opensearch_aws_service: ${OPENSEARCH_AWS_SERVICE:-aoss} opensearch_index_prefix: ${OPENSEARCH_INDEX_PREFIX:-aiq} opensearch_ingestion_mode: ${OPENSEARCH_INGESTION_MODE:-auto} - embed_model: ${AIQ_EMBED_MODEL:-nvidia/llama-nemotron-embed-vl-1b-v2} + embed_model: ${AIQ_EMBED_MODEL:-nvidia/nemotron-3-embed-1b} ``` | Parameter | Type | Default | Description | @@ -362,7 +365,7 @@ functions: | `opensearch_ingestion_mode` | `str` | `local` | Ingestion executor: `local`, `dask`, or `auto`. `auto` uses Dask only when a scheduler address is configured. | | `opensearch_dask_scheduler_address` | `str` | `None` | Dask scheduler for distributed ingestion. Also reads `NAT_DASK_SCHEDULER_ADDRESS`. | | `opensearch_dask_file_transfer` | `str` | `bytes` | Send uploads to Dask workers as `bytes` or shared filesystem `paths`. | -| `embed_model` | `str` | `nvidia/llama-nemotron-embed-vl-1b-v2` | Embedding model for OpenSearch and Azure AI Search ingestion and retrieval. | +| `embed_model` | `str` | `nvidia/nemotron-3-embed-1b` | Embedding model for OpenSearch and Azure AI Search ingestion and retrieval. | | `embed_base_url` | `str` | `https://integrate.api.nvidia.com/v1` | OpenAI-compatible embeddings endpoint for OpenSearch and Azure AI Search. | Refer to [Knowledge Layer](./knowledge-layer.md) for backend selection and the @@ -376,7 +379,7 @@ Classifies user queries as meta (conversational) or research, and determines res functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm tools: - web_search_tool - paper_search_tool @@ -451,11 +454,11 @@ batches those queries for researcher workers and delegates final synthesis to th functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_super_llm - source_router_llm: nemotron_super_llm - researcher_llm: nemotron_super_llm - planner_llm: nemotron_super_llm - writer_llm: nemotron_super_llm + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm # tools omitted -> inherit every tool in data_source_registry exclude_tools: - web_search_tool @@ -585,38 +588,55 @@ general: # LLM definitions llms: - intent_llm: # Used by intent classifier + nano_intent_llm: # Used by intent classifier _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - research_llm: # Used by shallow researcher + clarifier + nano_agent_llm: # Used by shallow researcher _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 - top_p: 0.3 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 + num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false + + ultra_llm: # Used by clarifier and deep research + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - deep_llm: # Used by deep research orchestrator + ultra_writer_llm: # Used by deep research writer _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 128000 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false # Tools and agents functions: @@ -637,14 +657,14 @@ functions: intent_classifier: # Classifies queries, routes depth _type: intent_classifier - llm: intent_llm + llm: nano_intent_llm tools: - web_search_tool - paper_search_tool clarifier_agent: # Asks clarifying questions for deep research _type: clarifier_agent - llm: research_llm + llm: ultra_llm tools: - web_search_tool max_turns: 3 @@ -652,7 +672,7 @@ functions: shallow_research_agent: # Fast single-pass research _type: shallow_research_agent - llm: research_llm + llm: nano_agent_llm tools: - web_search_tool max_llm_turns: 10 @@ -660,10 +680,11 @@ functions: deep_research_agent: # Multi-phase deep research _type: deep_research_agent - orchestrator_llm: deep_llm - researcher_llm: research_llm - source_router_llm: research_llm - writer_llm: deep_llm + orchestrator_llm: ultra_llm + researcher_llm: ultra_llm + source_router_llm: ultra_llm + planner_llm: ultra_llm + writer_llm: ultra_writer_llm tools: - paper_search_tool - advanced_web_search_tool diff --git a/docs/source/customization/knowledge-layer.md b/docs/source/customization/knowledge-layer.md index 400a889b4..ec60414f9 100644 --- a/docs/source/customization/knowledge-layer.md +++ b/docs/source/customization/knowledge-layer.md @@ -112,7 +112,7 @@ functions: # Summarization options (optional, all backends): # generate_summary: true # Generate one-sentence summary per document - # summary_model: nemotron_super_llm # LLM reference from llms: section (required if generate_summary is true) + # summary_model: summary_llm # LLM reference from llms: section (required if generate_summary is true) # summary_db: sqlite+aiosqlite:///./summaries.db # Summary storage (SQLite or PostgreSQL) # Backend-specific options (each backend uses different fields): @@ -126,7 +126,7 @@ functions: # opensearch_auth_type: none # none, basic, or sigv4 # opensearch_index_prefix: aiq # opensearch_ingestion_mode: local # local, dask, or auto - # embed_model: nvidia/llama-nemotron-embed-vl-1b-v2 + # embed_model: nvidia/nemotron-3-embed-1b ``` You can also use environment variable substitution in YAML for deployment-specific values: @@ -250,7 +250,7 @@ functions: opensearch_embedding_dim: ${OPENSEARCH_EMBEDDING_DIM:-2048} opensearch_ingestion_mode: ${OPENSEARCH_INGESTION_MODE:-auto} opensearch_dask_scheduler_address: ${NAT_DASK_SCHEDULER_ADDRESS:-} - embed_model: ${AIQ_EMBED_MODEL:-nvidia/llama-nemotron-embed-vl-1b-v2} + embed_model: ${AIQ_EMBED_MODEL:-nvidia/nemotron-3-embed-1b} embed_base_url: ${AIQ_EMBED_BASE_URL:-https://integrate.api.nvidia.com/v1} ``` @@ -280,7 +280,7 @@ All options below can be overridden via environment variables: | Variable | Default | Description | |----------|---------|-------------| | **Embedding** | | | -| `AIQ_EMBED_MODEL` | `nvidia/llama-nemotron-embed-vl-1b-v2` | NVIDIA embedding model | +| `AIQ_EMBED_MODEL` | `nvidia/nemotron-3-embed-1b` | NVIDIA embedding model | | `AIQ_EMBED_BASE_URL` | `https://integrate.api.nvidia.com/v1` | Embedding API base URL — override for local NIM | | `OPENSEARCH_EMBEDDING_DIM` | `2048` | OpenSearch vector dimension; must equal the selected embedding model's output length before index creation | | **Extraction Flags** | | | @@ -288,7 +288,7 @@ All options below can be overridden via environment variables: | `AIQ_EXTRACT_IMAGES` | `false` | Extract and caption images with VLM | | `AIQ_EXTRACT_CHARTS` | `false` | Classify images as charts and extract structured data | | **Vision Model** | | | -| `AIQ_VLM_MODEL` | `nvidia/nemotron-nano-12b-v2-vl` | VLM for image captioning | +| `AIQ_VLM_MODEL` | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | VLM for image captioning | | `AIQ_VLM_BASE_URL` | `https://integrate.api.nvidia.com/v1` | VLM API base URL — override for local NIM | When enabled, the startup log shows the active mode: @@ -307,7 +307,7 @@ Document summaries help research agents understand what files are available befo llms: summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" temperature: 0.3 max_tokens: 150 diff --git a/docs/source/customization/mcp-tools.md b/docs/source/customization/mcp-tools.md index d2597d6d1..7af2d10e0 100644 --- a/docs/source/customization/mcp-tools.md +++ b/docs/source/customization/mcp-tools.md @@ -114,7 +114,7 @@ Use `exclude_tools` to specialize individual agents: functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm exclude_tools: - mcp_financial_tools__expensive_long_running_tool ``` diff --git a/docs/source/customization/swapping-models.md b/docs/source/customization/swapping-models.md index 5321438ef..3bbf99ac2 100644 --- a/docs/source/customization/swapping-models.md +++ b/docs/source/customization/swapping-models.md @@ -10,32 +10,37 @@ LLMs are defined in the `llms` section and referenced by agents and tools. You c ```yaml llms: - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false ``` **Example: NIM with thinking (for example, for deep research)** ```yaml llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 128000 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 chat_template_kwargs: - enable_thinking: true + enable_thinking: false ``` -**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_super_llm`, `llm: nemotron_super_llm`). Use different keys in `llms` and point agents at them to swap models per role. +**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_ultra_llm`, `llm: nemotron_nano_agent_llm`). Use different keys in `llms` and point agents at them to swap models per role. ## Using Downloadable NIMs (Self-Hosted) @@ -50,63 +55,65 @@ Browse available NIMs at [build.nvidia.com](https://build.nvidia.com/explore/dis ```bash # Example: run Nemotron on port 8080 docker run --gpus all -p 8080:8000 \ - nvcr.io/nim/nvidia/nemotron-3-super-120b-a12b:latest + nvcr.io/nim/nvidia/nemotron-3-ultra-550b-a55b:latest ``` Refer to the [NIM documentation](https://docs.nvidia.com/nim/) for GPU requirements, environment variables, and multi-GPU setup. ### 3. Update Your Config -Change `base_url` to point to your local NIM instance instead of the hosted API. The `model_name` stays the same. You can remove `api_key` since local NIMs typically don't require one. +Change `base_url` to point to your local NIM instance instead of the hosted API. Use the model identifier returned by the local NIM's `/v1/models` endpoint; it can differ from the hosted API identifier. You can remove `api_key` since local NIMs typically don't require one. ```yaml llms: - nemotron_super_llm: + local_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "http://localhost:8080/v1" # local NIM - temperature: 0.7 - max_tokens: 8192 + temperature: 0.2 + max_tokens: 16384 num_retries: 5 ``` ```{note} -**Hosted Endpoint Availability:** Nemotron Super (`nvidia/nemotron-3-super-120b-a12b`) and Nemotron Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). The default configs use Nemotron Super for intent classification, shallow research, and deep-research writing, and Nemotron Ultra for the other deep-research roles. For production deployments requiring consistent throughput, refer to the model-specific [self-hosting guidance](../resources/troubleshooting.md#nemotron-super-and-ultra--hosted-endpoint-availability). +**Hosted Endpoint Availability:** The default profiles use Nemotron Nano 3.5 Preview for intent and shallow research, and Nemotron 3 Ultra for clarification and every deep-research role. Shared hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). ``` -You can mix hosted and local NIMs in the same config -- for example, use a local NIM for the high-volume shallow researcher and a hosted NIM for the orchestrator: +You can mix hosted and local NIMs in the same config -- for example, use hosted Nano for the shallow researcher and a local downloadable Ultra NIM for deep research: ```yaml llms: - local_llm: + hosted_nano_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b - base_url: "http://localhost:8080/v1" - temperature: 0.7 + model_name: nvidia/nemotron-nano-3.5-preview + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 max_tokens: 8192 + parallel_tool_calls: false - hosted_llm: + local_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b - base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - max_tokens: 128000 + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "http://localhost:8080/v1" + temperature: 0.2 + max_tokens: 16384 functions: shallow_research_agent: _type: shallow_research_agent - llm: local_llm # fast, local inference + llm: hosted_nano_llm # ... deep_research_agent: _type: deep_research_agent - orchestrator_llm: hosted_llm # hosted for deep thinking + orchestrator_llm: local_ultra_llm # ... ``` ## NVIDIA Hosted API Considerations -The default configs use `https://integrate.api.nvidia.com/v1`, which is NVIDIA's developer-facing hosted NIM API. This service is convenient for getting started but has limitations that matter for production use and long-running evaluations. +The default configs use `https://integrate.api.nvidia.com/v1`, NVIDIA API Catalog's OpenAI-compatible endpoint. This service is convenient for getting started but has limitations that matter for production use and long-running evaluations. ### Known Limitations @@ -115,7 +122,7 @@ The default configs use `https://integrate.api.nvidia.com/v1`, which is NVIDIA's Models served through `integrate.api.nvidia.com` are subject to change: - Model versions may be updated or deprecated without notice -- Partner-hosted models (for example, `openai/gpt-oss-120b`) depend on third-party availability and may be removed from the NVIDIA-hosted endpoint +- Preview model identifiers can change when a model reaches general availability - Check [build.nvidia.com](https://build.nvidia.com/explore/discover) for current model availability and changelogs ### Mitigation Strategies diff --git a/docs/source/customization/tools-and-sources.md b/docs/source/customization/tools-and-sources.md index e0412b604..e0ff0bdd3 100644 --- a/docs/source/customization/tools-and-sources.md +++ b/docs/source/customization/tools-and-sources.md @@ -137,7 +137,7 @@ functions: # Agents with no tools list inherit all registry tools intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm clarifier_agent: _type: clarifier_agent diff --git a/docs/source/deployment/aws-opensearch-serverless.md b/docs/source/deployment/aws-opensearch-serverless.md index bc6ba8309..7cafc1f4c 100644 --- a/docs/source/deployment/aws-opensearch-serverless.md +++ b/docs/source/deployment/aws-opensearch-serverless.md @@ -331,11 +331,11 @@ values: ```yaml AIQ_EMBED_BASE_URL: http://nim-embedqa.ns-nim.svc.cluster.local:8000/v1 - AIQ_EMBED_MODEL: nvidia/llama-nemotron-embed-vl-1b-v2 + AIQ_EMBED_MODEL: nvidia/nemotron-3-embed-1b ``` The embedding model dimension must match `OPENSEARCH_EMBEDDING_DIM` in the workflow config -(default `2048` for `nvidia/llama-nemotron-embed-vl-1b-v2`). Mismatched dimensions surface +(default `2048` for `nvidia/nemotron-3-embed-1b`). Mismatched dimensions surface as `mapper_parsing_exception` on the first ingest. ```bash diff --git a/docs/source/evaluation/benchmarks/deepsearch-qa.md b/docs/source/evaluation/benchmarks/deepsearch-qa.md index 6ddee33d6..f964d6cc0 100644 --- a/docs/source/evaluation/benchmarks/deepsearch-qa.md +++ b/docs/source/evaluation/benchmarks/deepsearch-qa.md @@ -78,4 +78,4 @@ Results are written to `frontends/benchmarks/deepsearch_qa/results` (or the `out | Config | Description | |--------|-------------| -| `configs/config_deepsearch_qa.yml` | Default: Nemotron on integrate.api, OpenAI judge. Use for quickstart. | +| `configs/config_deepsearch_qa.yml` | Default: Nemotron Ultra on NVIDIA API Catalog, OpenAI judge. Use for quickstart. | diff --git a/docs/source/examples/cli-with-local-nims.md b/docs/source/examples/cli-with-local-nims.md index e2a01c5c9..93438d02b 100644 --- a/docs/source/examples/cli-with-local-nims.md +++ b/docs/source/examples/cli-with-local-nims.md @@ -11,7 +11,7 @@ This example is based on `configs/config_cli_default.yml` with modifications to ## Prerequisites -You need Docker and NVIDIA GPUs with sufficient VRAM to run the NIM containers. Check the Nemotron Super model card and support matrix for current self-hosted hardware requirements. +You need Docker and NVIDIA GPUs with sufficient VRAM to run the NIM containers. Check the downloadable Nemotron 3 Ultra model card and support matrix for current self-hosted hardware requirements. The hosted default profile uses Nemotron Nano 3.5 Preview for intent and shallow research, but preview endpoint availability does not imply that a matching downloadable NIM image is available. ## Running NIM Containers @@ -25,7 +25,7 @@ docker run -d \ --gpus all \ -p 8001:8000 \ -e NVIDIA_API_KEY="${NVIDIA_API_KEY}" \ - nvcr.io/nim/nvidia/nemotron-3-super-120b-a12b:latest + nvcr.io/nim/nvidia/nemotron-3-ultra-550b-a55b:latest ``` Verify the model is ready: @@ -34,18 +34,6 @@ Verify the model is ready: curl http://localhost:8001/v1/models ``` -For multi-model setups (for example, separate intent and research models), run additional containers on different ports: - -```bash -# Smaller model for intent classification -docker run -d \ - --name nemotron-mini-nim \ - --gpus '"device=1"' \ - -p 8002:8000 \ - -e NVIDIA_API_KEY="${NVIDIA_API_KEY}" \ - nvcr.io/nim/nvidia/nemotron-mini-4b-instruct:latest -``` - ## Configuration ```yaml @@ -72,27 +60,28 @@ general: # instead of integrate.api.nvidia.com. No NVIDIA_API_KEY is needed for # inference (only for pulling the container image). llms: - nemotron_llm_intent: + local_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + # Use the identifier returned by this local NIM's /v1/models endpoint. + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "http://localhost:8001/v1" # <-- Local NIM - temperature: 0.5 - top_p: 0.9 - max_tokens: 4096 + temperature: 0.2 + top_p: 0.7 + max_tokens: 16384 num_retries: 3 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + local_ultra_writer_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "http://localhost:8001/v1" # <-- Local NIM - temperature: 0.1 - top_p: 0.3 - max_tokens: 16384 + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 num_retries: 3 chat_template_kwargs: - enable_thinking: true + enable_thinking: false # =========================================================================== # Functions @@ -115,14 +104,14 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: local_ultra_llm tools: - web_search_tool - paper_search_tool clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: local_ultra_llm tools: - web_search_tool max_turns: 3 @@ -131,7 +120,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: local_ultra_llm tools: - web_search_tool max_llm_turns: 10 @@ -139,7 +128,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_super_llm + orchestrator_llm: local_ultra_llm + source_router_llm: local_ultra_llm + planner_llm: local_ultra_llm + researcher_llm: local_ultra_llm + writer_llm: local_ultra_writer_llm tools: - paper_search_tool - advanced_web_search_tool @@ -203,7 +196,7 @@ The CLI script starts an interactive session. Type your research query and the s ## Tips for Local NIMs - **GPU memory**: Monitor with `nvidia-smi`. Size GPUs for the - `nvidia/nemotron-3-super-120b-a12b` NIM using the model card and support matrix. + `nvidia/nemotron-3-ultra-550b-a55b` NIM using the model card and support matrix. - **Startup time**: NIM containers take 2--5 minutes to load the model on first start. Wait until `/v1/models` returns a response. - **Multiple GPUs**: Use `--gpus '"device=0,1"'` to spread across GPUs, or run separate containers per GPU for different model roles. - **Networking**: If running inside Docker Compose, use container names instead of `localhost` for `base_url`. diff --git a/docs/source/examples/full-pipeline-llamaindex.md b/docs/source/examples/full-pipeline-llamaindex.md index 98f5c60df..80ae4d664 100644 --- a/docs/source/examples/full-pipeline-llamaindex.md +++ b/docs/source/examples/full-pipeline-llamaindex.md @@ -43,35 +43,63 @@ general: # LLMs # =========================================================================== llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 - top_p: 0.3 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 + num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false # LLM for document summaries (shown in the UI after upload) summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.3 + temperature: 0.1 max_tokens: 100 # =========================================================================== @@ -112,7 +140,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm verbose: true tools: - web_search_tool @@ -121,7 +149,7 @@ functions: clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm tools: - web_search_tool - knowledge_search @@ -131,7 +159,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm verbose: true tools: - web_search_tool @@ -141,7 +169,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_super_llm + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm verbose: true tools: # - paper_search_tool # Uncomment if SERPER_API_KEY is set diff --git a/docs/source/examples/full-pipeline-web.md b/docs/source/examples/full-pipeline-web.md index e33c11217..250a9add8 100644 --- a/docs/source/examples/full-pipeline-web.md +++ b/docs/source/examples/full-pipeline-web.md @@ -60,32 +60,59 @@ general: # =========================================================================== # LLMs # =========================================================================== -# Three LLM configurations for different roles: -# - Intent classification (moderate creativity for routing decisions) -# - Research (low temperature for factual output) -# - Deep research orchestrator (high temperature for diverse planning) +# Role-specific LLM configurations: +# - Nano for intent classification and shallow research +# - Ultra for clarification and every deep-research role llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 # Moderate: needs to reason about intent + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 top_p: 0.9 - max_tokens: 4096 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 # Low: factual research output - top_p: 0.3 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 + num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false + + nemotron_ultra_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false # =========================================================================== # Functions (tools and agents) @@ -130,7 +157,7 @@ functions: # Has access to tools for context-aware routing decisions. intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm tools: - web_search_tool - paper_search_tool @@ -143,7 +170,7 @@ functions: # deep_research_agent. clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm tools: - web_search_tool - knowledge_search @@ -157,7 +184,7 @@ functions: # Single-turn ReAct agent for quick queries. shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm tools: - web_search_tool - knowledge_search @@ -171,7 +198,11 @@ functions: # and synthesizes comprehensive reports. deep_research_agent: _type: deep_research_agent - orchestrator_llm: nemotron_super_llm + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm tools: - paper_search_tool - advanced_web_search_tool diff --git a/docs/source/examples/hybrid-frontier-model.md b/docs/source/examples/hybrid-frontier-model.md index 428054836..34b3d5e97 100644 --- a/docs/source/examples/hybrid-frontier-model.md +++ b/docs/source/examples/hybrid-frontier-model.md @@ -19,18 +19,30 @@ This example uses NVIDIA NIM models for intent classification and shallow resear ```yaml llms: # NIM models for fast paths (intent + shallow) - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.5 - max_tokens: 4096 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 + max_tokens: 1024 + parallel_tool_calls: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + max_tokens: 8192 + parallel_tool_calls: false + + nemotron_ultra_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 max_tokens: 16384 # Frontier model for deep research (higher quality) @@ -61,14 +73,14 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm tools: - web_search_tool - knowledge_search clarifier_agent: _type: clarifier_agent - llm: nemotron_super_llm + llm: nemotron_ultra_llm tools: - web_search_tool - knowledge_search @@ -76,7 +88,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm tools: - web_search_tool - knowledge_search diff --git a/docs/source/examples/minimal-shallow-only.md b/docs/source/examples/minimal-shallow-only.md index b2a0f1880..a67fcab33 100644 --- a/docs/source/examples/minimal-shallow-only.md +++ b/docs/source/examples/minimal-shallow-only.md @@ -25,20 +25,21 @@ general: # --------------------------------------------------------------------------- # LLMs # --------------------------------------------------------------------------- -# A single LLM is sufficient for shallow research. The NIM type connects to -# NVIDIA's hosted inference endpoint. Adjust temperature for creativity vs -# factuality trade-off. +# A single Nano LLM is sufficient for shallow research. The NIM type connects +# to NVIDIA API Catalog. llms: research_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.1 # Low temperature for factual research - top_p: 0.3 - max_tokens: 16384 # Max output length per LLM call + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 # Max output length per LLM call num_retries: 5 # Retry on transient API failures + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true # Enable chain-of-thought reasoning + enable_thinking: false # --------------------------------------------------------------------------- # Tools diff --git a/docs/source/extending/adding-a-tool.md b/docs/source/extending/adding-a-tool.md index 959104d1e..d548d0879 100644 --- a/docs/source/extending/adding-a-tool.md +++ b/docs/source/extending/adding-a-tool.md @@ -279,7 +279,7 @@ Reference your tool in any workflow configuration: llms: research_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b functions: my_search: diff --git a/docs/source/get-started/installation.md b/docs/source/get-started/installation.md index d7890cb64..58f671e42 100644 --- a/docs/source/get-started/installation.md +++ b/docs/source/get-started/installation.md @@ -25,12 +25,11 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent classifier, shallow researcher, deep-research writer) | `nvidia/nemotron-3-super-120b-a12b` | [Nemotron 3 Super model card](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b/modelcard) | -| LLM (deep-research source router, orchestrator, planner, researcher) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra model card](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b/modelcard) | -| LLM (deep research orchestrator/planner, optional) | `openai/gpt-oss-120b` | [GPT OSS model card](https://build.nvidia.com/openai/gpt-oss-120b/modelcard) | -| Document summary (optional) | `nvidia/nemotron-mini-4b-instruct` | [Nemotron Mini 4B](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct/) | -| Text embedding | `nvidia/llama-nemotron-embed-vl-1b-v2` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | -| VLM (image/chart extraction, optional) | `nvidia/nemotron-nano-12b-v2-vl` | [Nemotron Nano VLM model card](https://build.nvidia.com/nvidia/nemotron-nano-12b-v2-vl/modelcard) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-nano-3.5-preview` | [Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) | +| LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | +| Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | +| Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | +| VLM (image/chart extraction, optional) | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | [Nemotron 3 Nano Omni](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) | | Knowledge layer (Foundational RAG, optional) | -- | [RAG Blueprint support matrix](https://docs.nvidia.com/rag/latest/support-matrix.html) | ## Automated Setup (Recommended) diff --git a/docs/source/profiling/index.md b/docs/source/profiling/index.md index 417b0a44b..427ad4944 100644 --- a/docs/source/profiling/index.md +++ b/docs/source/profiling/index.md @@ -145,10 +145,13 @@ tokenomics: "azure/openai/gpt-5.2": input_per_1m_tokens: 2.50 output_per_1m_tokens: 10.00 - "nvidia/nemotron-3-super-120b-a12b": - input_per_1m_tokens: 0.12 - output_per_1m_tokens: 0.50 - cached_input_per_1m_tokens: 0.10 # optional: omit to bill cached tokens at full input rate + # Illustrative market-equivalent rates; verify current provider pricing. + "nvidia/nemotron-3-ultra-550b-a55b": + input_per_1m_tokens: 0.60 + output_per_1m_tokens: 3.60 + "nvidia/nemotron-nano-3.5-preview": + input_per_1m_tokens: 0.05 + output_per_1m_tokens: 0.20 tools: # Key "web_search" matches "advanced_web_search_tool" via substring lookup "web_search": diff --git a/docs/source/resources/troubleshooting.md b/docs/source/resources/troubleshooting.md index 33512f223..5de838fda 100644 --- a/docs/source/resources/troubleshooting.md +++ b/docs/source/resources/troubleshooting.md @@ -35,57 +35,45 @@ Common issues and solutions for the AI-Q blueprint. | Issue | Cause | Fix | |-------|-------|-----| | Agent hangs on deep research | LLM timeout or rate limit | Set `verbose: true` in config to see progress; check LLM API availability and rate limits | -| HTTP 429 or 503 on deep research | Nemotron Super or Nemotron Ultra hosted endpoint availability | Retry after a short delay, reduce concurrency, or follow the [model-specific self-hosting guidance](#nemotron-super-and-ultra--hosted-endpoint-availability) for consistent throughput | +| HTTP 429 or 503 on deep research | Nemotron hosted endpoint availability | Retry after a short delay, reduce concurrency, or follow the [self-hosting guidance](#nemotron-hosted-endpoint-availability) for consistent throughput | | Shallow research returns generic answers | Insufficient tool calls | Increase `max_tool_iterations` (default: 5) | | Clarifier keeps asking questions | Too many clarification turns | Reduce `max_turns`, or set `enable_clarifier: false` in the workflow to disable clarification | | SSE stream disconnects | Network timeout | Client auto-reconnects using `last_event_id`; refer to [Data Flow](../architecture/data-flow.md) | | Job status stuck on RUNNING | Dask worker crashed | Check Dask logs; the ghost job reaper will eventually mark it FAILURE | | OpenShell setup, attestation, readiness, or deletion fails | Gateway, version, policy/config, image, or service-owner mismatch | Follow the canonical [OpenShell inspection and troubleshooting guide](../deployment/openshell.md#inspection-and-troubleshooting) | -## Nemotron Super and Ultra — Hosted Endpoint Availability +## Nemotron Hosted Endpoint Availability -Nemotron Super (`nvidia/nemotron-3-super-120b-a12b`) and Nemotron Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their NVIDIA-hosted endpoints can have limited availability during high demand. During peak periods you may observe: +Nemotron Nano 3.5 Preview (`nvidia/nemotron-nano-3.5-preview`) and Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their NVIDIA-hosted endpoints can have limited availability during high demand. During peak periods you may observe: - Elevated latency or timeouts on LLM inference calls - HTTP 429 (rate-limited) or 503 (service unavailable) responses from the Build API - Degraded agent workflow performance due to upstream model availability -**Default Configuration:** The default configs use Nemotron Super (`nvidia/nemotron-3-super-120b-a12b`) for intent classification, shallow research, and deep-research writing, and Nemotron Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) for the other deep-research roles. If hosted endpoints are saturated, retry after a short delay, reduce concurrency, or self-host for consistent throughput. +**Default Configuration:** The default configs use Nemotron Nano 3.5 Preview for intent classification and shallow research, and Nemotron 3 Ultra for clarification and all deep-research roles. If hosted endpoints are saturated, retry after a short delay, reduce concurrency, or self-host a downloadable model for consistent throughput. ### Recommended Mitigation: Self-Host the Affected Model -For production and staging deployments that require consistent throughput and low-latency inference, self-host the affected model with NVIDIA NIM rather than relying on shared endpoints: +For production and staging deployments that require consistent throughput and low-latency inference, self-host a downloadable NVIDIA NIM rather than relying on shared endpoints. Preview endpoint availability and downloadable NIM availability do not necessarily move in lockstep; verify the current model card before choosing an image. -- [Self-host Nemotron Super](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b?nim=self-hosted) -- [Self-host Nemotron Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b?nim=self-hosted) +- [Self-host Nemotron 3 Ultra 550B A55B](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b?nim=self-hosted) Once your self-hosted endpoint is running, update the corresponding `base_url` in your config to point at it: ```yaml llms: - nemotron_super_llm: - _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b - base_url: "https:///v1" - api_key: "" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 - num_retries: 5 - chat_template_kwargs: - enable_thinking: true - - nemotron_ultra_llm: + local_ultra_llm: _type: nim + # Use the identifier returned by the local NIM's /v1/models endpoint. model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https:///v1" api_key: "" - temperature: 0.7 + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false ``` ## Knowledge Layer Issues diff --git a/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench.yml b/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench.yml index 0ccdeb8c2..13242e217 100644 --- a/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench.yml +++ b/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench.yml @@ -18,37 +18,29 @@ general: use_uvloop: true llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_ultra_llm: + nemotron_ultra_writer_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true - - gpt_oss_llm: - _type: nim - model_name: openai/gpt-oss-120b - base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 256000 - api_key: ${NVIDIA_API_KEY} - max_retries: 10 + enable_thinking: false functions: paper_search_tool: @@ -63,11 +55,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: gpt_oss_llm + orchestrator_llm: nemotron_ultra_llm source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm - planner_llm: gpt_oss_llm - writer_llm: nemotron_super_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm max_loops: 2 tools: - paper_search_tool diff --git a/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench_profiling.yml b/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench_profiling.yml index 80aca7bd6..263455318 100644 --- a/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench_profiling.yml +++ b/frontends/benchmarks/deepresearch_bench/configs/config_deep_research_bench_profiling.yml @@ -18,42 +18,29 @@ general: use_uvloop: true llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_ultra_llm: + nemotron_ultra_writer_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true - - openai_gpt_5_2: - _type: openai - model_name: "gpt-5.2" - api_key: ${OPENAI_API_KEY} - - gpt_oss_llm: - _type: nim - model_name: openai/gpt-oss-120b - base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 256000 - api_key: ${NVIDIA_API_KEY} - max_retries: 10 + enable_thinking: false functions: paper_search_tool: @@ -68,11 +55,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: openai_gpt_5_2 + orchestrator_llm: nemotron_ultra_llm source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm planner_llm: nemotron_ultra_llm - writer_llm: nemotron_super_llm + writer_llm: nemotron_ultra_writer_llm max_loops: 2 tools: - paper_search_tool diff --git a/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml b/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml index 887a408f5..f66e54955 100644 --- a/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml +++ b/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml @@ -18,10 +18,14 @@ tokenomics: "gpt-5.2": input_per_1m_tokens: 2.50 output_per_1m_tokens: 10.00 - "nvidia/nemotron-3-super-120b-a12b": - input_per_1m_tokens: 0.12 - output_per_1m_tokens: 0.50 - cached_input_per_1m_tokens: 0.10 + # Market-equivalent examples, not NVIDIA API Catalog billing rates. + # Verify current provider pricing before using these values for accounting. + "nvidia/nemotron-3-ultra-550b-a55b": + input_per_1m_tokens: 0.60 + output_per_1m_tokens: 3.60 + "nvidia/nemotron-nano-3.5-preview": + input_per_1m_tokens: 0.05 + output_per_1m_tokens: 0.20 tools: # Key "web_search" matches "advanced_web_search_tool" via substring lookup. "web_search": diff --git a/frontends/benchmarks/deepsearch_qa/README.md b/frontends/benchmarks/deepsearch_qa/README.md index cd692f560..cd84bebce 100644 --- a/frontends/benchmarks/deepsearch_qa/README.md +++ b/frontends/benchmarks/deepsearch_qa/README.md @@ -74,4 +74,4 @@ Results are written to `frontends/benchmarks/deepsearch_qa/results` (or the `out | Config | Description | |--------|-------------| -| `configs/config_deepsearch_qa.yml` | Default: Nemotron on integrate.api, OpenAI judge. Use for quickstart. | +| `configs/config_deepsearch_qa.yml` | Default: Nemotron Ultra on NVIDIA API Catalog, OpenAI judge. Use for quickstart. | diff --git a/frontends/benchmarks/deepsearch_qa/configs/config_deepsearch_qa.yml b/frontends/benchmarks/deepsearch_qa/configs/config_deepsearch_qa.yml index 93a44293c..038ff6dde 100644 --- a/frontends/benchmarks/deepsearch_qa/configs/config_deepsearch_qa.yml +++ b/frontends/benchmarks/deepsearch_qa/configs/config_deepsearch_qa.yml @@ -1,5 +1,5 @@ # DeepSearch QA Evaluation Configuration -# Uses integrate.api.nvidia.com for agent. Add a judge model (OpenAI or Gemini) and set eval.evaluators.deepsearchqa.llm_name. +# Uses NVIDIA API Catalog for the agent. Add a judge model (OpenAI or Gemini) and set eval.evaluators.deepsearchqa.llm_name. general: telemetry: @@ -14,37 +14,29 @@ general: use_uvloop: true llms: - nemotron_super_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - nemotron_ultra_llm: + nemotron_ultra_writer_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 32768 num_retries: 5 chat_template_kwargs: - enable_thinking: true - - gpt_oss_llm: - _type: nim - model_name: openai/gpt-oss-120b - base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 256000 - api_key: ${NVIDIA_API_KEY} - max_retries: 10 + enable_thinking: false # Judge model: set OPENAI_API_KEY or add a Gemini LLM (base_url + api_key) and set llm_name below. judge_llm: @@ -61,11 +53,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: gpt_oss_llm + orchestrator_llm: nemotron_ultra_llm source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm - planner_llm: gpt_oss_llm - writer_llm: nemotron_super_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm max_loops: 2 tools: - web_search_tool diff --git a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml index 168859fca..dbf092977 100644 --- a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml +++ b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml @@ -1,5 +1,5 @@ # Deep Agent Workflow Configuration -# Full workflow with intent classification, depth routing, and research agents. Nemotron on integrate.api; add judge (OpenAI or Gemini) for evaluator. +# Full workflow with intent classification, depth routing, and research agents. Nemotron on NVIDIA API Catalog; add judge (OpenAI or Gemini) for evaluator. general: telemetry: @@ -9,48 +9,55 @@ general: level: INFO llms: - nemotron_llm_intent: + nemotron_nano_intent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 8192 + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 + top_p: 0.9 + max_tokens: 1024 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: enable_thinking: false - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 top_p: 0.7 - max_tokens: 65536 + max_tokens: 16384 num_retries: 5 chat_template_kwargs: - enable_thinking: true + enable_thinking: false - gpt_oss_llm: + nemotron_ultra_writer_llm: _type: nim - model_name: openai/gpt-oss-120b + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 1.0 - top_p: 1.0 - max_tokens: 256000 api_key: ${NVIDIA_API_KEY} - max_retries: 10 + temperature: 0.2 + top_p: 0.7 + max_tokens: 32768 + num_retries: 5 + chat_template_kwargs: + enable_thinking: false # Judge model for evaluator: set OPENAI_API_KEY or add a Gemini LLM and set evaluators.freshqa.llm_name. judge_llm: @@ -66,11 +73,11 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_llm_intent + llm: nemotron_nano_intent_llm shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm tools: - web_search_tool max_llm_turns: 10 @@ -79,11 +86,11 @@ functions: deep_research_agent: _type: deep_research_agent - orchestrator_llm: gpt_oss_llm + orchestrator_llm: nemotron_ultra_llm source_router_llm: nemotron_ultra_llm researcher_llm: nemotron_ultra_llm - planner_llm: gpt_oss_llm - writer_llm: nemotron_super_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm max_loops: 2 tools: - web_search_tool diff --git a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml index d89195ae8..0a85dc7cf 100644 --- a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml +++ b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml @@ -1,5 +1,5 @@ # FreshQA shallow-research-only -# Nemotron on integrate.api; add judge (OpenAI or Gemini) for evaluator. +# Nemotron Nano on NVIDIA API Catalog; add judge (OpenAI or Gemini) for evaluator. general: telemetry: @@ -13,16 +13,18 @@ general: project: "AIQ_v2_freshqa" llms: - nemotron_super_llm: + nemotron_nano_agent_llm: _type: nim - model_name: nvidia/nemotron-3-super-120b-a12b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 - top_p: 0.7 - max_tokens: 65536 + api_key: ${NVIDIA_API_KEY} + temperature: 0.2 + top_p: 0.9 + max_tokens: 8192 num_retries: 5 + parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false judge_llm: _type: openai @@ -37,7 +39,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_super_llm + llm: nemotron_nano_agent_llm max_llm_turns: 20 tools: - web_search_tool diff --git a/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts b/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts index c762cbd3e..1661a283f 100644 --- a/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts +++ b/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts @@ -90,7 +90,7 @@ export const mapFunctionToCategory = (functionName: string): IntermediateStepCat * Check if a name represents an LLM model rather than a function/tool. * LLM models typically have format: "provider/org/model-name" or contain slashes. * - * @param name - The name to check (e.g., "nvidia/nvidia/Nemotron-3-Nano-30B-A3B") + * @param name - The name to check (e.g., "nvidia/nemotron-nano-3.5-preview") * @returns True if this appears to be an LLM model name */ export const isLLMModel = (name: string): boolean => { @@ -130,7 +130,7 @@ export const getWorkflowDisplayName = (functionName: string): string => { * Convert a snake_case or special function name to a human-readable display name. * Also handles LLM model names and tool prefixes. * - * @param functionName - The raw function name (e.g., "web_search_tool", "", "nvidia/nvidia/Nemotron-3-Nano-30B-A3B") + * @param functionName - The raw function name (e.g., "web_search_tool", "", "nvidia/nemotron-nano-3.5-preview") * @returns Human-readable name (e.g., "Web Search Tool", "Workflow", "Nemotron 3 Nano 30B") */ export const getDisplayName = (functionName: string): string => { @@ -142,7 +142,7 @@ export const getDisplayName = (functionName: string): string => { return 'Workflow' } - // Handle LLM model names (e.g., "nvidia/nvidia/Nemotron-3-Nano-30B-A3B") + // Handle LLM model names (e.g., "nvidia/nemotron-nano-3.5-preview") if (isLLMModel(functionName)) { const parts = functionName.split('/') const modelName = parts[parts.length - 1] // Take last segment diff --git a/mcp/tests/test_config_and_packaging.py b/mcp/tests/test_config_and_packaging.py index 87761b262..1f788a86e 100644 --- a/mcp/tests/test_config_and_packaging.py +++ b/mcp/tests/test_config_and_packaging.py @@ -82,7 +82,7 @@ def test_public_mcp_config_preserves_reference_orchestration_choices() -> None: assert functions["intent_classifier"]["_type"] == "intent_classifier" assert functions["clarifier_agent"] == { "_type": "clarifier_agent", - "llm": "nemotron_super_llm", + "llm": "nemotron_ultra_llm", "max_turns": 3, "log_response_max_chars": 2000, "verbose": True, diff --git a/mcp/tests/test_preclassification_integration.py b/mcp/tests/test_preclassification_integration.py index 315b5f50e..1b815651b 100644 --- a/mcp/tests/test_preclassification_integration.py +++ b/mcp/tests/test_preclassification_integration.py @@ -27,7 +27,7 @@ from nat.builder.workflow_builder import WorkflowBuilder _REPO_ROOT = Path(__file__).resolve().parents[2] -_INTENT_LLM_NAME = "nemotron_llm_intent" +_INTENT_LLM_NAME = "nemotron_nano_intent_llm" class _CountingIntentLLM: diff --git a/sources/google_scholar_paper_search/README.md b/sources/google_scholar_paper_search/README.md index f9abb8cbb..d6d574127 100644 --- a/sources/google_scholar_paper_search/README.md +++ b/sources/google_scholar_paper_search/README.md @@ -116,7 +116,7 @@ Here is a complete configuration example showing how to integrate the paper sear llms: my_llm: _type: nim - model_name: nvidia/nemotron-3-nano-30b-a3b + model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" temperature: 0.7 diff --git a/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md b/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md index f8d0d50e8..dd03c098e 100644 --- a/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md +++ b/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md @@ -139,14 +139,14 @@ By default, LlamaIndex ingests text only and uses the NVIDIA hosted embedding an | Variable | Default | Description | |----------|---------|-------------| | **Embedding** | | | -| `AIQ_EMBED_MODEL` | `nvidia/llama-nemotron-embed-vl-1b-v2` | NVIDIA embedding model | +| `AIQ_EMBED_MODEL` | `nvidia/nemotron-3-embed-1b` | NVIDIA embedding model | | `AIQ_EMBED_BASE_URL` | `https://integrate.api.nvidia.com/v1` | Embedding API base URL — override for local NIM | | **Extraction Flags** | | | | `AIQ_EXTRACT_TABLES` | `false` | Extract tables from PDFs as markdown using pdfplumber | | `AIQ_EXTRACT_IMAGES` | `false` | Extract embedded images from PDFs and caption them with a VLM | | `AIQ_EXTRACT_CHARTS` | `false` | Classify images as charts and extract structured data (chart type, axis labels, data points) | | **Vision Model** | | | -| `AIQ_VLM_MODEL` | `nvidia/nemotron-nano-12b-v2-vl` | VLM for image captioning | +| `AIQ_VLM_MODEL` | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | VLM for image captioning | | `AIQ_VLM_BASE_URL` | `https://integrate.api.nvidia.com/v1` | VLM API base URL — override for local NIM | You can also set these in `deploy/.env`: @@ -217,7 +217,7 @@ functions: opensearch_auth_type: none opensearch_index_prefix: aiq opensearch_embedding_dim: 2048 - embed_model: nvidia/llama-nemotron-embed-vl-1b-v2 + embed_model: nvidia/nemotron-3-embed-1b embed_base_url: https://integrate.api.nvidia.com/v1 ``` @@ -479,7 +479,7 @@ When `generate_summary: true`, you **must** configure `summary_model` to referen llms: summary_llm: _type: nim - model_name: nvidia/nemotron-mini-4b-instruct + model_name: google/gemma-4-31b-it base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.3 diff --git a/sources/knowledge_layer/src/azure_ai_search/adapter.py b/sources/knowledge_layer/src/azure_ai_search/adapter.py index c28bce0d1..bbbc80c7d 100644 --- a/sources/knowledge_layer/src/azure_ai_search/adapter.py +++ b/sources/knowledge_layer/src/azure_ai_search/adapter.py @@ -89,7 +89,7 @@ def _coerce_config(config: dict[str, Any] | None) -> SimpleNamespace: "endpoint": os.environ.get("AZURE_SEARCH_ENDPOINT"), "api_key": os.environ.get("AZURE_SEARCH_API_KEY"), "embed_base_url": os.environ.get("AIQ_EMBED_BASE_URL") or "https://integrate.api.nvidia.com/v1", - "embed_model": os.environ.get("AIQ_EMBED_MODEL", "nvidia/llama-nemotron-embed-vl-1b-v2"), + "embed_model": os.environ.get("AIQ_EMBED_MODEL", "nvidia/nemotron-3-embed-1b"), "embed_dim": int(os.environ.get("AIQ_EMBED_DIM", "2048")), "collection_name": "default", "cleanup_files": False, diff --git a/sources/knowledge_layer/src/llamaindex/adapter.py b/sources/knowledge_layer/src/llamaindex/adapter.py index cf98df672..563ce6fa3 100644 --- a/sources/knowledge_layer/src/llamaindex/adapter.py +++ b/sources/knowledge_layer/src/llamaindex/adapter.py @@ -24,7 +24,7 @@ Configuration options: persist_dir: Directory for ChromaDB persistence (default: /tmp/chroma_data) - embed_model: NVIDIA embedding model (default: nvidia/llama-nemotron-embed-vl-1b-v2) + embed_model: NVIDIA embedding model (default: nvidia/nemotron-3-embed-1b) embed_base_url: Embedding model base URL (default: https://integrate.api.nvidia.com/v1) chunk_size: Chunk size for text splitting (default: 1024, model supports up to 2048 tokens) chunk_overlap: Overlap between chunks (default: 128) @@ -70,7 +70,7 @@ # Default VLM model for image captioning # nemotron-nano is faster (12B vs 90B) - same as NV-Ingest service mode uses -DEFAULT_VLM_MODEL = os.environ.get("AIQ_VLM_MODEL", "nvidia/nemotron-nano-12b-v2-vl") +DEFAULT_VLM_MODEL = os.environ.get("AIQ_VLM_MODEL", "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning") # Default VLM model base URL DEFAULT_VLM_BASE_URL = os.environ.get("AIQ_VLM_BASE_URL", "https://integrate.api.nvidia.com/v1") @@ -447,7 +447,7 @@ class LlamaIndexIngestor(TTLCleanupMixin, BaseIngestor): Configuration options: persist_dir: ChromaDB persistence directory (default from AIQ_CHROMA_DIR) - embed_model: NVIDIA embedding model name (default: nvidia/llama-nemotron-embed-vl-1b-v2) + embed_model: NVIDIA embedding model name (default: nvidia/nemotron-3-embed-1b) embed_base_url: Embedding model base URL (default: https://integrate.api.nvidia.com/v1) chunk_size: Text chunk size (default: 1024, model supports up to 2048 tokens) chunk_overlap: Chunk overlap (default: 128) @@ -482,10 +482,10 @@ class LlamaIndexIngestor(TTLCleanupMixin, BaseIngestor): # @environment_variable AIQ_EMBED_MODEL # @category Knowledge Layer # @type str - # @default nvidia/llama-nemotron-embed-vl-1b-v2 + # @default nvidia/nemotron-3-embed-1b # @required false # NVIDIA embedding model name for LlamaIndex vector encoding. - DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/llama-nemotron-embed-vl-1b-v2") + DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/nemotron-3-embed-1b") # @environment_variable AIQ_EMBED_BASE_URL # @category Knowledge Layer @@ -528,7 +528,7 @@ def __init__(self, config: dict[str, Any] | None = None): self.persist_dir = self.config.get("persist_dir", self.DEFAULT_PERSIST_DIR) self.embed_base_url = self.config.get("embed_base_url", self.DEFAULT_EMBED_BASE_URL) self.embed_model_name = self.config.get("embed_model", self.DEFAULT_EMBED_MODEL) - # llama-nemotron-embed-vl-1b-v2 supports up to 2048 tokens + # Nemotron 3 Embed 1B supports inputs up to 2048 tokens. self.chunk_size = self.config.get("chunk_size", 1024) self.chunk_overlap = self.config.get("chunk_overlap", 128) @@ -1603,7 +1603,7 @@ class LlamaIndexRetriever(BaseRetriever): # Default configuration from environment variables DEFAULT_PERSIST_DIR = os.environ.get("AIQ_CHROMA_DIR", "/tmp/chroma_data") - DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/llama-nemotron-embed-vl-1b-v2") + DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/nemotron-3-embed-1b") DEFAULT_EMBED_BASE_URL = os.environ.get("AIQ_EMBED_BASE_URL", "https://integrate.api.nvidia.com/v1") # @environment_variable AIQ_RETRIEVER_TOP_K # @category Knowledge Layer diff --git a/sources/knowledge_layer/src/opensearch/adapter.py b/sources/knowledge_layer/src/opensearch/adapter.py index f6a910d8f..bcf4a11f9 100644 --- a/sources/knowledge_layer/src/opensearch/adapter.py +++ b/sources/knowledge_layer/src/opensearch/adapter.py @@ -73,7 +73,7 @@ DEFAULT_INDEX_PREFIX = os.environ.get("OPENSEARCH_INDEX_PREFIX", "aiq") DEFAULT_AWS_REGION = os.environ.get("AWS_REGION") or os.environ.get("AWS_DEFAULT_REGION", "us-east-1") DEFAULT_AWS_SERVICE = os.environ.get("OPENSEARCH_AWS_SERVICE", "aoss") -DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/llama-nemotron-embed-vl-1b-v2") +DEFAULT_EMBED_MODEL = os.environ.get("AIQ_EMBED_MODEL", "nvidia/nemotron-3-embed-1b") DEFAULT_EMBED_BASE_URL = os.environ.get("AIQ_EMBED_BASE_URL", "https://integrate.api.nvidia.com/v1") DEFAULT_VECTOR_FIELD = os.environ.get("OPENSEARCH_VECTOR_FIELD", "embedding") DEFAULT_TEXT_FIELD = os.environ.get("OPENSEARCH_TEXT_FIELD", "content") diff --git a/sources/knowledge_layer/src/register.py b/sources/knowledge_layer/src/register.py index 02948bc24..2c0441a7d 100644 --- a/sources/knowledge_layer/src/register.py +++ b/sources/knowledge_layer/src/register.py @@ -255,7 +255,7 @@ class KnowledgeRetrievalConfig(FunctionBaseConfig, name="knowledge_retrieval"): description="How Dask ingestion workers receive files: bytes or paths.", ) embed_model: str = Field( - default_factory=lambda: _env_value("AIQ_EMBED_MODEL", default="nvidia/llama-nemotron-embed-vl-1b-v2"), + default_factory=lambda: _env_value("AIQ_EMBED_MODEL", default="nvidia/nemotron-3-embed-1b"), description="Embedding model for OpenSearch and Azure AI Search ingestion and retrieval.", ) embed_base_url: str = Field( diff --git a/src/aiq_agent/tokenomics/README.md b/src/aiq_agent/tokenomics/README.md index b5f8a1935..b14ca5de0 100644 --- a/src/aiq_agent/tokenomics/README.md +++ b/src/aiq_agent/tokenomics/README.md @@ -37,13 +37,14 @@ Pricing lives in a YAML file under `tokenomics.pricing`. Prices are in **USD per tokenomics: pricing: models: - "openai/gpt-oss-120b": - input_per_1m_tokens: 1.75 - output_per_1m_tokens: 14.00 - "nvidia/nemotron-3-nano-30b-a3b": - input_per_1m_tokens: 0.12 - output_per_1m_tokens: 0.50 - cached_input_per_1m_tokens: 0.06 # optional — defaults to input price if omitted + # Illustrative market-equivalent rates; verify current provider pricing. + "nvidia/nemotron-3-ultra-550b-a55b": + input_per_1m_tokens: 0.60 + output_per_1m_tokens: 3.60 + "nvidia/nemotron-nano-3.5-preview": + input_per_1m_tokens: 0.05 + output_per_1m_tokens: 0.20 + cached_input_per_1m_tokens: 0.05 # optional — defaults to input price if omitted tools: # Tool name lookup is substring-based: "web_search" matches "advanced_web_search_tool" # and "tavily_search" because the key is a substring of those names. @@ -58,7 +59,7 @@ tokenomics: output_per_1m_tokens: 4.00 ``` -Model name lookup is: exact match → substring match → default. This means a key of `"gpt-oss"` will match a trace model name of `"openai/gpt-oss-120b"`. +Model name lookup is: exact match → substring match → default. This means a key of `"nemotron-3-ultra"` will match a trace model name of `"nvidia/nemotron-3-ultra-550b-a55b"`. Tool name lookup follows the same substring rule. Unknown tools default to $0/call — no error is raised, so you can configure only the costly tools and omit free internal ones. diff --git a/tests/aiq_agent/test_default_model_profiles.py b/tests/aiq_agent/test_default_model_profiles.py new file mode 100644 index 000000000..1347056c2 --- /dev/null +++ b/tests/aiq_agent/test_default_model_profiles.py @@ -0,0 +1,101 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from pathlib import Path + +import pytest +import yaml + +REPO_ROOT = Path(__file__).resolve().parents[2] + +NANO_MODEL = "nvidia/nemotron-nano-3.5-preview" +ULTRA_MODEL = "nvidia/nemotron-3-ultra-550b-a55b" + +CONFIG_GLOBS = ( + "configs/config_*.yml", + "frontends/benchmarks/**/configs/*.yml", +) +CONFIG_PATHS = tuple(sorted(path for pattern in CONFIG_GLOBS for path in REPO_ROOT.glob(pattern))) + +DEPRECATED_REFERENCES = ( + "/".join(("nvidia", "nemotron-3-super-120b-a12b")), + "/".join(("nvidia", "nemotron-3-nano-30b-a3b")), + "/".join(("nvidia", "nemotron-mini-4b-instruct")), + "/".join(("nvidia", "llama-nemotron-embed-vl-1b-v2")), + "/".join(("nvidia", "nemotron-nano-12b-v2-vl")), + "/".join(("openai", "gpt-oss-120b")), + ".".join(("inference-api", "nvidia", "com")), +) +SCANNED_SUFFIXES = { + ".example", + ".ipynb", + ".json", + ".md", + ".py", + ".sh", + ".ts", + ".tsx", + ".yaml", + ".yml", +} +IGNORED_PARTS = { + ".git", + ".mypy_cache", + ".pytest_cache", + ".ruff_cache", + ".venv", + "build", + "dist", + "node_modules", + "results", +} + + +def _load_config(path: Path) -> dict: + return yaml.safe_load(path.read_text(encoding="utf-8")) + + +def _model_for_alias(config: dict, alias: str) -> str: + return config["llms"][alias]["model_name"] + + +@pytest.mark.parametrize("config_path", CONFIG_PATHS, ids=lambda path: str(path.relative_to(REPO_ROOT))) +def test_default_profiles_use_role_appropriate_models(config_path: Path): + config = _load_config(config_path) + functions = config.get("functions", {}) + + for function in functions.values(): + if not isinstance(function, dict): + continue + + function_type = function.get("_type") + if function_type == "intent_classifier": + assert _model_for_alias(config, function["llm"]) == NANO_MODEL + elif function_type == "shallow_research_agent": + assert _model_for_alias(config, function["llm"]) == NANO_MODEL + elif config_path.name != "config_frontier_models.yml" and function_type == "clarifier_agent": + assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL + elif config_path.name != "config_frontier_models.yml" and function_type == "deep_research_agent": + for role in ( + "orchestrator_llm", + "source_router_llm", + "researcher_llm", + "planner_llm", + "writer_llm", + ): + assert _model_for_alias(config, function[role]) == ULTRA_MODEL + + +def test_deprecated_model_and_endpoint_references_are_absent(): + violations: list[str] = [] + + for path in REPO_ROOT.rglob("*"): + if not path.is_file() or path.suffix not in SCANNED_SUFFIXES or IGNORED_PARTS.intersection(path.parts): + continue + + text = path.read_text(encoding="utf-8") + for reference in DEPRECATED_REFERENCES: + if reference in text: + violations.append(f"{path.relative_to(REPO_ROOT)}: {reference}") + + assert not violations, "Deprecated references remain:\n" + "\n".join(violations) diff --git a/tests/knowledge_layer_tests/test_azure_ai_search.py b/tests/knowledge_layer_tests/test_azure_ai_search.py index bad9a364a..5acf4341e 100644 --- a/tests/knowledge_layer_tests/test_azure_ai_search.py +++ b/tests/knowledge_layer_tests/test_azure_ai_search.py @@ -417,7 +417,7 @@ def test_shared_embedding_defaults_match_adapter(monkeypatch): assert str(config.embed_base_url) == "https://integrate.api.nvidia.com/v1" assert adapter_config.embed_base_url == "https://integrate.api.nvidia.com/v1" - assert config.embed_model == "nvidia/llama-nemotron-embed-vl-1b-v2" + assert config.embed_model == "nvidia/nemotron-3-embed-1b" assert config.embed_dim == 2048 assert adapter_config.embed_model == config.embed_model assert adapter_config.embed_dim == config.embed_dim From fc09889b53d19a5a1fe6c14c8888adf5ee4bf9aa Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 14:34:19 -0700 Subject: [PATCH 2/9] optimize Nano 3.5 shallow profile Signed-off-by: Ajay Thorve --- .../assets/config-scaffold.yml | 22 +++++++++++++++---- .secrets.baseline | 4 ++-- configs/config_cli_default.yml | 4 ++-- configs/config_frontier_models.yml | 4 ++-- configs/config_mcp.yml | 4 ++-- configs/config_openshell.yml | 4 ++-- configs/config_web_azure_ai_search.yml | 4 ++-- configs/config_web_default_guardrails.yml | 4 ++-- configs/config_web_default_llamaindex.yml | 4 ++-- configs/config_web_frag.yml | 4 ++-- configs/config_web_frag_mcp_auth.yml | 4 ++-- configs/config_web_opensearch.yml | 4 ++-- docs/source/customization/swapping-models.md | 7 ++++-- .../examples/full-pipeline-llamaindex.md | 4 ++-- docs/source/examples/full-pipeline-web.md | 4 ++-- docs/source/examples/hybrid-frontier-model.md | 3 +++ .../freshqa/configs/config_full_workflow.yml | 4 ++-- .../configs/config_shallow_research_only.yml | 4 ++-- .../shallow_researcher/prompts/researcher.j2 | 8 +++++++ .../agents/shallow_researcher/test_agent.py | 12 ++++++++++ .../aiq_agent/test_default_model_profiles.py | 12 +++++++++- 21 files changed, 87 insertions(+), 37 deletions(-) diff --git a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml index abf33012f..dfa355650 100644 --- a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml +++ b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml @@ -17,17 +17,31 @@ general: # Web/API: copy general.front_end from config_web_default_llamaindex.yml llms: - nano_llm: + nano_intent_llm: + _type: nim + model_name: nvidia/nemotron-nano-3.5-preview + base_url: "https://integrate.api.nvidia.com/v1" + api_key: ${NVIDIA_API_KEY} + temperature: 0.1 + top_p: 0.9 + max_tokens: 1024 + num_retries: 5 + parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: false + + nano_agent_llm: _type: nim model_name: nvidia/nemotron-nano-3.5-preview base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true ultra_llm: _type: nim @@ -58,11 +72,11 @@ functions: intent_classifier: _type: intent_classifier - llm: nano_llm + llm: nano_intent_llm shallow_research_agent: _type: shallow_research_agent - llm: nano_llm + llm: nano_agent_llm deep_research_agent: _type: deep_research_agent diff --git a/.secrets.baseline b/.secrets.baseline index f3f20460b..5e61d8561 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -133,7 +133,7 @@ "filename": "README.md", "hashed_secret": "73140b88094aaf220a03532196b27b58a03c9b09", "is_verified": false, - "line_number": 395 + "line_number": 399 } ], "deploy/.env.example": [ @@ -355,5 +355,5 @@ } ] }, - "generated_at": "2026-08-04T19:06:14Z" + "generated_at": "2026-08-04T21:38:19Z" } diff --git a/configs/config_cli_default.yml b/configs/config_cli_default.yml index 9c7945256..c44488a83 100644 --- a/configs/config_cli_default.yml +++ b/configs/config_cli_default.yml @@ -35,12 +35,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_frontier_models.yml b/configs/config_frontier_models.yml index 7eb2e8434..429668928 100644 --- a/configs/config_frontier_models.yml +++ b/configs/config_frontier_models.yml @@ -69,12 +69,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true gpt_sol_agent_llm: _type: openai diff --git a/configs/config_mcp.yml b/configs/config_mcp.yml index c26ab6b05..0bcdd6168 100644 --- a/configs/config_mcp.yml +++ b/configs/config_mcp.yml @@ -45,12 +45,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_openshell.yml b/configs/config_openshell.yml index edc7a2380..ec84e44e1 100644 --- a/configs/config_openshell.yml +++ b/configs/config_openshell.yml @@ -47,12 +47,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_azure_ai_search.yml b/configs/config_web_azure_ai_search.yml index 301214f1e..c79baa258 100644 --- a/configs/config_web_azure_ai_search.yml +++ b/configs/config_web_azure_ai_search.yml @@ -66,12 +66,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_default_guardrails.yml b/configs/config_web_default_guardrails.yml index e910e6842..aba6d4efb 100644 --- a/configs/config_web_default_guardrails.yml +++ b/configs/config_web_default_guardrails.yml @@ -47,12 +47,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_default_llamaindex.yml b/configs/config_web_default_llamaindex.yml index 077aea58f..d6a7f9b6a 100644 --- a/configs/config_web_default_llamaindex.yml +++ b/configs/config_web_default_llamaindex.yml @@ -66,12 +66,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_frag.yml b/configs/config_web_frag.yml index d60ac73bd..ddbb63420 100644 --- a/configs/config_web_frag.yml +++ b/configs/config_web_frag.yml @@ -68,12 +68,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_frag_mcp_auth.yml b/configs/config_web_frag_mcp_auth.yml index 3f3a4a921..633c4f08d 100644 --- a/configs/config_web_frag_mcp_auth.yml +++ b/configs/config_web_frag_mcp_auth.yml @@ -75,12 +75,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/configs/config_web_opensearch.yml b/configs/config_web_opensearch.yml index cb98a64d8..296e08b7c 100644 --- a/configs/config_web_opensearch.yml +++ b/configs/config_web_opensearch.yml @@ -67,12 +67,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/docs/source/customization/swapping-models.md b/docs/source/customization/swapping-models.md index 3bbf99ac2..4dd22ff4a 100644 --- a/docs/source/customization/swapping-models.md +++ b/docs/source/customization/swapping-models.md @@ -16,12 +16,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true ``` **Example: NIM with thinking (for example, for deep research)** @@ -89,8 +89,11 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 + top_p: 0.7 max_tokens: 8192 parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: true local_ultra_llm: _type: nim diff --git a/docs/source/examples/full-pipeline-llamaindex.md b/docs/source/examples/full-pipeline-llamaindex.md index 80ae4d664..34911e0a2 100644 --- a/docs/source/examples/full-pipeline-llamaindex.md +++ b/docs/source/examples/full-pipeline-llamaindex.md @@ -62,12 +62,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/docs/source/examples/full-pipeline-web.md b/docs/source/examples/full-pipeline-web.md index 250a9add8..18af34c77 100644 --- a/docs/source/examples/full-pipeline-web.md +++ b/docs/source/examples/full-pipeline-web.md @@ -83,12 +83,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/docs/source/examples/hybrid-frontier-model.md b/docs/source/examples/hybrid-frontier-model.md index 34b3d5e97..2f054fe74 100644 --- a/docs/source/examples/hybrid-frontier-model.md +++ b/docs/source/examples/hybrid-frontier-model.md @@ -34,8 +34,11 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 + top_p: 0.7 max_tokens: 8192 parallel_tool_calls: false + chat_template_kwargs: + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml index dbf092977..157d82811 100644 --- a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml +++ b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml @@ -28,12 +28,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim diff --git a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml index 0a85dc7cf..a56971f81 100644 --- a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml +++ b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml @@ -19,12 +19,12 @@ llms: base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.9 + top_p: 0.7 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true judge_llm: _type: openai diff --git a/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 b/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 index 72c10cd53..eba305767 100644 --- a/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 +++ b/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 @@ -1,5 +1,13 @@ You are a Shallow Research Agent. Your role is to provide rapid, citation-backed answers using available tools. +## MANDATORY: Research Before Answering +When at least one research tool is available, your first response MUST be a tool call. Never answer directly from memory. + +- This rule applies even when the question looks simple, familiar, or based on a false premise. Search to verify the answer or premise. +- Do not produce a final answer until at least one research tool call has completed. +- If the first search is empty or irrelevant, rewrite the query and search once more before synthesizing. +- After receiving useful results, answer promptly. Do not keep searching when one call provides enough evidence. + ## CRITICAL: Source Hierarchy Prioritize sources based on the query intent: diff --git a/tests/aiq_agent/agents/shallow_researcher/test_agent.py b/tests/aiq_agent/agents/shallow_researcher/test_agent.py index eced4b25f..11adecea4 100644 --- a/tests/aiq_agent/agents/shallow_researcher/test_agent.py +++ b/tests/aiq_agent/agents/shallow_researcher/test_agent.py @@ -287,6 +287,18 @@ def test_default_prompt_requires_tool_result_references(self, mock_llm_provider, assert "exact tool name" in agent.system_prompt assert "- [1] mcp_time__get_current_time" in agent.system_prompt + def test_default_prompt_requires_research_before_answering(self, mock_llm_provider, real_tool): + """Default prompt requires evidence collection before synthesis when tools are available.""" + agent = ShallowResearcherAgent( + llm_provider=mock_llm_provider, + tools=[real_tool], + ) + + assert "your first response MUST be a tool call" in agent.system_prompt + assert "Never answer directly from memory" in agent.system_prompt + assert "rewrite the query and search once more" in agent.system_prompt + assert "Do not keep searching when one call provides enough evidence" in agent.system_prompt + @pytest.mark.asyncio async def test_tool_iterations_incremented_on_tool_calls(self, mock_llm_provider, mock_llm, real_tool): """Test tool_iterations counter increments when LLM makes tool calls.""" diff --git a/tests/aiq_agent/test_default_model_profiles.py b/tests/aiq_agent/test_default_model_profiles.py index 1347056c2..a178e27e2 100644 --- a/tests/aiq_agent/test_default_model_profiles.py +++ b/tests/aiq_agent/test_default_model_profiles.py @@ -59,6 +59,10 @@ def _model_for_alias(config: dict, alias: str) -> str: return config["llms"][alias]["model_name"] +def _thinking_enabled(config: dict, alias: str) -> bool: + return bool(config["llms"][alias].get("chat_template_kwargs", {}).get("enable_thinking", False)) + + @pytest.mark.parametrize("config_path", CONFIG_PATHS, ids=lambda path: str(path.relative_to(REPO_ROOT))) def test_default_profiles_use_role_appropriate_models(config_path: Path): config = _load_config(config_path) @@ -71,8 +75,14 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path): function_type = function.get("_type") if function_type == "intent_classifier": assert _model_for_alias(config, function["llm"]) == NANO_MODEL + assert not _thinking_enabled(config, function["llm"]) elif function_type == "shallow_research_agent": - assert _model_for_alias(config, function["llm"]) == NANO_MODEL + alias = function["llm"] + assert _model_for_alias(config, alias) == NANO_MODEL + assert config["llms"][alias]["temperature"] == 0.2 + assert config["llms"][alias]["top_p"] == 0.7 + assert config["llms"][alias]["max_tokens"] == 8192 + assert _thinking_enabled(config, alias) elif config_path.name != "config_frontier_models.yml" and function_type == "clarifier_agent": assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL elif config_path.name != "config_frontier_models.yml" and function_type == "deep_research_agent": From d05dbf53f353743e21425461e833ca50316d54fd Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 15:08:35 -0700 Subject: [PATCH 3/9] address model migration review feedback Signed-off-by: Ajay Thorve --- .../assets/config-scaffold.yml | 43 +++-------- .../references/config-profiles.md | 2 +- .../references/model-selection.md | 4 +- .secrets.baseline | 6 +- README.md | 25 +++--- configs/config_cli_default.yml | 16 ++-- configs/config_frontier_models.yml | 16 ++-- configs/config_mcp.yml | 16 ++-- configs/config_openshell.yml | 16 ++-- configs/config_web_azure_ai_search.yml | 16 ++-- configs/config_web_default_guardrails.yml | 17 ++-- configs/config_web_default_llamaindex.yml | 16 ++-- configs/config_web_frag.yml | 16 ++-- configs/config_web_frag_mcp_auth.yml | 16 ++-- configs/config_web_opensearch.yml | 16 ++-- .../2_Deep_Researcher_Customization.ipynb | 6 +- .../customization/configuration-reference.md | 20 ++--- docs/source/customization/mcp-tools.md | 2 +- docs/source/customization/swapping-models.md | 25 +++--- .../source/customization/tools-and-sources.md | 2 +- docs/source/examples/cli-with-local-nims.md | 12 +-- .../examples/full-pipeline-llamaindex.md | 16 ++-- docs/source/examples/full-pipeline-web.md | 19 +++-- docs/source/examples/hybrid-frontier-model.md | 21 +++-- docs/source/examples/minimal-shallow-only.md | 4 +- docs/source/get-started/installation.md | 2 +- docs/source/profiling/index.md | 3 - docs/source/resources/troubleshooting.md | 4 +- .../configs/config_tokenomics_pricing.yml | 3 - .../freshqa/configs/config_full_workflow.yml | 16 ++-- .../configs/config_shallow_research_only.yml | 12 +-- .../chat/lib/intermediate-step-parser.ts | 6 +- .../test_preclassification_integration.py | 2 +- sources/google_scholar_paper_search/README.md | 22 ++++-- .../knowledge_layer/KNOWLEDGE-LAYER-SETUP.md | 18 +++++ .../knowledge_layer/src/llamaindex/adapter.py | 29 ++++++- .../knowledge_layer/src/opensearch/adapter.py | 19 ++++- .../shallow_researcher/prompts/researcher.j2 | 8 -- src/aiq_agent/tokenomics/README.md | 4 - .../agents/shallow_researcher/test_agent.py | 12 --- .../aiq_agent/test_default_model_profiles.py | 17 +--- ...test_llamaindex_embedding_compatibility.py | 24 ++++++ .../test_opensearch_adapter.py | 77 ++++++++++++++++++- 43 files changed, 371 insertions(+), 275 deletions(-) create mode 100644 tests/knowledge_layer_tests/test_llamaindex_embedding_compatibility.py diff --git a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml index dfa355650..052c5d9b5 100644 --- a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml +++ b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml @@ -17,33 +17,7 @@ general: # Web/API: copy general.front_end from config_web_default_llamaindex.yml llms: - nano_intent_llm: - _type: nim - model_name: nvidia/nemotron-nano-3.5-preview - base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 - top_p: 0.9 - max_tokens: 1024 - num_retries: 5 - parallel_tool_calls: false - chat_template_kwargs: - enable_thinking: false - - nano_agent_llm: - _type: nim - model_name: nvidia/nemotron-nano-3.5-preview - base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.7 - max_tokens: 8192 - num_retries: 5 - parallel_tool_calls: false - chat_template_kwargs: - enable_thinking: true - - ultra_llm: + nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" @@ -54,7 +28,7 @@ llms: chat_template_kwargs: enable_thinking: false - ultra_writer_llm: + nemotron_ultra_writer_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" @@ -72,18 +46,19 @@ functions: intent_classifier: _type: intent_classifier - llm: nano_intent_llm + llm: nemotron_ultra_llm shallow_research_agent: _type: shallow_research_agent - llm: nano_agent_llm + llm: nemotron_ultra_llm deep_research_agent: _type: deep_research_agent - orchestrator_llm: ultra_llm - planner_llm: ultra_llm - researcher_llm: ultra_llm - writer_llm: ultra_writer_llm + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm workflow: _type: chat_deepresearcher_agent diff --git a/.agents/skills/aiq-configure-workflow/references/config-profiles.md b/.agents/skills/aiq-configure-workflow/references/config-profiles.md index 0bfa86a27..76b8ee335 100644 --- a/.agents/skills/aiq-configure-workflow/references/config-profiles.md +++ b/.agents/skills/aiq-configure-workflow/references/config-profiles.md @@ -17,7 +17,7 @@ the file from `configs/`. For the full nine-profile table, see 3. **Model family** - Nemotron → most profiles - GPT-5.2 orchestration/planning/writing → `config_frontier_models.yml` (`OPENAI_API_KEY`) - - Default split → Nano for intent/shallow; Ultra for clarification and deep research + - Default split → role-specific Ultra profiles, with a larger output budget for the writer 4. **Optional features** — copy blocks from: - Guardrails → `config_web_default_guardrails.yml` diff --git a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md index 13fad2a1b..40c60458c 100644 --- a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md +++ b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md @@ -18,9 +18,9 @@ llms: nemotron_ultra_llm: _type: nim model_name: - nemotron_nano_agent_llm: + nemotron_ultra_writer_llm: _type: nim # `openai` is also supported (also takes model_name) - model_name: + model_name: ``` ## Assign a model to an agent role diff --git a/.secrets.baseline b/.secrets.baseline index 5e61d8561..48e0d5d60 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -133,7 +133,7 @@ "filename": "README.md", "hashed_secret": "73140b88094aaf220a03532196b27b58a03c9b09", "is_verified": false, - "line_number": 399 + "line_number": 398 } ], "deploy/.env.example": [ @@ -306,7 +306,7 @@ "filename": "sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md", "hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684", "is_verified": false, - "line_number": 583 + "line_number": 601 } ], "sources/knowledge_layer/src/foundational_rag/README.md": [ @@ -355,5 +355,5 @@ } ] }, - "generated_at": "2026-08-04T21:38:19Z" + "generated_at": "2026-08-04T22:06:06Z" } diff --git a/README.md b/README.md index f9eb7a13c..2ec6ae249 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,7 @@ The checked-in default CLI and web profiles use these core components: - [NVIDIA NeMo Agent Toolkit 1.8.0](https://docs.nvidia.com/nemo/agent-toolkit/latest/) - [LangChain Deep Agents](https://docs.langchain.com/oss/python/deepagents/overview) 0.6.5 or newer -- [NVIDIA Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) for intent classification and shallow research in the default profiles -- [NVIDIA Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for clarification and every deep-research role in the default profiles +- [NVIDIA Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for intent classification, shallow research, clarification, and every deep-research role in the default profiles - [Google Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) (document summary, if used) - [NVIDIA Nemotron 3 Embed 1B](https://build.nvidia.com/nvidia/nemotron-3-embed-1b) (embedding model for the knowledge layer, if used) - [NVIDIA Nemotron 3 Nano Omni 30B A3B Reasoning](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) (vision-language model for the LlamaIndex knowledge layer, if used) @@ -150,7 +149,7 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-nano-3.5-preview` | [Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | | Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | @@ -287,17 +286,17 @@ The `configs/` directory holds YAML workflow configs that define agents, tools, | Config | Models | Description | |--------|--------|-------------| -| `config_cli_default.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | -| `config_web_default_llamaindex.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | -| `config_web_frag.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | -| `config_web_opensearch.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | -| `config_web_azure_ai_search.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | -| `config_frontier_models.yml` | GPT-5.2; Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile using GPT-5.2 for orchestration/planning/writing, Ultra for routing/research, and Nano for shallow research. Requires `OPENAI_API_KEY`. | -| `config_web_default_guardrails.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | -| `config_web_frag_mcp_auth.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | +| `config_cli_default.yml` | Nemotron 3 Ultra | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | +| `config_web_default_llamaindex.yml` | Nemotron 3 Ultra; Gemma 4 summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | +| `config_web_frag.yml` | Nemotron 3 Ultra | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | +| `config_web_opensearch.yml` | Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | +| `config_web_azure_ai_search.yml` | Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | +| `config_frontier_models.yml` | GPT Sol/Luna; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile using GPT Sol/Luna for deep research and Ultra for intent/shallow. Requires `OPENAI_API_KEY` and `NVIDIA_API_KEY`. | +| `config_web_default_guardrails.yml` | Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | +| `config_web_frag_mcp_auth.yml` | Nemotron 3 Ultra | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | | `config_domain_routing_and_skills.yml` | Nemotron 3 Ultra; Gemma 4 summary | Direct deep-research profile with domain routing, DuckDuckGo news, Polymarket, enabled Serper paper search, LlamaIndex, built-in skills, and a fresh per-job Modal sandbox. | -| `config_openshell.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra; Gemma 4 summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | -| `config_mcp.yml` | Nemotron Nano 3.5 Preview; Nemotron 3 Ultra | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | +| `config_openshell.yml` | Nemotron 3 Ultra; Gemma 4 summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | +| `config_mcp.yml` | Nemotron 3 Ultra | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | ## Ways to Run the Agents diff --git a/configs/config_cli_default.yml b/configs/config_cli_default.yml index c44488a83..599b95b0e 100644 --- a/configs/config_cli_default.yml +++ b/configs/config_cli_default.yml @@ -16,9 +16,9 @@ general: # project: nvidia-aiq llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -29,18 +29,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -119,7 +119,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] # llm_timeout: 90 # optional; seconds for intent LLM call (default 90) @@ -135,7 +135,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_frontier_models.yml b/configs/config_frontier_models.yml index 429668928..daa4c1f8a 100644 --- a/configs/config_frontier_models.yml +++ b/configs/config_frontier_models.yml @@ -50,9 +50,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -63,18 +63,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false gpt_sol_agent_llm: _type: openai @@ -140,7 +140,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm verbose: true tools: - web_search_tool @@ -159,7 +159,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm verbose: true tools: - web_search_tool diff --git a/configs/config_mcp.yml b/configs/config_mcp.yml index 0bcdd6168..b0a2c0ab8 100644 --- a/configs/config_mcp.yml +++ b/configs/config_mcp.yml @@ -26,9 +26,9 @@ general: level: INFO llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -39,18 +39,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -99,7 +99,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # Defined for workflow compatibility but disabled at the workflow boundary. clarifier_agent: @@ -111,7 +111,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm exclude_tools: - advanced_web_search_tool max_llm_turns: 10 diff --git a/configs/config_openshell.yml b/configs/config_openshell.yml index ec84e44e1..7ccfb8e0e 100644 --- a/configs/config_openshell.yml +++ b/configs/config_openshell.yml @@ -28,9 +28,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -41,18 +41,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -124,7 +124,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm verbose: true clarifier_agent: @@ -136,7 +136,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm exclude_tools: - advanced_web_search_tool verbose: true diff --git a/configs/config_web_azure_ai_search.yml b/configs/config_web_azure_ai_search.yml index c79baa258..8eececbbd 100644 --- a/configs/config_web_azure_ai_search.yml +++ b/configs/config_web_azure_ai_search.yml @@ -47,9 +47,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -60,18 +60,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -191,7 +191,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true @@ -209,7 +209,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool diff --git a/configs/config_web_default_guardrails.yml b/configs/config_web_default_guardrails.yml index aba6d4efb..215f497b6 100644 --- a/configs/config_web_default_guardrails.yml +++ b/configs/config_web_default_guardrails.yml @@ -28,9 +28,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -41,18 +41,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -79,7 +79,6 @@ llms: enable_thinking: false - summary_llm: _type: nim model_name: google/gemma-4-31b-it @@ -221,7 +220,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm verbose: true clarifier_agent: @@ -233,7 +232,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm exclude_tools: - advanced_web_search_tool verbose: true diff --git a/configs/config_web_default_llamaindex.yml b/configs/config_web_default_llamaindex.yml index d6a7f9b6a..da57ee7d8 100644 --- a/configs/config_web_default_llamaindex.yml +++ b/configs/config_web_default_llamaindex.yml @@ -47,9 +47,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -60,18 +60,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -192,7 +192,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true @@ -208,7 +208,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool diff --git a/configs/config_web_frag.yml b/configs/config_web_frag.yml index ddbb63420..16e979c9e 100644 --- a/configs/config_web_frag.yml +++ b/configs/config_web_frag.yml @@ -49,9 +49,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -62,18 +62,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -162,7 +162,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -177,7 +177,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_web_frag_mcp_auth.yml b/configs/config_web_frag_mcp_auth.yml index 633c4f08d..747a6c44c 100644 --- a/configs/config_web_frag_mcp_auth.yml +++ b/configs/config_web_frag_mcp_auth.yml @@ -56,9 +56,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -69,18 +69,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -211,7 +211,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -226,7 +226,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_web_opensearch.yml b/configs/config_web_opensearch.yml index 296e08b7c..d56e3c3c7 100644 --- a/configs/config_web_opensearch.yml +++ b/configs/config_web_opensearch.yml @@ -48,9 +48,9 @@ general: - "*" llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -61,18 +61,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -169,7 +169,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -184,7 +184,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/docs/notebooks/2_Deep_Researcher_Customization.ipynb b/docs/notebooks/2_Deep_Researcher_Customization.ipynb index d6bbf1504..e9f45be0e 100644 --- a/docs/notebooks/2_Deep_Researcher_Customization.ipynb +++ b/docs/notebooks/2_Deep_Researcher_Customization.ipynb @@ -293,7 +293,7 @@ "| **Planner** | `planner_llm` | Builds the research plan and queries (optional; defaults to orchestrator). |\n", "| **Researcher** | `researcher_llm` | Runs search and synthesizes content (optional; defaults to orchestrator). |\n", "\n", - "You can assign **different models** per role. For example: use a **frontier model** for the orchestrator (better report quality) and **Nemotron** for the planner and researcher (faster, lower cost).\n", + "You can assign **different models** per role. For example: use a **frontier model** for orchestration and planning, and **Nemotron** for research.\n", "\n", "**Reference:** [Configuration Reference](../source/customization/configuration-reference.md)" ] @@ -302,7 +302,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 2.1 Example: Frontier orchestrator, Nemotron for planner and researcher\n", + "### 2.1 Example: Frontier orchestrator and planner, Nemotron researcher\n", "\n", "Define two (or three) LLMs in `llms:` and point the deep research agent at them:\n", "\n", @@ -562,7 +562,7 @@ "A single config can combine all of the above:\n", "\n", "- **Tools:** `paper_search_tool`, `advanced_web_search_tool`, `knowledge_search` in `deep_research_agent.tools`.\n", - "- **Models:** `orchestrator_llm: frontier_llm`, `planner_llm: nemotron_ultra_llm`, `researcher_llm: nemotron_ultra_llm` (with those LLMs defined in `llms:`).\n", + "- **Models:** `orchestrator_llm: frontier_llm`, `source_router_llm: nemotron_ultra_llm`, `planner_llm: nemotron_ultra_llm`, `researcher_llm: nemotron_ultra_llm`, and `writer_llm: nemotron_ultra_writer_llm` (with those LLMs defined in `llms:`).\n", "- **Prompts:** No config change; edit `src/aiq_agent/agents/deep_researcher/prompts/*.j2` as needed.\n", "- **Knowledge layer:** Install a backend, define `knowledge_search` in `functions`, and add it to `deep_research_agent.tools`.\n", "\n", diff --git a/docs/source/customization/configuration-reference.md b/docs/source/customization/configuration-reference.md index e06d753b1..8a38d0a9f 100644 --- a/docs/source/customization/configuration-reference.md +++ b/docs/source/customization/configuration-reference.md @@ -119,7 +119,7 @@ llms: | `top_p` | `float` | `None` | Nucleus sampling threshold. When `None`, the API uses its server-side default. | | `max_tokens` | `int` | `300` | Maximum tokens in the response. Set higher values (for example, `16384` or `128000`) for research agents. | | `num_retries` | `int` | `5` | Number of retry attempts on API failure. | -| `parallel_tool_calls` | `bool` | Provider default | Whether the provider can emit parallel tool calls. The default Nano profile sets this to `false`. | +| `parallel_tool_calls` | `bool` | Provider default | Whether the provider can emit parallel tool calls. The default intent and shallow profiles set this to `false`. | | `chat_template_kwargs` | `object` | -- | Extra arguments passed to the chat template. Use `enable_thinking: true` to activate the model's chain-of-thought reasoning. | ### Common LLM Configurations @@ -128,8 +128,8 @@ Different agents benefit from different parameter profiles: | Role | Temperature | Top-p | Max Tokens | Notes | |------|------------|-------|------------|-------| -| Intent classifier (Nano) | `0.1` | `0.9` | `1024` | Short deterministic classification; thinking disabled | -| Shallow researcher (Nano) | `0.2` | `0.9` | `8192` | Tool-calling fast path; parallel tool calls and thinking disabled | +| Intent classifier (Ultra) | `0.1` | `0.9` | `1024` | Short deterministic classification; thinking disabled | +| Shallow researcher (Ultra) | `0.2` | `0.9` | `8192` | Tool-calling profile; parallel tool calls and thinking disabled | | Deep research roles (Ultra) | `0.2` | `0.7` | `16384` | Source routing, orchestration, planning, and research | | Deep research writer (Ultra) | `0.2` | `0.7` | `32768` | Larger report-writing budget | | Summary LLM (Gemma) | `0.1` | -- | `100` | Conservative, short document summaries | @@ -379,7 +379,7 @@ Classifies user queries as meta (conversational) or research, and determines res functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm tools: - web_search_tool - paper_search_tool @@ -588,9 +588,9 @@ general: # LLM definitions llms: - nano_intent_llm: # Used by intent classifier + ultra_intent_llm: # Used by intent classifier _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -601,9 +601,9 @@ llms: chat_template_kwargs: enable_thinking: false - nano_agent_llm: # Used by shallow researcher + ultra_agent_llm: # Used by shallow researcher _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 @@ -657,7 +657,7 @@ functions: intent_classifier: # Classifies queries, routes depth _type: intent_classifier - llm: nano_intent_llm + llm: ultra_intent_llm tools: - web_search_tool - paper_search_tool @@ -672,7 +672,7 @@ functions: shallow_research_agent: # Fast single-pass research _type: shallow_research_agent - llm: nano_agent_llm + llm: ultra_agent_llm tools: - web_search_tool max_llm_turns: 10 diff --git a/docs/source/customization/mcp-tools.md b/docs/source/customization/mcp-tools.md index 7af2d10e0..e46ef2b3c 100644 --- a/docs/source/customization/mcp-tools.md +++ b/docs/source/customization/mcp-tools.md @@ -114,7 +114,7 @@ Use `exclude_tools` to specialize individual agents: functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm exclude_tools: - mcp_financial_tools__expensive_long_running_tool ``` diff --git a/docs/source/customization/swapping-models.md b/docs/source/customization/swapping-models.md index 4dd22ff4a..6441dc180 100644 --- a/docs/source/customization/swapping-models.md +++ b/docs/source/customization/swapping-models.md @@ -10,18 +10,18 @@ LLMs are defined in the `llms` section and referenced by agents and tools. You c ```yaml llms: - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false ``` **Example: NIM with thinking (for example, for deep research)** @@ -37,10 +37,10 @@ llms: top_p: 0.7 max_tokens: 16384 chat_template_kwargs: - enable_thinking: false + enable_thinking: true ``` -**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_ultra_llm`, `llm: nemotron_nano_agent_llm`). Use different keys in `llms` and point agents at them to swap models per role. +**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_ultra_llm`, `llm: nemotron_ultra_agent_llm`). Use different keys in `llms` and point agents at them to swap models per role. ## Using Downloadable NIMs (Self-Hosted) @@ -76,24 +76,21 @@ llms: ``` ```{note} -**Hosted Endpoint Availability:** The default profiles use Nemotron Nano 3.5 Preview for intent and shallow research, and Nemotron 3 Ultra for clarification and every deep-research role. Shared hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). +**Hosted Endpoint Availability:** The default profiles use Nemotron 3 Ultra for intent and shallow research, and Nemotron 3 Ultra for clarification and every deep-research role. Shared hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). ``` -You can mix hosted and local NIMs in the same config -- for example, use hosted Nano for the shallow researcher and a local downloadable Ultra NIM for deep research: +You can mix hosted and local NIMs in the same config -- for example, use a hosted endpoint for shallow research and a local downloadable Ultra NIM for deep research: ```yaml llms: - hosted_nano_llm: + hosted_shallow_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 max_tokens: 8192 parallel_tool_calls: false - chat_template_kwargs: - enable_thinking: true local_ultra_llm: _type: nim @@ -105,7 +102,7 @@ llms: functions: shallow_research_agent: _type: shallow_research_agent - llm: hosted_nano_llm + llm: hosted_shallow_llm # ... deep_research_agent: diff --git a/docs/source/customization/tools-and-sources.md b/docs/source/customization/tools-and-sources.md index e0ff0bdd3..8ab929e1e 100644 --- a/docs/source/customization/tools-and-sources.md +++ b/docs/source/customization/tools-and-sources.md @@ -137,7 +137,7 @@ functions: # Agents with no tools list inherit all registry tools intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm clarifier_agent: _type: clarifier_agent diff --git a/docs/source/examples/cli-with-local-nims.md b/docs/source/examples/cli-with-local-nims.md index 93438d02b..3306bc79b 100644 --- a/docs/source/examples/cli-with-local-nims.md +++ b/docs/source/examples/cli-with-local-nims.md @@ -11,20 +11,22 @@ This example is based on `configs/config_cli_default.yml` with modifications to ## Prerequisites -You need Docker and NVIDIA GPUs with sufficient VRAM to run the NIM containers. Check the downloadable Nemotron 3 Ultra model card and support matrix for current self-hosted hardware requirements. The hosted default profile uses Nemotron Nano 3.5 Preview for intent and shallow research, but preview endpoint availability does not imply that a matching downloadable NIM image is available. +You need Docker and NVIDIA GPUs with sufficient VRAM to run the NIM containers. Check the downloadable Nemotron 3 Ultra model card and support matrix for current self-hosted hardware requirements. ## Running NIM Containers -Start the NIM model server locally using Docker: +Authenticate to NGC, then start the NIM model server locally using Docker: ```bash +echo "${NGC_API_KEY}" | docker login nvcr.io --username '$oauthtoken' --password-stdin + # Pull and run the Nemotron NIM container # Adjust --gpus and CUDA_VISIBLE_DEVICES for your hardware docker run -d \ --name nemotron-nim \ --gpus all \ -p 8001:8000 \ - -e NVIDIA_API_KEY="${NVIDIA_API_KEY}" \ + -e NGC_API_KEY="${NGC_API_KEY}" \ nvcr.io/nim/nvidia/nemotron-3-ultra-550b-a55b:latest ``` @@ -150,8 +152,8 @@ workflow: ## Required Environment Variables ```bash -# Only needed for pulling NIM container images (not for inference) -export NVIDIA_API_KEY="nvapi-..." # pragma: allowlist secret +# Required to authenticate to NGC, pull the image, and download model artifacts +export NGC_API_KEY="nvapi-..." # pragma: allowlist secret # Web search still requires API keys (runs externally) export TAVILY_API_KEY="tvly-..." # pragma: allowlist secret diff --git a/docs/source/examples/full-pipeline-llamaindex.md b/docs/source/examples/full-pipeline-llamaindex.md index 34911e0a2..3408e2230 100644 --- a/docs/source/examples/full-pipeline-llamaindex.md +++ b/docs/source/examples/full-pipeline-llamaindex.md @@ -43,9 +43,9 @@ general: # LLMs # =========================================================================== llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -56,18 +56,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -140,7 +140,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm verbose: true tools: - web_search_tool @@ -159,7 +159,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm verbose: true tools: - web_search_tool diff --git a/docs/source/examples/full-pipeline-web.md b/docs/source/examples/full-pipeline-web.md index 18af34c77..a5492b52d 100644 --- a/docs/source/examples/full-pipeline-web.md +++ b/docs/source/examples/full-pipeline-web.md @@ -61,12 +61,11 @@ general: # LLMs # =========================================================================== # Role-specific LLM configurations: -# - Nano for intent classification and shallow research -# - Ultra for clarification and every deep-research role +# - Ultra for intent classification, shallow research, clarification, and every deep-research role llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -77,18 +76,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -157,7 +156,7 @@ functions: # Has access to tools for context-aware routing decisions. intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm tools: - web_search_tool - paper_search_tool @@ -184,7 +183,7 @@ functions: # Single-turn ReAct agent for quick queries. shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm tools: - web_search_tool - knowledge_search diff --git a/docs/source/examples/hybrid-frontier-model.md b/docs/source/examples/hybrid-frontier-model.md index 2f054fe74..e42961079 100644 --- a/docs/source/examples/hybrid-frontier-model.md +++ b/docs/source/examples/hybrid-frontier-model.md @@ -5,8 +5,8 @@ SPDX-License-Identifier: Apache-2.0 # Hybrid Frontier Model -This example uses NVIDIA NIM models for intent classification and shallow research -(fast, low-cost) and a frontier model for deep research (higher quality reports). +This example uses an NVIDIA NIM model for intent classification and shallow research, +and a frontier model for deep research (higher quality reports). ## Prerequisites @@ -18,27 +18,24 @@ This example uses NVIDIA NIM models for intent classification and shallow resear ```yaml llms: - # NIM models for fast paths (intent + shallow) - nemotron_nano_intent_llm: + # NIM profiles for intent and shallow research + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 max_tokens: 1024 parallel_tool_calls: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 max_tokens: 8192 parallel_tool_calls: false - chat_template_kwargs: - enable_thinking: true nemotron_ultra_llm: _type: nim @@ -76,7 +73,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm tools: - web_search_tool - knowledge_search @@ -91,7 +88,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm tools: - web_search_tool - knowledge_search diff --git a/docs/source/examples/minimal-shallow-only.md b/docs/source/examples/minimal-shallow-only.md index a67fcab33..f09cff870 100644 --- a/docs/source/examples/minimal-shallow-only.md +++ b/docs/source/examples/minimal-shallow-only.md @@ -25,12 +25,12 @@ general: # --------------------------------------------------------------------------- # LLMs # --------------------------------------------------------------------------- -# A single Nano LLM is sufficient for shallow research. The NIM type connects +# A single role-specific Ultra LLM is sufficient for shallow research. The NIM type connects # to NVIDIA API Catalog. llms: research_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 diff --git a/docs/source/get-started/installation.md b/docs/source/get-started/installation.md index 58f671e42..8e5f3e3c2 100644 --- a/docs/source/get-started/installation.md +++ b/docs/source/get-started/installation.md @@ -25,7 +25,7 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-nano-3.5-preview` | [Nemotron Nano 3.5 Preview](https://build.nvidia.com/nvidia/nemotron-nano-3.5-preview) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | | Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | diff --git a/docs/source/profiling/index.md b/docs/source/profiling/index.md index 427ad4944..96893756a 100644 --- a/docs/source/profiling/index.md +++ b/docs/source/profiling/index.md @@ -149,9 +149,6 @@ tokenomics: "nvidia/nemotron-3-ultra-550b-a55b": input_per_1m_tokens: 0.60 output_per_1m_tokens: 3.60 - "nvidia/nemotron-nano-3.5-preview": - input_per_1m_tokens: 0.05 - output_per_1m_tokens: 0.20 tools: # Key "web_search" matches "advanced_web_search_tool" via substring lookup "web_search": diff --git a/docs/source/resources/troubleshooting.md b/docs/source/resources/troubleshooting.md index 5de838fda..196ba6a42 100644 --- a/docs/source/resources/troubleshooting.md +++ b/docs/source/resources/troubleshooting.md @@ -44,13 +44,13 @@ Common issues and solutions for the AI-Q blueprint. ## Nemotron Hosted Endpoint Availability -Nemotron Nano 3.5 Preview (`nvidia/nemotron-nano-3.5-preview`) and Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their NVIDIA-hosted endpoints can have limited availability during high demand. During peak periods you may observe: +Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) is compatible and tested with AIQ, but its NVIDIA-hosted endpoint can have limited availability during high demand. During peak periods you may observe: - Elevated latency or timeouts on LLM inference calls - HTTP 429 (rate-limited) or 503 (service unavailable) responses from the Build API - Degraded agent workflow performance due to upstream model availability -**Default Configuration:** The default configs use Nemotron Nano 3.5 Preview for intent classification and shallow research, and Nemotron 3 Ultra for clarification and all deep-research roles. If hosted endpoints are saturated, retry after a short delay, reduce concurrency, or self-host a downloadable model for consistent throughput. +**Default Configuration:** The default configs use Nemotron 3 Ultra for intent classification, shallow research, clarification, and all deep-research roles. If the hosted endpoint is saturated, retry after a short delay, reduce concurrency, or self-host a downloadable model for consistent throughput. ### Recommended Mitigation: Self-Host the Affected Model diff --git a/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml b/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml index f66e54955..ff4f4de9b 100644 --- a/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml +++ b/frontends/benchmarks/deepresearch_bench/configs/config_tokenomics_pricing.yml @@ -23,9 +23,6 @@ tokenomics: "nvidia/nemotron-3-ultra-550b-a55b": input_per_1m_tokens: 0.60 output_per_1m_tokens: 3.60 - "nvidia/nemotron-nano-3.5-preview": - input_per_1m_tokens: 0.05 - output_per_1m_tokens: 0.20 tools: # Key "web_search" matches "advanced_web_search_tool" via substring lookup. "web_search": diff --git a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml index 157d82811..ffcb9eb81 100644 --- a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml +++ b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml @@ -9,9 +9,9 @@ general: level: INFO llms: - nemotron_nano_intent_llm: + nemotron_ultra_intent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.1 @@ -22,18 +22,18 @@ llms: chat_template_kwargs: enable_thinking: false - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false nemotron_ultra_llm: _type: nim @@ -73,11 +73,11 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_nano_intent_llm + llm: nemotron_ultra_intent_llm shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm tools: - web_search_tool max_llm_turns: 10 diff --git a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml index a56971f81..967d684d4 100644 --- a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml +++ b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml @@ -1,5 +1,5 @@ # FreshQA shallow-research-only -# Nemotron Nano on NVIDIA API Catalog; add judge (OpenAI or Gemini) for evaluator. +# Nemotron Ultra on NVIDIA API Catalog; add judge (OpenAI or Gemini) for evaluator. general: telemetry: @@ -13,18 +13,18 @@ general: project: "AIQ_v2_freshqa" llms: - nemotron_nano_agent_llm: + nemotron_ultra_agent_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} temperature: 0.2 - top_p: 0.7 + top_p: 0.9 max_tokens: 8192 num_retries: 5 parallel_tool_calls: false chat_template_kwargs: - enable_thinking: true + enable_thinking: false judge_llm: _type: openai @@ -39,7 +39,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_nano_agent_llm + llm: nemotron_ultra_agent_llm max_llm_turns: 20 tools: - web_search_tool diff --git a/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts b/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts index 1661a283f..067d8e335 100644 --- a/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts +++ b/frontends/ui/src/features/chat/lib/intermediate-step-parser.ts @@ -90,7 +90,7 @@ export const mapFunctionToCategory = (functionName: string): IntermediateStepCat * Check if a name represents an LLM model rather than a function/tool. * LLM models typically have format: "provider/org/model-name" or contain slashes. * - * @param name - The name to check (e.g., "nvidia/nemotron-nano-3.5-preview") + * @param name - The name to check (e.g., "nvidia/nemotron-3-ultra-550b-a55b") * @returns True if this appears to be an LLM model name */ export const isLLMModel = (name: string): boolean => { @@ -130,7 +130,7 @@ export const getWorkflowDisplayName = (functionName: string): string => { * Convert a snake_case or special function name to a human-readable display name. * Also handles LLM model names and tool prefixes. * - * @param functionName - The raw function name (e.g., "web_search_tool", "", "nvidia/nemotron-nano-3.5-preview") + * @param functionName - The raw function name (e.g., "web_search_tool", "", "nvidia/nemotron-3-ultra-550b-a55b") * @returns Human-readable name (e.g., "Web Search Tool", "Workflow", "Nemotron 3 Nano 30B") */ export const getDisplayName = (functionName: string): string => { @@ -142,7 +142,7 @@ export const getDisplayName = (functionName: string): string => { return 'Workflow' } - // Handle LLM model names (e.g., "nvidia/nemotron-nano-3.5-preview") + // Handle LLM model names (e.g., "nvidia/nemotron-3-ultra-550b-a55b") if (isLLMModel(functionName)) { const parts = functionName.split('/') const modelName = parts[parts.length - 1] // Take last segment diff --git a/mcp/tests/test_preclassification_integration.py b/mcp/tests/test_preclassification_integration.py index 1b815651b..467a6a16a 100644 --- a/mcp/tests/test_preclassification_integration.py +++ b/mcp/tests/test_preclassification_integration.py @@ -27,7 +27,7 @@ from nat.builder.workflow_builder import WorkflowBuilder _REPO_ROOT = Path(__file__).resolve().parents[2] -_INTENT_LLM_NAME = "nemotron_nano_intent_llm" +_INTENT_LLM_NAME = "nemotron_ultra_intent_llm" class _CountingIntentLLM: diff --git a/sources/google_scholar_paper_search/README.md b/sources/google_scholar_paper_search/README.md index d6d574127..9fd2211eb 100644 --- a/sources/google_scholar_paper_search/README.md +++ b/sources/google_scholar_paper_search/README.md @@ -114,11 +114,19 @@ Here is a complete configuration example showing how to integrate the paper sear ```yaml llms: - my_llm: + nemotron_ultra_llm: _type: nim - model_name: nvidia/nemotron-nano-3.5-preview + model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https://integrate.api.nvidia.com/v1" - temperature: 0.7 + temperature: 0.2 + max_tokens: 16384 + + nemotron_ultra_writer_llm: + _type: nim + model_name: nvidia/nemotron-3-ultra-550b-a55b + base_url: "https://integrate.api.nvidia.com/v1" + temperature: 0.2 + max_tokens: 32768 functions: paper_search_tool: @@ -133,9 +141,11 @@ functions: deep_research_agent: _type: deep_research_agent - llm: my_llm - report_llm: my_llm - max_loops: 2 + orchestrator_llm: nemotron_ultra_llm + source_router_llm: nemotron_ultra_llm + researcher_llm: nemotron_ultra_llm + planner_llm: nemotron_ultra_llm + writer_llm: nemotron_ultra_writer_llm tools: - paper_search_tool - web_search_tool diff --git a/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md b/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md index dd03c098e..ba420014a 100644 --- a/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md +++ b/sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md @@ -269,6 +269,24 @@ OpenSearch creates one physical index per collection using ``. The OpenSearch adapter maps that session collection to a dynamic index in the same OpenSearch endpoint, for example `aiq-s_`. The TTL cleanup task removes expired OpenSearch indexes based on their collection `_meta.updated_at` diff --git a/sources/knowledge_layer/src/llamaindex/adapter.py b/sources/knowledge_layer/src/llamaindex/adapter.py index 563ce6fa3..53b5d7b1c 100644 --- a/sources/knowledge_layer/src/llamaindex/adapter.py +++ b/sources/knowledge_layer/src/llamaindex/adapter.py @@ -68,13 +68,29 @@ logger = logging.getLogger(__name__) +_CHROMA_EMBEDDING_MODEL_KEY = "aiq_embedding_model" + # Default VLM model for image captioning -# nemotron-nano is faster (12B vs 90B) - same as NV-Ingest service mode uses +# Default multimodal model used for local image and chart extraction. DEFAULT_VLM_MODEL = os.environ.get("AIQ_VLM_MODEL", "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning") # Default VLM model base URL DEFAULT_VLM_BASE_URL = os.environ.get("AIQ_VLM_BASE_URL", "https://integrate.api.nvidia.com/v1") +def _validate_chroma_embedding_model(collection: Any, collection_name: str, expected_model: str) -> None: + """Reject persisted Chroma vectors created with a different or unknown embedding model.""" + metadata = getattr(collection, "metadata", None) or {} + persisted_model = metadata.get(_CHROMA_EMBEDDING_MODEL_KEY) + if persisted_model == expected_model: + return + + persisted_label = repr(persisted_model) if persisted_model else "an unknown legacy model" + raise RuntimeError( + f"Chroma collection {collection_name!r} was created with {persisted_label}, but AI-Q is configured " + f"for {expected_model!r}. Delete and re-ingest the collection before using the new embedding model." + ) + + # Image extraction settings - filters out small icons/logos MIN_IMAGE_WIDTH_PX = 100 MIN_IMAGE_HEIGHT_PX = 100 @@ -456,7 +472,7 @@ class LlamaIndexIngestor(TTLCleanupMixin, BaseIngestor): extract_tables: Enable table extraction from PDFs (default: False) extract_charts: Enable chart extraction with structured data (default: False) extract_images: Enable image extraction with VLM captioning (default: False) - vlm_model: NVIDIA VLM for captioning (default: nvidia/llama-3.2-90b-vision-instruct) + vlm_model: NVIDIA VLM for captioning (default: nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) Environment variables: AIQ_CHROMA_DIR: Default ChromaDB persistence directory @@ -775,11 +791,13 @@ def create_collection( collection_metadata["description"] = description if metadata: collection_metadata.update(metadata) + collection_metadata[_CHROMA_EMBEDDING_MODEL_KEY] = self.embed_model_name collection = client.get_or_create_collection( name=name, metadata=collection_metadata, ) + _validate_chroma_embedding_model(collection, name, self.embed_model_name) logger.info(f"Created collection: {name}") @@ -1308,8 +1326,12 @@ def _run_ingestion( # Get or create collection chroma_collection = chroma_client.get_or_create_collection( name=collection_name, - metadata={"hnsw:space": "cosine"}, + metadata={ + "hnsw:space": "cosine", + _CHROMA_EMBEDDING_MODEL_KEY: self.embed_model_name, + }, ) + _validate_chroma_embedding_model(chroma_collection, collection_name, self.embed_model_name) # Set up vector store vector_store = ChromaVectorStore(chroma_collection=chroma_collection) @@ -1691,6 +1713,7 @@ async def retrieve( success=False, error_message=f"Collection '{collection_name}' not found", ) + _validate_chroma_embedding_model(chroma_collection, collection_name, self.embed_model_name) # Create vector store and index vector_store = ChromaVectorStore(chroma_collection=chroma_collection) diff --git a/sources/knowledge_layer/src/opensearch/adapter.py b/sources/knowledge_layer/src/opensearch/adapter.py index bcf4a11f9..6077801f0 100644 --- a/sources/knowledge_layer/src/opensearch/adapter.py +++ b/sources/knowledge_layer/src/opensearch/adapter.py @@ -483,12 +483,27 @@ def _put_index_meta(self, index_name: str, meta: dict[str, Any]) -> None: except Exception as e: logger.debug("Failed to update OpenSearch mapping metadata for %s: %s", index_name, e) + def _validate_index_embedding(self, index_name: str) -> dict[str, Any]: + """Reject persisted vectors created with a different or unknown embedding configuration.""" + meta = self._get_index_meta(index_name) + persisted_model = meta.get("embedding_model") + persisted_dim = meta.get("embedding_dim") + if persisted_model == self.embed_model_name and persisted_dim == self.embedding_dim: + return meta + + raise RuntimeError( + f"OpenSearch index {index_name!r} uses embedding model {persisted_model!r} with dimension " + f"{persisted_dim!r}, but AI-Q is configured for {self.embed_model_name!r} with dimension " + f"{self.embedding_dim}. Delete and re-ingest the collection before using the new embedding model." + ) + def _ensure_index(self, collection_name: str, description: str | None = None) -> str: """Create the collection index if it does not exist; returns the index name.""" client = self._get_client() index_name = self._index_name_for_collection(collection_name) if client.indices.exists(index=index_name): - existing_name = self._get_index_meta(index_name).get("collection_name") + meta = self._validate_index_embedding(index_name) + existing_name = meta.get("collection_name") if existing_name is not None and existing_name != collection_name: raise RuntimeError( f"OpenSearch index {index_name} already belongs to collection {existing_name!r}; " @@ -503,6 +518,7 @@ def _ensure_index(self, collection_name: str, description: str | None = None) -> # Otherwise the create failed for a real reason and the error must propagate. if not client.indices.exists(index=index_name): raise + self._validate_index_embedding(index_name) return index_name def _update_collection_timestamp(self, collection_name: str) -> None: @@ -1549,6 +1565,7 @@ async def retrieve( success=False, error_message=f"Collection '{collection_name}' not found", ) + await asyncio.to_thread(self._validate_index_embedding, index_name) query_embedding = (await asyncio.to_thread(self._embed_texts, [query]))[0] body = self._build_search_body(query_embedding, top_k or self.default_top_k, filters) diff --git a/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 b/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 index eba305767..72c10cd53 100644 --- a/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 +++ b/src/aiq_agent/agents/shallow_researcher/prompts/researcher.j2 @@ -1,13 +1,5 @@ You are a Shallow Research Agent. Your role is to provide rapid, citation-backed answers using available tools. -## MANDATORY: Research Before Answering -When at least one research tool is available, your first response MUST be a tool call. Never answer directly from memory. - -- This rule applies even when the question looks simple, familiar, or based on a false premise. Search to verify the answer or premise. -- Do not produce a final answer until at least one research tool call has completed. -- If the first search is empty or irrelevant, rewrite the query and search once more before synthesizing. -- After receiving useful results, answer promptly. Do not keep searching when one call provides enough evidence. - ## CRITICAL: Source Hierarchy Prioritize sources based on the query intent: diff --git a/src/aiq_agent/tokenomics/README.md b/src/aiq_agent/tokenomics/README.md index b14ca5de0..c0e95c34b 100644 --- a/src/aiq_agent/tokenomics/README.md +++ b/src/aiq_agent/tokenomics/README.md @@ -41,10 +41,6 @@ tokenomics: "nvidia/nemotron-3-ultra-550b-a55b": input_per_1m_tokens: 0.60 output_per_1m_tokens: 3.60 - "nvidia/nemotron-nano-3.5-preview": - input_per_1m_tokens: 0.05 - output_per_1m_tokens: 0.20 - cached_input_per_1m_tokens: 0.05 # optional — defaults to input price if omitted tools: # Tool name lookup is substring-based: "web_search" matches "advanced_web_search_tool" # and "tavily_search" because the key is a substring of those names. diff --git a/tests/aiq_agent/agents/shallow_researcher/test_agent.py b/tests/aiq_agent/agents/shallow_researcher/test_agent.py index 11adecea4..eced4b25f 100644 --- a/tests/aiq_agent/agents/shallow_researcher/test_agent.py +++ b/tests/aiq_agent/agents/shallow_researcher/test_agent.py @@ -287,18 +287,6 @@ def test_default_prompt_requires_tool_result_references(self, mock_llm_provider, assert "exact tool name" in agent.system_prompt assert "- [1] mcp_time__get_current_time" in agent.system_prompt - def test_default_prompt_requires_research_before_answering(self, mock_llm_provider, real_tool): - """Default prompt requires evidence collection before synthesis when tools are available.""" - agent = ShallowResearcherAgent( - llm_provider=mock_llm_provider, - tools=[real_tool], - ) - - assert "your first response MUST be a tool call" in agent.system_prompt - assert "Never answer directly from memory" in agent.system_prompt - assert "rewrite the query and search once more" in agent.system_prompt - assert "Do not keep searching when one call provides enough evidence" in agent.system_prompt - @pytest.mark.asyncio async def test_tool_iterations_incremented_on_tool_calls(self, mock_llm_provider, mock_llm, real_tool): """Test tool_iterations counter increments when LLM makes tool calls.""" diff --git a/tests/aiq_agent/test_default_model_profiles.py b/tests/aiq_agent/test_default_model_profiles.py index a178e27e2..daa82ce78 100644 --- a/tests/aiq_agent/test_default_model_profiles.py +++ b/tests/aiq_agent/test_default_model_profiles.py @@ -8,10 +8,10 @@ REPO_ROOT = Path(__file__).resolve().parents[2] -NANO_MODEL = "nvidia/nemotron-nano-3.5-preview" ULTRA_MODEL = "nvidia/nemotron-3-ultra-550b-a55b" CONFIG_GLOBS = ( + ".agents/skills/aiq-configure-workflow/assets/config-scaffold.yml", "configs/config_*.yml", "frontends/benchmarks/**/configs/*.yml", ) @@ -59,10 +59,6 @@ def _model_for_alias(config: dict, alias: str) -> str: return config["llms"][alias]["model_name"] -def _thinking_enabled(config: dict, alias: str) -> bool: - return bool(config["llms"][alias].get("chat_template_kwargs", {}).get("enable_thinking", False)) - - @pytest.mark.parametrize("config_path", CONFIG_PATHS, ids=lambda path: str(path.relative_to(REPO_ROOT))) def test_default_profiles_use_role_appropriate_models(config_path: Path): config = _load_config(config_path) @@ -74,18 +70,13 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path): function_type = function.get("_type") if function_type == "intent_classifier": - assert _model_for_alias(config, function["llm"]) == NANO_MODEL - assert not _thinking_enabled(config, function["llm"]) + assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL elif function_type == "shallow_research_agent": - alias = function["llm"] - assert _model_for_alias(config, alias) == NANO_MODEL - assert config["llms"][alias]["temperature"] == 0.2 - assert config["llms"][alias]["top_p"] == 0.7 - assert config["llms"][alias]["max_tokens"] == 8192 - assert _thinking_enabled(config, alias) + assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL elif config_path.name != "config_frontier_models.yml" and function_type == "clarifier_agent": assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL elif config_path.name != "config_frontier_models.yml" and function_type == "deep_research_agent": + assert function["writer_llm"] == "nemotron_ultra_writer_llm" for role in ( "orchestrator_llm", "source_router_llm", diff --git a/tests/knowledge_layer_tests/test_llamaindex_embedding_compatibility.py b/tests/knowledge_layer_tests/test_llamaindex_embedding_compatibility.py new file mode 100644 index 000000000..2a71bda7e --- /dev/null +++ b/tests/knowledge_layer_tests/test_llamaindex_embedding_compatibility.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Embedding-identity checks for persisted LlamaIndex/Chroma collections.""" + +from types import SimpleNamespace + +import pytest +from knowledge_layer.llamaindex.adapter import _CHROMA_EMBEDDING_MODEL_KEY +from knowledge_layer.llamaindex.adapter import _validate_chroma_embedding_model + + +def test_chroma_collection_accepts_matching_embedding_model() -> None: + collection = SimpleNamespace(metadata={_CHROMA_EMBEDDING_MODEL_KEY: "nvidia/test-embed"}) + + _validate_chroma_embedding_model(collection, "docs", "nvidia/test-embed") + + +@pytest.mark.parametrize("metadata", [{}, {_CHROMA_EMBEDDING_MODEL_KEY: "nvidia/old-embed"}]) +def test_chroma_collection_rejects_unknown_or_mismatched_embedding_model(metadata: dict[str, str]) -> None: + collection = SimpleNamespace(metadata=metadata) + + with pytest.raises(RuntimeError, match="Delete and re-ingest"): + _validate_chroma_embedding_model(collection, "docs", "nvidia/new-embed") diff --git a/tests/knowledge_layer_tests/test_opensearch_adapter.py b/tests/knowledge_layer_tests/test_opensearch_adapter.py index 3199ae7a5..1d3a73246 100644 --- a/tests/knowledge_layer_tests/test_opensearch_adapter.py +++ b/tests/knowledge_layer_tests/test_opensearch_adapter.py @@ -485,12 +485,78 @@ def test_ensure_index_rejects_reuse_for_different_collection(): ingestor._client = fake_client index_name = ingestor._index_name_for_collection("alpha") - fake_client.indexes[index_name] = {"mappings": {"_meta": {"backend": "opensearch", "collection_name": "beta"}}} + fake_client.indexes[index_name] = { + "mappings": { + "_meta": { + "backend": "opensearch", + "collection_name": "beta", + "embedding_model": ingestor.embed_model_name, + "embedding_dim": ingestor.embedding_dim, + } + } + } with pytest.raises(RuntimeError): ingestor._ensure_index("alpha") +@pytest.mark.parametrize( + ("embedding_model", "embedding_dim"), + [(None, None), ("nvidia/old-embed", 2048), ("nvidia/test-embed", 1024)], +) +def test_ensure_index_rejects_unknown_or_mismatched_embedding_configuration( + embedding_model: str | None, + embedding_dim: int | None, +): + """Existing vectors must never be mixed with a different embedding space.""" + fake_client = FakeOpenSearchClient() + ingestor = OpenSearchIngestor( + {"embed_model": "nvidia/test-embed", "embedding_dim": 2048, "start_ttl_cleanup": False} + ) + ingestor._client = fake_client + index_name = ingestor._index_name_for_collection("docs") + fake_client.indexes[index_name] = { + "mappings": { + "_meta": { + "backend": "opensearch", + "collection_name": "docs", + "embedding_model": embedding_model, + "embedding_dim": embedding_dim, + } + } + } + + with pytest.raises(RuntimeError, match="Delete and re-ingest"): + ingestor._ensure_index("docs") + + +def test_retrieval_rejects_mismatched_embedding_configuration_before_query_embedding(): + """Retrieval must fail closed before querying with vectors from another embedding space.""" + fake_client = FakeOpenSearchClient() + retriever = OpenSearchRetriever({"embed_model": "nvidia/new-embed", "embedding_dim": 2048}) + retriever._client = fake_client + index_name = retriever._index_name_for_collection("docs") + fake_client.indexes[index_name] = { + "mappings": { + "_meta": { + "backend": "opensearch", + "collection_name": "docs", + "embedding_model": "nvidia/old-embed", + "embedding_dim": 2048, + } + } + } + + def unexpected_embedding(_texts): + raise AssertionError("query embedding must not run for an incompatible index") + + retriever._embed_texts = unexpected_embedding + result = asyncio.run(retriever.retrieve("question", "docs")) + + assert not result.success + assert "embedding model" in (result.error_message or "") + + def test_session_collection_names_are_safe_dynamic_indexes(): """Test that session collection names are safe dynamic indexes.""" ingestor = OpenSearchIngestor({"index_prefix": "aiq-prod", "start_ttl_cleanup": False}) @@ -1196,6 +1262,15 @@ def fake_create(index: str, body: dict) -> None: fake_client = type("C", (), {})() fake_client.indices = type("I", (), {"exists": staticmethod(fake_exists), "create": staticmethod(fake_create)})() monkeypatch.setattr(ingestor, "_get_client", lambda: fake_client) + monkeypatch.setattr( + ingestor, + "_get_index_meta", + lambda _index: { + "collection_name": "smoke", + "embedding_model": ingestor.embed_model_name, + "embedding_dim": ingestor.embedding_dim, + }, + ) # Must not raise — race recovery should swallow the exists exception. result = ingestor._ensure_index("smoke") From 28ef204e02ef10a4a3079776f97150f72128bf24 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 15:29:51 -0700 Subject: [PATCH 4/9] address follow-up model migration review Signed-off-by: Ajay Thorve --- .../references/model-selection.md | 4 +- .../1_Deep_Researcher_Web_Search.ipynb | 1 + .../2_Deep_Researcher_Customization.ipynb | 10 +-- docs/source/customization/knowledge-layer.md | 15 +++++ .../knowledge_layer/src/opensearch/adapter.py | 35 ++++++++-- .../test_opensearch_adapter.py | 66 ++++++++++++++++++- 6 files changed, 118 insertions(+), 13 deletions(-) diff --git a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md index 40c60458c..d80235952 100644 --- a/.agents/skills/aiq-customize-prompts-models/references/model-selection.md +++ b/.agents/skills/aiq-customize-prompts-models/references/model-selection.md @@ -18,9 +18,11 @@ llms: nemotron_ultra_llm: _type: nim model_name: + max_tokens: 16384 nemotron_ultra_writer_llm: _type: nim # `openai` is also supported (also takes model_name) - model_name: + model_name: + max_tokens: 32768 # larger report-writing budget ``` ## Assign a model to an agent role diff --git a/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb b/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb index ccd9339f3..a1020228a 100644 --- a/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb +++ b/docs/notebooks/1_Deep_Researcher_Web_Search.ipynb @@ -346,6 +346,7 @@ " temperature=0.2,\n", " top_p=0.7,\n", " max_completion_tokens=16384,\n", + " model_kwargs={\"chat_template_kwargs\": {\"enable_thinking\": False}},\n", ")\n", "provider = LLMProvider()\n", "provider.set_default(llm)\n", diff --git a/docs/notebooks/2_Deep_Researcher_Customization.ipynb b/docs/notebooks/2_Deep_Researcher_Customization.ipynb index e9f45be0e..fa792193d 100644 --- a/docs/notebooks/2_Deep_Researcher_Customization.ipynb +++ b/docs/notebooks/2_Deep_Researcher_Customization.ipynb @@ -11,7 +11,7 @@ "You will:\n", "\n", "1. **Add a tool** – Install and configure the paper search tool (Google Scholar via Serper) and attach it to the deep research agent.\n", - "2. **Customize models** – Use a different LLM for the orchestrator (for example a frontier model) and Nemotron for the planner and researcher.\n", + "2. **Customize models** – Use a frontier model for orchestration and planning, and Nemotron for research.\n", "3. **Locate and customize prompts** – Find where orchestrator, planner, and researcher prompts live and what variables they use.\n", "4. **Add the knowledge layer** – Enable document retrieval so the agent can search over your ingested documents alongside web and paper search." ] @@ -283,15 +283,17 @@ "metadata": {}, "source": [ "\n", - "## 2. Customizing models (orchestrator vs planner/researcher)\n", + "## 2. Customizing models by deep-research role\n", "\n", - "The deep research agent has three LLM roles:\n", + "The deep research agent has five configurable LLM roles:\n", "\n", "| Role | Config key | Purpose |\n", "|------|------------|--------|\n", - "| **Orchestrator** | `orchestrator_llm` | Coordinates the workflow and writes the final report (required). |\n", + "| **Orchestrator** | `orchestrator_llm` | Coordinates the workflow and supplies the default for omitted roles (required). |\n", + "| **Source router** | `source_router_llm` | Selects the source-routing strategy (optional; defaults to orchestrator). |\n", "| **Planner** | `planner_llm` | Builds the research plan and queries (optional; defaults to orchestrator). |\n", "| **Researcher** | `researcher_llm` | Runs search and synthesizes content (optional; defaults to orchestrator). |\n", + "| **Writer** | `writer_llm` | Produces the final report (optional; defaults to orchestrator). |\n", "\n", "You can assign **different models** per role. For example: use a **frontier model** for orchestration and planning, and **Nemotron** for research.\n", "\n", diff --git a/docs/source/customization/knowledge-layer.md b/docs/source/customization/knowledge-layer.md index ec60414f9..1a7417c52 100644 --- a/docs/source/customization/knowledge-layer.md +++ b/docs/source/customization/knowledge-layer.md @@ -267,6 +267,21 @@ collection/index after changing dimensions because an existing `knn_vector` mapp The full shipped profile is [`configs/config_web_opensearch.yml`](../../../configs/config_web_opensearch.yml). +#### Changing the embedding model + +Persisted vector stores are tied to both the embedding model and its output dimension. Changing only +`AIQ_EMBED_MODEL` is not a compatible in-place update: + +- **Chroma:** stop AI-Q, delete the existing collection directory (or configure a new `AIQ_CHROMA_DIR`), restart, and + re-ingest every document. +- **OpenSearch:** set `OPENSEARCH_EMBEDDING_DIM` to the new model's exact output length, delete the existing AI-Q + collection/index, and re-ingest every document. AI-Q rejects unmarked or incompatible indexes before ingestion or + retrieval. +- **Azure AI Search:** model and dimension are part of the physical index identity; changing either creates an isolated + index that must be populated by re-ingestion. + +See the detailed [knowledge-layer setup migration procedure](../../../sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md#migrating-an-embedding-model). + OpenSearch ingestion is text-only: it extracts text from PDF, DOCX, PPTX, and supported plain-text formats, but does not perform LlamaIndex table/image/chart extraction. Distributed Dask ingestion also disables document-summary generation because the configured summary LLM is not serialized to workers; use local ingestion when summaries are required. diff --git a/sources/knowledge_layer/src/opensearch/adapter.py b/sources/knowledge_layer/src/opensearch/adapter.py index 6077801f0..42cbe204c 100644 --- a/sources/knowledge_layer/src/opensearch/adapter.py +++ b/sources/knowledge_layer/src/opensearch/adapter.py @@ -497,18 +497,33 @@ def _validate_index_embedding(self, index_name: str) -> dict[str, Any]: f"{self.embedding_dim}. Delete and re-ingest the collection before using the new embedding model." ) + @staticmethod + def _validate_index_owner(index_name: str, collection_name: str, meta: dict[str, Any]) -> None: + """Reject a physical index that is owned by another or an unknown logical collection.""" + existing_name = meta.get("collection_name") + if existing_name != collection_name: + raise RuntimeError( + f"OpenSearch index {index_name} belongs to collection {existing_name!r}; " + f"refusing to reuse it for {collection_name!r}" + ) + + def _validate_embedding_vectors(self, embeddings: list[list[float]], *, operation: str) -> None: + """Reject vectors whose lengths do not match the configured OpenSearch mapping.""" + for position, embedding in enumerate(embeddings): + actual_dim = len(embedding) + if actual_dim != self.embedding_dim: + raise RuntimeError( + f"OpenSearch {operation} embedding {position} has dimension {actual_dim}, " + f"but the configured index dimension is {self.embedding_dim}" + ) + def _ensure_index(self, collection_name: str, description: str | None = None) -> str: """Create the collection index if it does not exist; returns the index name.""" client = self._get_client() index_name = self._index_name_for_collection(collection_name) if client.indices.exists(index=index_name): meta = self._validate_index_embedding(index_name) - existing_name = meta.get("collection_name") - if existing_name is not None and existing_name != collection_name: - raise RuntimeError( - f"OpenSearch index {index_name} already belongs to collection {existing_name!r}; " - f"refusing to reuse it for {collection_name!r}" - ) + self._validate_index_owner(index_name, collection_name, meta) return index_name try: client.indices.create(index=index_name, body=self._index_mapping(collection_name, description)) @@ -518,7 +533,8 @@ def _ensure_index(self, collection_name: str, description: str | None = None) -> # Otherwise the create failed for a real reason and the error must propagate. if not client.indices.exists(index=index_name): raise - self._validate_index_embedding(index_name) + meta = self._validate_index_embedding(index_name) + self._validate_index_owner(index_name, collection_name, meta) return index_name def _update_collection_timestamp(self, collection_name: str) -> None: @@ -1395,6 +1411,10 @@ def _documents_for_file( def _bulk_index_documents(self, index_name: str, documents: list[dict[str, Any]]) -> None: """Bulk-index documents into the given index in batches; raises on any bulk error.""" + self._validate_embedding_vectors( + [doc[self.vector_field] for doc in documents], + operation="ingestion", + ) client = self._get_client() for start in range(0, len(documents), self.bulk_batch_size): batch = documents[start : start + self.bulk_batch_size] @@ -1568,6 +1588,7 @@ async def retrieve( await asyncio.to_thread(self._validate_index_embedding, index_name) query_embedding = (await asyncio.to_thread(self._embed_texts, [query]))[0] + self._validate_embedding_vectors([query_embedding], operation="query") body = self._build_search_body(query_embedding, top_k or self.default_top_k, filters) response = await asyncio.to_thread(client.search, index=index_name, body=body, request_timeout=self.timeout) chunks = [ diff --git a/tests/knowledge_layer_tests/test_opensearch_adapter.py b/tests/knowledge_layer_tests/test_opensearch_adapter.py index 1d3a73246..526ddbbc0 100644 --- a/tests/knowledge_layer_tests/test_opensearch_adapter.py +++ b/tests/knowledge_layer_tests/test_opensearch_adapter.py @@ -336,7 +336,7 @@ def test_aoss_health_check_falls_back_to_cat_indices(): def test_aoss_bulk_index_omits_document_ids_and_explicit_refresh(): """Test that aoss bulk index omits document ids and explicit refresh.""" - ingestor = OpenSearchIngestor({"auth_type": "sigv4", "aws_service": "aoss"}) + ingestor = OpenSearchIngestor({"auth_type": "sigv4", "aws_service": "aoss", "embedding_dim": 4}) fake_client = FakeAossClient() ingestor._client = fake_client @@ -358,6 +358,21 @@ def test_aoss_bulk_index_omits_document_ids_and_explicit_refresh(): assert fake_client.bulk_refresh is False +def test_bulk_index_rejects_mismatched_embedding_dimension_before_request(): + """Ingestion vectors must match the mapping before any bulk request is sent.""" + ingestor = OpenSearchIngestor({"auth_type": "sigv4", "aws_service": "aoss", "embedding_dim": 4}) + fake_client = FakeAossClient() + ingestor._client = fake_client + + with pytest.raises(RuntimeError, match="ingestion embedding 0 has dimension 3"): + ingestor._bulk_index_documents( + "aiq-aoss-test", + [{"chunk_id": "chunk-1", "embedding": [0.1, 0.2, 0.3]}], + ) + + assert fake_client.bulk_body is None + + def test_aoss_delete_searches_then_bulk_deletes_generated_ids(): """Test that aoss delete searches then bulk deletes generated ids.""" ingestor = OpenSearchIngestor({"auth_type": "sigv4", "aws_service": "aoss", "bulk_batch_size": 2}) @@ -557,6 +572,21 @@ def unexpected_embedding(_texts): assert "embedding model" in (result.error_message or "") +def test_retrieval_rejects_mismatched_query_dimension_before_search(): + """Query vectors must match the persisted mapping before an OpenSearch request.""" + fake_client = FakeOpenSearchClient() + retriever = OpenSearchRetriever({"embed_model": "nvidia/test-embed", "embedding_dim": 4}) + retriever._client = fake_client + index_name = retriever._index_name_for_collection("docs") + fake_client.indexes[index_name] = retriever._index_mapping("docs") + retriever._embed_texts = lambda _texts: [[0.1, 0.2, 0.3]] + + result = asyncio.run(retriever.retrieve("question", "docs")) + + assert not result.success + assert "query embedding 0 has dimension 3" in (result.error_message or "") + + def test_session_collection_names_are_safe_dynamic_indexes(): """Test that session collection names are safe dynamic indexes.""" ingestor = OpenSearchIngestor({"index_prefix": "aiq-prod", "start_ttl_cleanup": False}) @@ -1278,6 +1308,40 @@ def fake_create(index: str, body: dict) -> None: assert len(exists_calls) == 2, "expected pre-create check + post-failure recovery check" +def test_ensure_index_rejects_different_owner_after_concurrent_create_race(monkeypatch): + """A worker losing an index-creation race must not accept another collection's index.""" + from opensearchpy.exceptions import RequestError + + ingestor = OpenSearchIngestor({"start_ttl_cleanup": False}) + exists_calls = 0 + + def fake_exists(index: str) -> bool: + nonlocal exists_calls + del index + exists_calls += 1 + return exists_calls >= 2 + + def fake_create(index: str, body: dict[str, Any]) -> None: + del body + raise RequestError(400, "resource_already_exists_exception", {"index": index}) + + fake_client = type("C", (), {})() + fake_client.indices = type("I", (), {"exists": staticmethod(fake_exists), "create": staticmethod(fake_create)})() + monkeypatch.setattr(ingestor, "_get_client", lambda: fake_client) + monkeypatch.setattr( + ingestor, + "_get_index_meta", + lambda _index: { + "collection_name": "different-collection", + "embedding_model": ingestor.embed_model_name, + "embedding_dim": ingestor.embedding_dim, + }, + ) + + with pytest.raises(RuntimeError, match="different-collection"): + ingestor._ensure_index("smoke") + + def test_list_files_aggregates_and_avoids_10k_hit_truncation(monkeypatch): """list_files must request 0 hits and aggregate by file_name so collections with more than the 10k index.max_result_window are not silently truncated. From 39b7d084a7aead0e8957cf60c38c74ab2ce019f6 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 16:13:37 -0700 Subject: [PATCH 5/9] preserve Super for intent and shallow Signed-off-by: Ajay Thorve --- .../assets/config-scaffold.yml | 26 ++++++++++++- .../references/config-profiles.md | 2 +- .secrets.baseline | 4 +- README.md | 25 ++++++------ configs/config_cli_default.yml | 30 +++++++-------- configs/config_frontier_models.yml | 30 +++++++-------- configs/config_mcp.yml | 30 +++++++-------- configs/config_openshell.yml | 30 +++++++-------- configs/config_web_azure_ai_search.yml | 30 +++++++-------- configs/config_web_default_guardrails.yml | 30 +++++++-------- configs/config_web_default_llamaindex.yml | 30 +++++++-------- configs/config_web_frag.yml | 30 +++++++-------- configs/config_web_frag_mcp_auth.yml | 30 +++++++-------- configs/config_web_opensearch.yml | 30 +++++++-------- .../customization/configuration-reference.md | 38 +++++++++---------- docs/source/customization/mcp-tools.md | 2 +- docs/source/customization/swapping-models.md | 23 +++++------ .../source/customization/tools-and-sources.md | 2 +- .../examples/full-pipeline-llamaindex.md | 31 +++++++-------- docs/source/examples/full-pipeline-web.md | 36 +++++++++--------- docs/source/examples/hybrid-frontier-model.md | 25 ++++++------ docs/source/examples/minimal-shallow-only.md | 13 +++---- docs/source/get-started/installation.md | 2 +- docs/source/resources/troubleshooting.md | 2 +- .../freshqa/configs/config_full_workflow.yml | 30 +++++++-------- .../configs/config_shallow_research_only.yml | 16 ++++---- .../test_preclassification_integration.py | 2 +- .../aiq_agent/test_default_model_profiles.py | 17 +++++---- 28 files changed, 280 insertions(+), 316 deletions(-) diff --git a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml index 052c5d9b5..8539744f2 100644 --- a/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml +++ b/.agents/skills/aiq-configure-workflow/assets/config-scaffold.yml @@ -17,6 +17,28 @@ general: # Web/API: copy general.front_end from config_web_default_llamaindex.yml llms: + nemotron_llm_intent: + _type: nim + model_name: nvidia/nemotron-3-super-120b-a12b + base_url: "https://integrate.api.nvidia.com/v1" + temperature: 0.5 + top_p: 0.9 + max_tokens: 4096 + num_retries: 5 + chat_template_kwargs: + enable_thinking: true + + nemotron_super_llm: + _type: nim + model_name: nvidia/nemotron-3-super-120b-a12b + base_url: "https://integrate.api.nvidia.com/v1" + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 + num_retries: 5 + chat_template_kwargs: + enable_thinking: true + nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b @@ -46,11 +68,11 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_llm + llm: nemotron_llm_intent shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_llm + llm: nemotron_super_llm deep_research_agent: _type: deep_research_agent diff --git a/.agents/skills/aiq-configure-workflow/references/config-profiles.md b/.agents/skills/aiq-configure-workflow/references/config-profiles.md index 76b8ee335..d80f3f0ad 100644 --- a/.agents/skills/aiq-configure-workflow/references/config-profiles.md +++ b/.agents/skills/aiq-configure-workflow/references/config-profiles.md @@ -17,7 +17,7 @@ the file from `configs/`. For the full nine-profile table, see 3. **Model family** - Nemotron → most profiles - GPT-5.2 orchestration/planning/writing → `config_frontier_models.yml` (`OPENAI_API_KEY`) - - Default split → role-specific Ultra profiles, with a larger output budget for the writer + - Default split → existing Super profiles for intent/shallow, with Ultra for deep research and a larger writer budget 4. **Optional features** — copy blocks from: - Guardrails → `config_web_default_guardrails.yml` diff --git a/.secrets.baseline b/.secrets.baseline index 48e0d5d60..30f76a123 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -133,7 +133,7 @@ "filename": "README.md", "hashed_secret": "73140b88094aaf220a03532196b27b58a03c9b09", "is_verified": false, - "line_number": 398 + "line_number": 399 } ], "deploy/.env.example": [ @@ -355,5 +355,5 @@ } ] }, - "generated_at": "2026-08-04T22:06:06Z" + "generated_at": "2026-08-04T23:11:22Z" } diff --git a/README.md b/README.md index 2ec6ae249..28c3e8865 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,8 @@ The checked-in default CLI and web profiles use these core components: - [NVIDIA NeMo Agent Toolkit 1.8.0](https://docs.nvidia.com/nemo/agent-toolkit/latest/) - [LangChain Deep Agents](https://docs.langchain.com/oss/python/deepagents/overview) 0.6.5 or newer -- [NVIDIA Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for intent classification, shallow research, clarification, and every deep-research role in the default profiles +- [NVIDIA Nemotron 3 Super](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b) for intent classification and shallow research in the default profiles +- [NVIDIA Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for clarification and every deep-research role in the default profiles - [Google Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) (document summary, if used) - [NVIDIA Nemotron 3 Embed 1B](https://build.nvidia.com/nvidia/nemotron-3-embed-1b) (embedding model for the knowledge layer, if used) - [NVIDIA Nemotron 3 Nano Omni 30B A3B Reasoning](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) (vision-language model for the LlamaIndex knowledge layer, if used) @@ -149,7 +150,7 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-super-120b-a12b` | [Nemotron 3 Super](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b) | | LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | | Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | @@ -286,17 +287,17 @@ The `configs/` directory holds YAML workflow configs that define agents, tools, | Config | Models | Description | |--------|--------|-------------| -| `config_cli_default.yml` | Nemotron 3 Ultra | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | -| `config_web_default_llamaindex.yml` | Nemotron 3 Ultra; Gemma 4 summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | -| `config_web_frag.yml` | Nemotron 3 Ultra | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | -| `config_web_opensearch.yml` | Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | -| `config_web_azure_ai_search.yml` | Nemotron 3 Ultra; Nemotron 3 Embed | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | -| `config_frontier_models.yml` | GPT Sol/Luna; Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile using GPT Sol/Luna for deep research and Ultra for intent/shallow. Requires `OPENAI_API_KEY` and `NVIDIA_API_KEY`. | -| `config_web_default_guardrails.yml` | Nemotron 3 Ultra; Gemma 4 summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | -| `config_web_frag_mcp_auth.yml` | Nemotron 3 Ultra | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | +| `config_cli_default.yml` | Nemotron 3 Super/Ultra | CLI chat pipeline with Tavily and clarification; no knowledge backend. Paper search is a commented opt-in. | +| `config_web_default_llamaindex.yml` | Nemotron 3 Super/Ultra; Gemma 4 summary | Default web/API chat pipeline with LlamaIndex/ChromaDB and Tavily. Paper search is commented out. | +| `config_web_frag.yml` | Nemotron 3 Super/Ultra | Web/API and Helm base with Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. | +| `config_web_opensearch.yml` | Nemotron 3 Super/Ultra; Nemotron 3 Embed | Web/API with built-in OpenSearch knowledge retrieval plus Tavily; supports self-hosted, `es`, and `aoss` authentication modes. | +| `config_web_azure_ai_search.yml` | Nemotron 3 Super/Ultra; Nemotron 3 Embed | Web/API with Azure AI Search knowledge retrieval plus Tavily; supports API-key and Azure identity authentication. | +| `config_frontier_models.yml` | GPT Sol/Luna; Nemotron 3 Super/Ultra; Gemma 4 summary | LlamaIndex profile using GPT Sol/Luna for deep research and Super for intent/shallow. Requires `OPENAI_API_KEY` and `NVIDIA_API_KEY`. | +| `config_web_default_guardrails.yml` | Nemotron 3 Super/Ultra; Gemma 4 summary | LlamaIndex profile with workflow Guardrails explicitly attached, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. | +| `config_web_frag_mcp_auth.yml` | Nemotron 3 Super/Ultra | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. | | `config_domain_routing_and_skills.yml` | Nemotron 3 Ultra; Gemma 4 summary | Direct deep-research profile with domain routing, DuckDuckGo news, Polymarket, enabled Serper paper search, LlamaIndex, built-in skills, and a fresh per-job Modal sandbox. | -| `config_openshell.yml` | Nemotron 3 Ultra; Gemma 4 summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | -| `config_mcp.yml` | Nemotron 3 Ultra | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | +| `config_openshell.yml` | Nemotron 3 Super/Ultra; Gemma 4 summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. | +| `config_mcp.yml` | Nemotron 3 Super/Ultra | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. | ## Ways to Run the Agents diff --git a/configs/config_cli_default.yml b/configs/config_cli_default.yml index 599b95b0e..76913b37a 100644 --- a/configs/config_cli_default.yml +++ b/configs/config_cli_default.yml @@ -16,31 +16,27 @@ general: # project: nvidia-aiq llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -119,7 +115,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] # llm_timeout: 90 # optional; seconds for intent LLM call (default 90) @@ -135,7 +131,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_frontier_models.yml b/configs/config_frontier_models.yml index daa4c1f8a..218025913 100644 --- a/configs/config_frontier_models.yml +++ b/configs/config_frontier_models.yml @@ -50,31 +50,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.1 + top_p: 0.3 + max_tokens: 16384 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true gpt_sol_agent_llm: _type: openai @@ -140,7 +136,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent verbose: true tools: - web_search_tool @@ -159,7 +155,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm verbose: true tools: - web_search_tool diff --git a/configs/config_mcp.yml b/configs/config_mcp.yml index b0a2c0ab8..69b0019bc 100644 --- a/configs/config_mcp.yml +++ b/configs/config_mcp.yml @@ -26,31 +26,27 @@ general: level: INFO llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -99,7 +95,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # Defined for workflow compatibility but disabled at the workflow boundary. clarifier_agent: @@ -111,7 +107,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm exclude_tools: - advanced_web_search_tool max_llm_turns: 10 diff --git a/configs/config_openshell.yml b/configs/config_openshell.yml index 7ccfb8e0e..c48bc9977 100644 --- a/configs/config_openshell.yml +++ b/configs/config_openshell.yml @@ -28,31 +28,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -124,7 +120,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent verbose: true clarifier_agent: @@ -136,7 +132,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm exclude_tools: - advanced_web_search_tool verbose: true diff --git a/configs/config_web_azure_ai_search.yml b/configs/config_web_azure_ai_search.yml index 8eececbbd..acc5331eb 100644 --- a/configs/config_web_azure_ai_search.yml +++ b/configs/config_web_azure_ai_search.yml @@ -47,31 +47,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -191,7 +187,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true @@ -209,7 +205,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool diff --git a/configs/config_web_default_guardrails.yml b/configs/config_web_default_guardrails.yml index 215f497b6..6155f1062 100644 --- a/configs/config_web_default_guardrails.yml +++ b/configs/config_web_default_guardrails.yml @@ -28,31 +28,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -220,7 +216,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent verbose: true clarifier_agent: @@ -232,7 +228,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm exclude_tools: - advanced_web_search_tool verbose: true diff --git a/configs/config_web_default_llamaindex.yml b/configs/config_web_default_llamaindex.yml index da57ee7d8..872497407 100644 --- a/configs/config_web_default_llamaindex.yml +++ b/configs/config_web_default_llamaindex.yml @@ -47,31 +47,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -192,7 +188,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] verbose: true @@ -208,7 +204,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: # Remove advanced variant; shallow uses web_search_tool - advanced_web_search_tool diff --git a/configs/config_web_frag.yml b/configs/config_web_frag.yml index 16e979c9e..99f593ce5 100644 --- a/configs/config_web_frag.yml +++ b/configs/config_web_frag.yml @@ -49,31 +49,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -162,7 +158,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -177,7 +173,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_web_frag_mcp_auth.yml b/configs/config_web_frag_mcp_auth.yml index 747a6c44c..780b91882 100644 --- a/configs/config_web_frag_mcp_auth.yml +++ b/configs/config_web_frag_mcp_auth.yml @@ -56,31 +56,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -211,7 +207,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -226,7 +222,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/configs/config_web_opensearch.yml b/configs/config_web_opensearch.yml index d56e3c3c7..7b7452fe7 100644 --- a/configs/config_web_opensearch.yml +++ b/configs/config_web_opensearch.yml @@ -48,31 +48,27 @@ general: - "*" llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -169,7 +165,7 @@ functions: # ========================================================================= intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent # tools: omitted -> inherits all from data_source_registry # exclude_tools: [] @@ -184,7 +180,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm # tools: omitted -> inherits all from data_source_registry exclude_tools: - advanced_web_search_tool diff --git a/docs/source/customization/configuration-reference.md b/docs/source/customization/configuration-reference.md index 8a38d0a9f..b1c2cde5b 100644 --- a/docs/source/customization/configuration-reference.md +++ b/docs/source/customization/configuration-reference.md @@ -119,7 +119,7 @@ llms: | `top_p` | `float` | `None` | Nucleus sampling threshold. When `None`, the API uses its server-side default. | | `max_tokens` | `int` | `300` | Maximum tokens in the response. Set higher values (for example, `16384` or `128000`) for research agents. | | `num_retries` | `int` | `5` | Number of retry attempts on API failure. | -| `parallel_tool_calls` | `bool` | Provider default | Whether the provider can emit parallel tool calls. The default intent and shallow profiles set this to `false`. | +| `parallel_tool_calls` | `bool` | Provider default | Whether the provider can emit parallel tool calls. | | `chat_template_kwargs` | `object` | -- | Extra arguments passed to the chat template. Use `enable_thinking: true` to activate the model's chain-of-thought reasoning. | ### Common LLM Configurations @@ -128,8 +128,8 @@ Different agents benefit from different parameter profiles: | Role | Temperature | Top-p | Max Tokens | Notes | |------|------------|-------|------------|-------| -| Intent classifier (Ultra) | `0.1` | `0.9` | `1024` | Short deterministic classification; thinking disabled | -| Shallow researcher (Ultra) | `0.2` | `0.9` | `8192` | Tool-calling profile; parallel tool calls and thinking disabled | +| Intent classifier (Super) | `0.5` | `0.9` | `4096` | Existing classification profile; thinking enabled | +| Shallow researcher (Super) | `0.7` | `0.7` | `65536` | Existing research profile; thinking enabled | | Deep research roles (Ultra) | `0.2` | `0.7` | `16384` | Source routing, orchestration, planning, and research | | Deep research writer (Ultra) | `0.2` | `0.7` | `32768` | Larger report-writing budget | | Summary LLM (Gemma) | `0.1` | -- | `100` | Conservative, short document summaries | @@ -379,7 +379,7 @@ Classifies user queries as meta (conversational) or research, and determines res functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent tools: - web_search_tool - paper_search_tool @@ -588,31 +588,27 @@ general: # LLM definitions llms: - ultra_intent_llm: # Used by intent classifier + super_intent_llm: # Used by intent classifier _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - ultra_agent_llm: # Used by shallow researcher + super_agent_llm: # Used by shallow researcher _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true ultra_llm: # Used by clarifier and deep research _type: nim @@ -657,7 +653,7 @@ functions: intent_classifier: # Classifies queries, routes depth _type: intent_classifier - llm: ultra_intent_llm + llm: super_intent_llm tools: - web_search_tool - paper_search_tool @@ -672,7 +668,7 @@ functions: shallow_research_agent: # Fast single-pass research _type: shallow_research_agent - llm: ultra_agent_llm + llm: super_agent_llm tools: - web_search_tool max_llm_turns: 10 diff --git a/docs/source/customization/mcp-tools.md b/docs/source/customization/mcp-tools.md index e46ef2b3c..d2597d6d1 100644 --- a/docs/source/customization/mcp-tools.md +++ b/docs/source/customization/mcp-tools.md @@ -114,7 +114,7 @@ Use `exclude_tools` to specialize individual agents: functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm exclude_tools: - mcp_financial_tools__expensive_long_running_tool ``` diff --git a/docs/source/customization/swapping-models.md b/docs/source/customization/swapping-models.md index 6441dc180..cc132a307 100644 --- a/docs/source/customization/swapping-models.md +++ b/docs/source/customization/swapping-models.md @@ -10,18 +10,14 @@ LLMs are defined in the `llms` section and referenced by agents and tools. You c ```yaml llms: - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 + temperature: 0.7 + top_p: 0.7 max_tokens: 8192 num_retries: 5 - parallel_tool_calls: false - chat_template_kwargs: - enable_thinking: false ``` **Example: NIM with thinking (for example, for deep research)** @@ -40,7 +36,7 @@ llms: enable_thinking: true ``` -**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_ultra_llm`, `llm: nemotron_ultra_agent_llm`). Use different keys in `llms` and point agents at them to swap models per role. +**Model roles:** The workflow maps LLMs to roles (orchestrator, researcher, planner, etc.) through the `LLMProvider`. In YAML you assign which named LLM each agent uses (for example, `orchestrator_llm: nemotron_ultra_llm`, `llm: nemotron_super_llm`). Use different keys in `llms` and point agents at them to swap models per role. ## Using Downloadable NIMs (Self-Hosted) @@ -76,7 +72,7 @@ llms: ``` ```{note} -**Hosted Endpoint Availability:** The default profiles use Nemotron 3 Ultra for intent and shallow research, and Nemotron 3 Ultra for clarification and every deep-research role. Shared hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). +**Hosted Endpoint Availability:** The default profiles retain Nemotron 3 Super for intent and shallow research, and use Nemotron 3 Ultra for clarification and every deep-research role. Shared hosted endpoints can have limited availability during high demand (HTTP 429 or 503 responses). For production deployments requiring consistent throughput, refer to the [self-hosting guidance](../resources/troubleshooting.md#nemotron-hosted-endpoint-availability). ``` You can mix hosted and local NIMs in the same config -- for example, use a hosted endpoint for shallow research and a local downloadable Ultra NIM for deep research: @@ -85,12 +81,11 @@ You can mix hosted and local NIMs in the same config -- for example, use a hoste llms: hosted_shallow_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - max_tokens: 8192 - parallel_tool_calls: false + temperature: 0.7 + max_tokens: 65536 local_ultra_llm: _type: nim diff --git a/docs/source/customization/tools-and-sources.md b/docs/source/customization/tools-and-sources.md index 8ab929e1e..e0412b604 100644 --- a/docs/source/customization/tools-and-sources.md +++ b/docs/source/customization/tools-and-sources.md @@ -137,7 +137,7 @@ functions: # Agents with no tools list inherit all registry tools intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent clarifier_agent: _type: clarifier_agent diff --git a/docs/source/examples/full-pipeline-llamaindex.md b/docs/source/examples/full-pipeline-llamaindex.md index 3408e2230..699eb7b81 100644 --- a/docs/source/examples/full-pipeline-llamaindex.md +++ b/docs/source/examples/full-pipeline-llamaindex.md @@ -43,32 +43,29 @@ general: # LLMs # =========================================================================== llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.1 + top_p: 0.3 + max_tokens: 16384 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true + # LLM for document summaries (shown in the UI after upload) nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b @@ -140,7 +137,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent verbose: true tools: - web_search_tool @@ -159,7 +156,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm verbose: true tools: - web_search_tool diff --git a/docs/source/examples/full-pipeline-web.md b/docs/source/examples/full-pipeline-web.md index a5492b52d..3e5acdf82 100644 --- a/docs/source/examples/full-pipeline-web.md +++ b/docs/source/examples/full-pipeline-web.md @@ -61,34 +61,34 @@ general: # LLMs # =========================================================================== # Role-specific LLM configurations: -# - Ultra for intent classification, shallow research, clarification, and every deep-research role +# - Super for intent classification and shallow research +# - Ultra for clarification and every deep-research role llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 + temperature: 0.5 # Moderate: needs to reason about intent top_p: 0.9 - max_tokens: 1024 + max_tokens: 4096 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.1 # Low: factual research output + top_p: 0.3 + max_tokens: 16384 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true +# =========================================================================== +# Functions (tools and agents) +# =========================================================================== nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b @@ -156,7 +156,7 @@ functions: # Has access to tools for context-aware routing decisions. intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent tools: - web_search_tool - paper_search_tool @@ -183,7 +183,7 @@ functions: # Single-turn ReAct agent for quick queries. shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm tools: - web_search_tool - knowledge_search diff --git a/docs/source/examples/hybrid-frontier-model.md b/docs/source/examples/hybrid-frontier-model.md index e42961079..a56892212 100644 --- a/docs/source/examples/hybrid-frontier-model.md +++ b/docs/source/examples/hybrid-frontier-model.md @@ -19,24 +19,21 @@ and a frontier model for deep research (higher quality reports). ```yaml llms: # NIM profiles for intent and shallow research - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 - max_tokens: 1024 - parallel_tool_calls: false + temperature: 0.5 + max_tokens: 4096 - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - max_tokens: 8192 - parallel_tool_calls: false + temperature: 0.1 + max_tokens: 16384 + # Frontier model for deep research (higher quality) nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b @@ -73,7 +70,7 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent tools: - web_search_tool - knowledge_search @@ -88,7 +85,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm tools: - web_search_tool - knowledge_search diff --git a/docs/source/examples/minimal-shallow-only.md b/docs/source/examples/minimal-shallow-only.md index f09cff870..6f80af2c6 100644 --- a/docs/source/examples/minimal-shallow-only.md +++ b/docs/source/examples/minimal-shallow-only.md @@ -25,21 +25,20 @@ general: # --------------------------------------------------------------------------- # LLMs # --------------------------------------------------------------------------- -# A single role-specific Ultra LLM is sufficient for shallow research. The NIM type connects +# A single role-specific Super LLM is sufficient for shallow research. The NIM type connects # to NVIDIA API Catalog. llms: research_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 # Max output length per LLM call + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 # Max output length per LLM call num_retries: 5 # Retry on transient API failures - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true # --------------------------------------------------------------------------- # Tools diff --git a/docs/source/get-started/installation.md b/docs/source/get-started/installation.md index 8e5f3e3c2..8acf44784 100644 --- a/docs/source/get-started/installation.md +++ b/docs/source/get-started/installation.md @@ -25,7 +25,7 @@ When using [NVIDIA API Catalog](https://build.nvidia.com/) (the default), infere | Component | Default Model | Self-Hosted Hardware Reference | |-----------|---------------|-------------------------------| -| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | +| LLM (intent classifier, shallow researcher) | `nvidia/nemotron-3-super-120b-a12b` | [Nemotron 3 Super](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b) | | LLM (clarifier and all deep-research roles) | `nvidia/nemotron-3-ultra-550b-a55b` | [Nemotron 3 Ultra](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) | | Document summary (optional) | `google/gemma-4-31b-it` | [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) | | Text embedding | `nvidia/nemotron-3-embed-1b` | [NeMo Retriever embedding support matrix](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/support-matrix.html) | diff --git a/docs/source/resources/troubleshooting.md b/docs/source/resources/troubleshooting.md index 196ba6a42..409986a70 100644 --- a/docs/source/resources/troubleshooting.md +++ b/docs/source/resources/troubleshooting.md @@ -50,7 +50,7 @@ Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) is compatible and tested - HTTP 429 (rate-limited) or 503 (service unavailable) responses from the Build API - Degraded agent workflow performance due to upstream model availability -**Default Configuration:** The default configs use Nemotron 3 Ultra for intent classification, shallow research, clarification, and all deep-research roles. If the hosted endpoint is saturated, retry after a short delay, reduce concurrency, or self-host a downloadable model for consistent throughput. +**Default Configuration:** The default configs retain Nemotron 3 Super for intent classification and shallow research, and use Nemotron 3 Ultra for clarification and all deep-research roles. If either hosted endpoint is saturated, retry after a short delay, reduce concurrency, or self-host a downloadable model for consistent throughput. ### Recommended Mitigation: Self-Host the Affected Model diff --git a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml index ffcb9eb81..af1cbc247 100644 --- a/frontends/benchmarks/freshqa/configs/config_full_workflow.yml +++ b/frontends/benchmarks/freshqa/configs/config_full_workflow.yml @@ -9,31 +9,27 @@ general: level: INFO llms: - nemotron_ultra_intent_llm: + nemotron_llm_intent: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.1 - top_p: 0.9 - max_tokens: 1024 + temperature: 0.7 + top_p: 0.7 + max_tokens: 8192 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: enable_thinking: false - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true nemotron_ultra_llm: _type: nim @@ -73,11 +69,11 @@ functions: intent_classifier: _type: intent_classifier - llm: nemotron_ultra_intent_llm + llm: nemotron_llm_intent shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm tools: - web_search_tool max_llm_turns: 10 diff --git a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml index 967d684d4..b2900c1b4 100644 --- a/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml +++ b/frontends/benchmarks/freshqa/configs/config_shallow_research_only.yml @@ -13,18 +13,16 @@ general: project: "AIQ_v2_freshqa" llms: - nemotron_ultra_agent_llm: + nemotron_super_llm: _type: nim - model_name: nvidia/nemotron-3-ultra-550b-a55b + model_name: nvidia/nemotron-3-super-120b-a12b base_url: "https://integrate.api.nvidia.com/v1" - api_key: ${NVIDIA_API_KEY} - temperature: 0.2 - top_p: 0.9 - max_tokens: 8192 + temperature: 0.7 + top_p: 0.7 + max_tokens: 65536 num_retries: 5 - parallel_tool_calls: false chat_template_kwargs: - enable_thinking: false + enable_thinking: true judge_llm: _type: openai @@ -39,7 +37,7 @@ functions: shallow_research_agent: _type: shallow_research_agent - llm: nemotron_ultra_agent_llm + llm: nemotron_super_llm max_llm_turns: 20 tools: - web_search_tool diff --git a/mcp/tests/test_preclassification_integration.py b/mcp/tests/test_preclassification_integration.py index 467a6a16a..315b5f50e 100644 --- a/mcp/tests/test_preclassification_integration.py +++ b/mcp/tests/test_preclassification_integration.py @@ -27,7 +27,7 @@ from nat.builder.workflow_builder import WorkflowBuilder _REPO_ROOT = Path(__file__).resolve().parents[2] -_INTENT_LLM_NAME = "nemotron_ultra_intent_llm" +_INTENT_LLM_NAME = "nemotron_llm_intent" class _CountingIntentLLM: diff --git a/tests/aiq_agent/test_default_model_profiles.py b/tests/aiq_agent/test_default_model_profiles.py index daa82ce78..a605a64a0 100644 --- a/tests/aiq_agent/test_default_model_profiles.py +++ b/tests/aiq_agent/test_default_model_profiles.py @@ -9,6 +9,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2] ULTRA_MODEL = "nvidia/nemotron-3-ultra-550b-a55b" +SUPER_MODEL = "nvidia/nemotron-3-super-120b-a12b" CONFIG_GLOBS = ( ".agents/skills/aiq-configure-workflow/assets/config-scaffold.yml", @@ -17,8 +18,10 @@ ) CONFIG_PATHS = tuple(sorted(path for pattern in CONFIG_GLOBS for path in REPO_ROOT.glob(pattern))) -DEPRECATED_REFERENCES = ( - "/".join(("nvidia", "nemotron-3-super-120b-a12b")), +# Super remains intentionally pinned for intent and shallow research until the +# separately gated Nano 3.5 follow-up is available. Every other deprecated +# reference must be removed by this migration. +REPLACED_REFERENCES = ( "/".join(("nvidia", "nemotron-3-nano-30b-a3b")), "/".join(("nvidia", "nemotron-mini-4b-instruct")), "/".join(("nvidia", "llama-nemotron-embed-vl-1b-v2")), @@ -70,9 +73,9 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path): function_type = function.get("_type") if function_type == "intent_classifier": - assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL + assert _model_for_alias(config, function["llm"]) == SUPER_MODEL elif function_type == "shallow_research_agent": - assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL + assert _model_for_alias(config, function["llm"]) == SUPER_MODEL elif config_path.name != "config_frontier_models.yml" and function_type == "clarifier_agent": assert _model_for_alias(config, function["llm"]) == ULTRA_MODEL elif config_path.name != "config_frontier_models.yml" and function_type == "deep_research_agent": @@ -87,7 +90,7 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path): assert _model_for_alias(config, function[role]) == ULTRA_MODEL -def test_deprecated_model_and_endpoint_references_are_absent(): +def test_replaced_model_and_endpoint_references_are_absent(): violations: list[str] = [] for path in REPO_ROOT.rglob("*"): @@ -95,8 +98,8 @@ def test_deprecated_model_and_endpoint_references_are_absent(): continue text = path.read_text(encoding="utf-8") - for reference in DEPRECATED_REFERENCES: + for reference in REPLACED_REFERENCES: if reference in text: violations.append(f"{path.relative_to(REPO_ROOT)}: {reference}") - assert not violations, "Deprecated references remain:\n" + "\n".join(violations) + assert not violations, "Replaced references remain:\n" + "\n".join(violations) From e8a81c11e897eea27ac7cf4e52dc91c4ca7d9bc5 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 16:19:50 -0700 Subject: [PATCH 6/9] address final model migration review Signed-off-by: Ajay Thorve --- .../0_Getting_Started_with_AIQ.ipynb | 33 ++++++++++----- docs/source/customization/knowledge-layer.md | 5 ++- .../knowledge_layer/src/opensearch/adapter.py | 3 +- .../test_opensearch_adapter.py | 40 +++++++++++++++++++ 4 files changed, 68 insertions(+), 13 deletions(-) diff --git a/docs/notebooks/0_Getting_Started_with_AIQ.ipynb b/docs/notebooks/0_Getting_Started_with_AIQ.ipynb index d789aa41b..a6e011213 100644 --- a/docs/notebooks/0_Getting_Started_with_AIQ.ipynb +++ b/docs/notebooks/0_Getting_Started_with_AIQ.ipynb @@ -71,11 +71,11 @@ "The following are used by this project:\n", "\n", "- [NVIDIA NeMo Agent toolkit](https://docs.nvidia.com/nemo/agent-toolkit/latest/)\n", - "- [NIM of nvidia/nemotron-3-super-120b-a12b](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b) for intent classification, shallow research, and deep-research writing\n", - "- [NIM of nvidia/nemotron-3-ultra-550b-a55b](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for deep-research source routing, orchestration, planning, and research\n", - "- [NIM of nvidia/llama-nemotron-embed-vl-1b-v2](https://build.nvidia.com/nvidia/llama-nemotron-embed-vl-1b-v2) (Optional)\n", - "- [NIM of nvidia/nemotron-nano-12b-v2-vl](https://build.nvidia.com/nvidia/nemotron-nano-12b-v2-vl) (Optional)\n", - "- [NVIDIA nvidia/nemotron-mini-4b-instruct](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct) (Optional)\n", + "- [NIM of nvidia/nemotron-3-super-120b-a12b](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b) for intent classification and shallow research\n", + "- [NIM of nvidia/nemotron-3-ultra-550b-a55b](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b) for every deep-research role\n", + "- [NIM of nvidia/nemotron-3-embed-1b](https://build.nvidia.com/nvidia/nemotron-3-embed-1b) (Optional)\n", + "- [NIM of nvidia/nemotron-3-nano-omni-30b-a3b-reasoning](https://build.nvidia.com/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning) (Optional)\n", + "- [NVIDIA google/gemma-4-31b-it](https://build.nvidia.com/google/gemma-4-31b-it) (Optional)\n", "- [Tavily Search API](https://tavily.com/) for web search\n", "- [NeMo Guardrails](https://docs.nvidia.com/nemo/guardrails/latest/) through NeMo Agent Toolkit middleware (Optional)\n", "- [NVIDIA OpenShell](https://docs.nvidia.com/openshell/latest/about/installation) (Optional)" @@ -329,12 +329,25 @@ " _type: nim\n", " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", " base_url: \"https://integrate.api.nvidia.com/v1\"\n", - " temperature: 0.7\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", " top_p: 0.7\n", - " max_tokens: 65536\n", + " max_tokens: 16384\n", " num_retries: 5\n", " chat_template_kwargs:\n", - " enable_thinking: true\n", + " enable_thinking: false\n", + "\n", + " nemotron_ultra_writer_llm:\n", + " _type: nim\n", + " model_name: nvidia/nemotron-3-ultra-550b-a55b\n", + " base_url: \"https://integrate.api.nvidia.com/v1\"\n", + " api_key: ${NVIDIA_API_KEY}\n", + " temperature: 0.2\n", + " top_p: 0.7\n", + " max_tokens: 32768\n", + " num_retries: 5\n", + " chat_template_kwargs:\n", + " enable_thinking: false\n", "\n", "functions:\n", " web_search_tool:\n", @@ -365,7 +378,7 @@ " source_router_llm: nemotron_ultra_llm\n", " researcher_llm: nemotron_ultra_llm\n", " planner_llm: nemotron_ultra_llm\n", - " writer_llm: nemotron_super_llm\n", + " writer_llm: nemotron_ultra_writer_llm\n", " tools:\n", " - advanced_web_search_tool\n", "\n", @@ -388,7 +401,7 @@ "\n", "**`general.front_end`** wires the Web API (AI-Q API Worker), async job store, and CORS for the chat UI.\n", "\n", - "**`llms`** wires the models for the agents: Nemotron Super for intent, shallow research, and deep-research writing; Nemotron Ultra for deep-research source routing, orchestration, planning, and research.\n", + "**`llms`** retains Nemotron Super for intent and shallow research, and uses role-specific Nemotron Ultra profiles for every deep-research role.\n", "\n", "**`functions`** register tools (Tavily web search, plus advanced search), the intent classifier, and the shallow and deep research agents with their assigned tools and LLMs.\n", " \n", diff --git a/docs/source/customization/knowledge-layer.md b/docs/source/customization/knowledge-layer.md index 1a7417c52..7d3daf0ff 100644 --- a/docs/source/customization/knowledge-layer.md +++ b/docs/source/customization/knowledge-layer.md @@ -272,8 +272,9 @@ The full shipped profile is Persisted vector stores are tied to both the embedding model and its output dimension. Changing only `AIQ_EMBED_MODEL` is not a compatible in-place update: -- **Chroma:** stop AI-Q, delete the existing collection directory (or configure a new `AIQ_CHROMA_DIR`), restart, and - re-ingest every document. +- **Chroma:** delete only the affected logical collection through the Knowledge API or UI, then re-ingest its + documents. Configuring a new `AIQ_CHROMA_DIR` also creates an isolated store. Deleting the existing shared + `AIQ_CHROMA_DIR` removes every named collection in that store and can destroy unrelated data. - **OpenSearch:** set `OPENSEARCH_EMBEDDING_DIM` to the new model's exact output length, delete the existing AI-Q collection/index, and re-ingest every document. AI-Q rejects unmarked or incompatible indexes before ingestion or retrieval. diff --git a/sources/knowledge_layer/src/opensearch/adapter.py b/sources/knowledge_layer/src/opensearch/adapter.py index 42cbe204c..2cf47b791 100644 --- a/sources/knowledge_layer/src/opensearch/adapter.py +++ b/sources/knowledge_layer/src/opensearch/adapter.py @@ -1585,7 +1585,8 @@ async def retrieve( success=False, error_message=f"Collection '{collection_name}' not found", ) - await asyncio.to_thread(self._validate_index_embedding, index_name) + meta = await asyncio.to_thread(self._validate_index_embedding, index_name) + self._validate_index_owner(index_name, collection_name, meta) query_embedding = (await asyncio.to_thread(self._embed_texts, [query]))[0] self._validate_embedding_vectors([query_embedding], operation="query") diff --git a/tests/knowledge_layer_tests/test_opensearch_adapter.py b/tests/knowledge_layer_tests/test_opensearch_adapter.py index 526ddbbc0..d5ff7b563 100644 --- a/tests/knowledge_layer_tests/test_opensearch_adapter.py +++ b/tests/knowledge_layer_tests/test_opensearch_adapter.py @@ -580,11 +580,51 @@ def test_retrieval_rejects_mismatched_query_dimension_before_search(): index_name = retriever._index_name_for_collection("docs") fake_client.indexes[index_name] = retriever._index_mapping("docs") retriever._embed_texts = lambda _texts: [[0.1, 0.2, 0.3]] + search_calls = 0 + + def unexpected_search(*_args, **_kwargs): + nonlocal search_calls + search_calls += 1 + raise AssertionError("search must not run for a mismatched query vector") + + fake_client.search = unexpected_search result = asyncio.run(retriever.retrieve("question", "docs")) assert not result.success assert "query embedding 0 has dimension 3" in (result.error_message or "") + assert search_calls == 0 + + +def test_retrieval_rejects_mismatched_collection_owner_before_embedding_or_search(): + """Retrieval must fail before model or OpenSearch calls when an index has another owner.""" + fake_client = FakeOpenSearchClient() + retriever = OpenSearchRetriever({"embed_model": "nvidia/test-embed", "embedding_dim": 4}) + retriever._client = fake_client + index_name = retriever._index_name_for_collection("docs") + fake_client.indexes[index_name] = retriever._index_mapping("another-collection") + embedding_calls = 0 + search_calls = 0 + + def unexpected_embedding(_texts): + nonlocal embedding_calls + embedding_calls += 1 + raise AssertionError("query embedding must not run for an index owned by another collection") + + def unexpected_search(*_args, **_kwargs): + nonlocal search_calls + search_calls += 1 + raise AssertionError("search must not run for an index owned by another collection") + + retriever._embed_texts = unexpected_embedding + fake_client.search = unexpected_search + + result = asyncio.run(retriever.retrieve("question", "docs")) + + assert not result.success + assert "belongs to collection 'another-collection'" in (result.error_message or "") + assert embedding_calls == 0 + assert search_calls == 0 def test_session_collection_names_are_safe_dynamic_indexes(): From ace9f70afcfea2b01e89f6d71f3e3bb4aab498a9 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 16:25:34 -0700 Subject: [PATCH 7/9] address final documentation review Signed-off-by: Ajay Thorve --- docs/source/examples/full-pipeline-llamaindex.md | 2 +- tests/aiq_agent/test_default_model_profiles.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/examples/full-pipeline-llamaindex.md b/docs/source/examples/full-pipeline-llamaindex.md index 699eb7b81..be63255aa 100644 --- a/docs/source/examples/full-pipeline-llamaindex.md +++ b/docs/source/examples/full-pipeline-llamaindex.md @@ -65,7 +65,7 @@ llms: chat_template_kwargs: enable_thinking: true - # LLM for document summaries (shown in the UI after upload) + # LLM for clarification and deep-research roles nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b diff --git a/tests/aiq_agent/test_default_model_profiles.py b/tests/aiq_agent/test_default_model_profiles.py index a605a64a0..3372111bb 100644 --- a/tests/aiq_agent/test_default_model_profiles.py +++ b/tests/aiq_agent/test_default_model_profiles.py @@ -30,6 +30,7 @@ ".".join(("inference-api", "nvidia", "com")), ) SCANNED_SUFFIXES = { + ".baseline", ".example", ".ipynb", ".json", From d4ce6e6ae9b453082baaff5c1558bd668296f17c Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 16:49:22 -0700 Subject: [PATCH 8/9] fix VDR runtime regressions Signed-off-by: Ajay Thorve --- deploy/entrypoint.py | 7 +-- .../deep_researcher/custom_middleware.py | 7 ++- .../agents/shallow_researcher/agent.py | 10 ++++- src/aiq_agent/common/citation_verification.py | 43 ++++++++++++++++--- .../deep_researcher/test_custom_middleware.py | 14 +++++- .../agents/shallow_researcher/test_agent.py | 12 ++++++ .../common/test_citation_verification.py | 39 +++++++++++++++++ tests/deploy/test_entrypoint.py | 23 ++++++++++ 8 files changed, 142 insertions(+), 13 deletions(-) diff --git a/deploy/entrypoint.py b/deploy/entrypoint.py index 545897655..a3eff50b2 100644 --- a/deploy/entrypoint.py +++ b/deploy/entrypoint.py @@ -156,6 +156,8 @@ def main() -> int: raise SystemExit(str(exc)) from exc lifetime_restart = os.getenv("DASK_LIFETIME_RESTART", "true").lower() != "false" + child_env = os.environ.copy() + child_env["NAT_DASK_SCHEDULER_ADDRESS"] = f"tcp://{_DASK_LOOPBACK_HOST}:{scheduler_port}" worker_proc = subprocess.Popen( _worker_args( scheduler_port, @@ -165,13 +167,12 @@ def main() -> int: lifetime=lifetime, lifetime_restart=lifetime_restart, ), + env=child_env, ) print("Waiting for worker to connect...", flush=True) time.sleep(3) - os.environ["NAT_DASK_SCHEDULER_ADDRESS"] = f"tcp://{_DASK_LOOPBACK_HOST}:{scheduler_port}" - print("", flush=True) print("--------------------------------------------", flush=True) print(" Dask cluster ready", flush=True) @@ -179,7 +180,7 @@ def main() -> int: print("--------------------------------------------", flush=True) print("", flush=True) - web_proc = subprocess.Popen(["python", "/app/deploy/start_web.py"]) + web_proc = subprocess.Popen(["python", "/app/deploy/start_web.py"], env=child_env) _install_signal_handlers(scheduler_proc, worker_proc, web_proc) try: diff --git a/src/aiq_agent/agents/deep_researcher/custom_middleware.py b/src/aiq_agent/agents/deep_researcher/custom_middleware.py index fcd56083b..fe784d693 100644 --- a/src/aiq_agent/agents/deep_researcher/custom_middleware.py +++ b/src/aiq_agent/agents/deep_researcher/custom_middleware.py @@ -985,7 +985,12 @@ async def awrap_tool_call(self, request, handler): if tool_name not in self._source_tool_names: return result source_id = get_source_id_for_tool(tool_name) - sources = extract_sources_from_tool_result(tool_name, str(result.content), source_id=source_id) + sources = extract_sources_from_tool_result( + tool_name, + str(result.content), + source_id=source_id, + result_status=getattr(result, "status", None), + ) async with self._lock: active_registry = self.active_registry() for source in sources: diff --git a/src/aiq_agent/agents/shallow_researcher/agent.py b/src/aiq_agent/agents/shallow_researcher/agent.py index 167a63a0a..934ab8a6a 100644 --- a/src/aiq_agent/agents/shallow_researcher/agent.py +++ b/src/aiq_agent/agents/shallow_researcher/agent.py @@ -244,7 +244,8 @@ async def agent_node(state: ShallowResearchAgentState) -> dict[str, Any]: response = await self._get_llm().ainvoke(full_messages) return {"messages": [response], "tool_iterations": iterations} - llm_with_tools = self._get_llm().bind_tools(self.tools, parallel_tool_calls=True) + llm = self._get_llm() + llm_with_tools = llm.bind_tools(self.tools, parallel_tool_calls=True) if self.tools else llm full_messages = [system_message] + processed_history response = await llm_with_tools.ainvoke(full_messages) @@ -305,7 +306,12 @@ async def tool_node_with_source_capture(state: ShallowResearchAgentState) -> dic tool_name, ) continue - sources = extract_sources_from_tool_result(tool_name, str(msg.content), source_id=source_id) + sources = extract_sources_from_tool_result( + tool_name, + str(msg.content), + source_id=source_id, + result_status=getattr(msg, "status", None), + ) for source in sources: active_registry.add(source) if sources: diff --git a/src/aiq_agent/common/citation_verification.py b/src/aiq_agent/common/citation_verification.py index 79754f1c4..08868cd65 100644 --- a/src/aiq_agent/common/citation_verification.py +++ b/src/aiq_agent/common/citation_verification.py @@ -498,6 +498,7 @@ def extract_sources_from_tool_result( tool_name: str, content: str, source_id: str | None = None, + result_status: str | None = None, ) -> list[SourceEntry]: """Extract sources from a tool's output. @@ -512,7 +513,8 @@ def extract_sources_from_tool_result( This means new sources (Bing, Perplexity, etc.) work automatically without any parser registration — as long as their output contains URLs. - The non-URL fallback is permissive on purpose: callers (the shallow and + A typed ``error`` result is never citable, even when its diagnostic body + contains URLs. The non-URL fallback is permissive on purpose: callers (the shallow and deep researchers) are responsible for deciding which tool calls are eligible to contribute sources, typically by limiting capture to the agent's loaded tool set. The optional ``source_id`` is stored on the @@ -521,6 +523,12 @@ def extract_sources_from_tool_result( :func:`aiq_agent.common.data_source_registry.get_source_id_for_tool`, but it does not gate the fallback. """ + # Reject provider/status payloads before running source parsers. Error + # responses can contain documentation or request URLs, but those URLs are + # diagnostics rather than evidence and must not satisfy citation checks. + if result_status == "error" or _is_non_citable_status_output(content): + return [] + name_lower = tool_name.lower() for match_fn, parser_fn in _PARSER_REGISTRY: if match_fn(name_lower): @@ -534,9 +542,6 @@ def extract_sources_from_tool_result( if entries: return entries - if _is_non_citable_status_output(content): - return [] - # Non-URL fallback: register the tool result itself as a source whenever # the tool produced non-empty output. The caller has already decided # this tool is eligible to contribute sources (typically by limiting @@ -552,7 +557,35 @@ def _is_non_citable_status_output(content: str) -> bool: normalized = re.sub(r"\s+", " ", content.strip()).rstrip(".").lower() if not normalized: return False - if normalized.startswith("error:"): + + try: + payload = json.loads(content) + except (json.JSONDecodeError, TypeError): + payload = None + if isinstance(payload, dict): + error = payload.get("error") + if error not in (None, False, "", [], {}): + return True + for key in ("status", "status_code", "statusCode", "http_status"): + status = payload.get(key) + try: + status_code = int(status) + except (TypeError, ValueError): + continue + if 400 <= status_code < 600: + return True + + if re.match(r"^error(?:\s*[:=]|\s+[45]\d{2}\b)", normalized): + return True + if re.match( + r"^(?:search|request|tool)\b.{0,80}\b(?:error|failed|failure)\b.{0,40}\b(?:status\s*)?[45]\d{2}\b", + normalized, + ): + return True + if normalized.startswith(("{", "[")) and re.search( + r"[\"']?(?:status|status[_-]?code|http[_-]?status)[\"']?\s*[:=]\s*[\"']?[45]\d{2}\b", + normalized, + ): return True return normalized == "search returned no results" or normalized.endswith(" search returned no results") diff --git a/tests/aiq_agent/agents/deep_researcher/test_custom_middleware.py b/tests/aiq_agent/agents/deep_researcher/test_custom_middleware.py index fe8005d23..534cedcda 100644 --- a/tests/aiq_agent/agents/deep_researcher/test_custom_middleware.py +++ b/tests/aiq_agent/agents/deep_researcher/test_custom_middleware.py @@ -1260,8 +1260,8 @@ def _make_request(self, tool_name: str): req.tool_call = {"name": tool_name} return req - def _make_tool_result(self, content: str): - return ToolMessage(content=content, tool_call_id="tc1") + def _make_tool_result(self, content: str, *, status: str = "success"): + return ToolMessage(content=content, tool_call_id="tc1", status=status) # -- URL extraction -- @@ -1290,6 +1290,16 @@ async def test_multiple_urls_captured(self, middleware): urls = {s.url for s in middleware.registry.all_sources()} assert urls == {"https://a.com/page", "https://b.com/page"} + @pytest.mark.asyncio + async def test_typed_error_result_is_not_captured(self, middleware): + content = "Search failed. See https://provider.example/errors/unknown" + handler = AsyncMock(return_value=self._make_tool_result(content, status="error")) + request = self._make_request("advanced_web_search_tool") + + await middleware.awrap_tool_call(request, handler) + + assert middleware.registry.all_sources() == [] + @pytest.mark.asyncio async def test_knowledge_layer_citation_key_captured(self, middleware): """Knowledge layer citation keys are captured via regex.""" diff --git a/tests/aiq_agent/agents/shallow_researcher/test_agent.py b/tests/aiq_agent/agents/shallow_researcher/test_agent.py index eced4b25f..8c799ac19 100644 --- a/tests/aiq_agent/agents/shallow_researcher/test_agent.py +++ b/tests/aiq_agent/agents/shallow_researcher/test_agent.py @@ -146,6 +146,18 @@ def test_init_with_empty_tools(self, mock_llm_provider): assert agent.tools == [] assert agent.tools_info == [] + @pytest.mark.asyncio + async def test_empty_tools_invoke_unbound_llm(self, mock_llm_provider, mock_llm): + """An empty tool selection must omit the provider's tools property.""" + mock_llm.ainvoke = AsyncMock(return_value=AIMessage(content="Answer without tools")) + agent = ShallowResearcherAgent(llm_provider=mock_llm_provider, tools=[]) + + result = await agent.run(ShallowResearchAgentState(messages=[HumanMessage(content="Answer directly")])) + + assert result.messages[-1].content == "Answer without tools" + mock_llm.bind_tools.assert_not_called() + mock_llm.ainvoke.assert_awaited() + def test_build_tools_info(self, mock_llm_provider, real_tool): """Test _build_tools_info correctly extracts tool information.""" agent = ShallowResearcherAgent( diff --git a/tests/aiq_agent/common/test_citation_verification.py b/tests/aiq_agent/common/test_citation_verification.py index 5e1f55c49..f392a609c 100644 --- a/tests/aiq_agent/common/test_citation_verification.py +++ b/tests/aiq_agent/common/test_citation_verification.py @@ -460,6 +460,45 @@ def test_error_status_is_not_citable(self): ) assert entries == [] + @pytest.mark.parametrize( + "content", + [ + "Error 432: search request rejected", + "Search Error 432", + "Search failed with status 429", + '{"status_code": 429, "error": "rate limited"}', + ], + ) + def test_provider_failure_statuses_are_not_citable(self, content): + entries = extract_sources_from_tool_result("web_search_tool", content, source_id="web_search") + + assert entries == [] + + def test_error_payload_urls_are_not_citable(self): + content = '{"status": 432, "error": "see https://provider.example/errors/432"}' + + entries = extract_sources_from_tool_result("web_search_tool", content, source_id="web_search") + + assert entries == [] + + def test_typed_error_result_urls_are_not_citable(self): + entries = extract_sources_from_tool_result( + "web_search_tool", + "See https://provider.example/errors/unknown", + source_id="web_search", + result_status="error", + ) + + assert entries == [] + + def test_valid_http_status_explanation_remains_citable(self): + content = "An HTTP 404 status code means not found. See https://developer.mozilla.org/en-US/docs/Web/HTTP/404" + + entries = extract_sources_from_tool_result("web_search_tool", content, source_id="web_search") + + assert len(entries) == 1 + assert entries[0].url == "https://developer.mozilla.org/en-US/docs/Web/HTTP/404" + def test_duplicate_urls_deduplicated(self): content = "See https://example.com/page and also https://example.com/page for reference." entries = extract_sources_from_tool_result("any_tool", content) diff --git a/tests/deploy/test_entrypoint.py b/tests/deploy/test_entrypoint.py index e7f3ab992..4d6d0c10a 100644 --- a/tests/deploy/test_entrypoint.py +++ b/tests/deploy/test_entrypoint.py @@ -8,6 +8,7 @@ import importlib.util import subprocess from pathlib import Path +from unittest.mock import MagicMock from distributed import Client from distributed import LocalCluster @@ -72,6 +73,28 @@ def test_embedded_dask_worker_can_disable_lifetime_restart() -> None: assert "--memory-limit" not in command +def test_worker_and_web_processes_receive_scheduler_address(monkeypatch) -> None: + entrypoint = _load_entrypoint() + processes = [MagicMock(), MagicMock(), MagicMock()] + for process in processes: + process.poll.return_value = 0 + process.wait.return_value = 0 + popen = MagicMock(side_effect=processes) + monkeypatch.setattr(entrypoint.sys, "argv", ["entrypoint.py"]) + monkeypatch.setattr(entrypoint.subprocess, "Popen", popen) + monkeypatch.setattr(entrypoint, "_wait_for_scheduler", MagicMock()) + monkeypatch.setattr(entrypoint, "_install_signal_handlers", MagicMock()) + monkeypatch.setattr(entrypoint.time, "sleep", MagicMock()) + + assert entrypoint.main() == 0 + + expected_address = f"tcp://{entrypoint._DASK_LOOPBACK_HOST}:8786" + worker_env = popen.call_args_list[1].kwargs["env"] + web_env = popen.call_args_list[2].kwargs["env"] + assert worker_env["NAT_DASK_SCHEDULER_ADDRESS"] == expected_address + assert web_env["NAT_DASK_SCHEDULER_ADDRESS"] == expected_address + + def test_embedded_dask_worker_advertises_only_loopback() -> None: entrypoint = _load_entrypoint() worker_proc: subprocess.Popen[str] | None = None From e87f37ee60e3a2e07bc115cc3fe0e3e46180efe9 Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Tue, 4 Aug 2026 16:53:38 -0700 Subject: [PATCH 9/9] address outside-diff model docs review Signed-off-by: Ajay Thorve --- docs/notebooks/0_Getting_Started_with_AIQ.ipynb | 2 +- docs/source/examples/hybrid-frontier-model.md | 4 ++-- docs/source/resources/troubleshooting.md | 15 +++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/notebooks/0_Getting_Started_with_AIQ.ipynb b/docs/notebooks/0_Getting_Started_with_AIQ.ipynb index a6e011213..56c04385d 100644 --- a/docs/notebooks/0_Getting_Started_with_AIQ.ipynb +++ b/docs/notebooks/0_Getting_Started_with_AIQ.ipynb @@ -414,7 +414,7 @@ "**Main agents:** intent classifier, shallow research, deep research. \n", "**Tools:** web search tool for shallow researcher and advanced web search for deep research.\n", "\n", - ">**Optional — Frontier model config:** For improved deep research report quality, you can use `configs/config_frontier_models.yml`, which assigns a frontier model (for example, GPT-5.2) to deep-research orchestration, planning, and writing while retaining Nemotron 3 Ultra for source routing and research. When using Docker Compose or the web UI, set `BACKEND_CONFIG` to `/app/configs/config_frontier_models.yml`. Remember to set the required API key in your `.env` file.\n" + ">**Optional — Frontier model config:** For improved deep research report quality, you can use `configs/config_frontier_models.yml`, which assigns `gpt-5.6-sol` to deep-research orchestration, planning, and writing, and `gpt-5.6-luna` to source routing and research. When using Docker Compose or the web UI, set `BACKEND_CONFIG` to `/app/configs/config_frontier_models.yml`. Remember to set the required API key in your `.env` file.\n" ] }, { diff --git a/docs/source/examples/hybrid-frontier-model.md b/docs/source/examples/hybrid-frontier-model.md index a56892212..6fc0c2052 100644 --- a/docs/source/examples/hybrid-frontier-model.md +++ b/docs/source/examples/hybrid-frontier-model.md @@ -5,7 +5,7 @@ SPDX-License-Identifier: Apache-2.0 # Hybrid Frontier Model -This example uses an NVIDIA NIM model for intent classification and shallow research, +This example uses NVIDIA NIM models for intent classification, clarification, and shallow research, and a frontier model for deep research (higher quality reports). ## Prerequisites @@ -33,7 +33,7 @@ llms: temperature: 0.1 max_tokens: 16384 - # Frontier model for deep research (higher quality) + # NIM profile for clarification nemotron_ultra_llm: _type: nim model_name: nvidia/nemotron-3-ultra-550b-a55b diff --git a/docs/source/resources/troubleshooting.md b/docs/source/resources/troubleshooting.md index 409986a70..5afcc2cda 100644 --- a/docs/source/resources/troubleshooting.md +++ b/docs/source/resources/troubleshooting.md @@ -44,7 +44,7 @@ Common issues and solutions for the AI-Q blueprint. ## Nemotron Hosted Endpoint Availability -Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) is compatible and tested with AIQ, but its NVIDIA-hosted endpoint can have limited availability during high demand. During peak periods you may observe: +Nemotron 3 Super (`nvidia/nemotron-3-super-120b-a12b`) and Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) are compatible and tested with AIQ, but their NVIDIA-hosted endpoints can have limited availability during high demand. During peak periods you may observe: - Elevated latency or timeouts on LLM inference calls - HTTP 429 (rate-limited) or 503 (service unavailable) responses from the Build API @@ -56,9 +56,16 @@ Nemotron 3 Ultra (`nvidia/nemotron-3-ultra-550b-a55b`) is compatible and tested For production and staging deployments that require consistent throughput and low-latency inference, self-host a downloadable NVIDIA NIM rather than relying on shared endpoints. Preview endpoint availability and downloadable NIM availability do not necessarily move in lockstep; verify the current model card before choosing an image. -- [Self-host Nemotron 3 Ultra 550B A55B](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b?nim=self-hosted) +- [Self-host Nemotron 3 Super 120B A12B](https://build.nvidia.com/nvidia/nemotron-3-super-120b-a12b/deploy?nim=self-hosted) for the default intent and shallow-research roles +- [Self-host Nemotron 3 Ultra 550B A55B](https://build.nvidia.com/nvidia/nemotron-3-ultra-550b-a55b?nim=self-hosted) for the default clarification and deep-research roles -Once your self-hosted endpoint is running, update the corresponding `base_url` in your config to point at it: +Once your self-hosted endpoint is running, update the corresponding `base_url` in your config to point at it. AIQ's configuration validator currently requires `NVIDIA_API_KEY` for every `_type: nim` profile, even when a local NIM does not enforce client authentication. Set a non-secret placeholder for the local deployment before starting AIQ: + +```bash +export NVIDIA_API_KEY=local-nim +``` + +Then reference that variable in the local profile: ```yaml llms: @@ -67,7 +74,7 @@ llms: # Use the identifier returned by the local NIM's /v1/models endpoint. model_name: nvidia/nemotron-3-ultra-550b-a55b base_url: "https:///v1" - api_key: "" + api_key: ${NVIDIA_API_KEY} temperature: 0.2 top_p: 0.7 max_tokens: 16384