Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .secrets.baseline

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ The checked-in default CLI and web profiles use these core components:
- [Tavily Search API](https://tavily.com/) for web search
- Serper, SerpAPI, or SearchAPI for Google Scholar paper search

The shipped frontier profile, `configs/config_frontier_models.yml`, uses GPT-5.6 Sol for deep-research orchestration,
planning, and writing, and GPT-5.6 Luna for source routing and research. Treat any bring-your-own model or modified
profile as an experimental customization until the complete workflow is evaluated with that exact model, prompt,
hyperparameter, tool-calling, and structured-output configuration. Refer to
The shipped frontier profile, `configs/config_frontier_models.yml`, uses GPT-5.6 Luna for intent classification,
shallow research, source routing, and deep-research execution, with GPT-5.6 Sol for clarification, orchestration,
planning, and writing. Treat any bring-your-own model or modified profile as an experimental customization until the
complete workflow is evaluated with that exact model, prompt, hyperparameter, tool-calling, and structured-output
configuration. Refer to
[Configuration Files](#configuration-files); there is no single all-features profile.

## Target Audience
Expand Down Expand Up @@ -294,7 +295,7 @@ The `configs/` directory holds YAML workflow configs that define agents, tools,
| `config_web_frag.yml` | Nemotron 3.5 Lightning; 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.5 Lightning; 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.5 Lightning; 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.5 Lightning; Gemma 4 summary | LlamaIndex profile using GPT Sol/Luna for deep research and Nemotron 3.5 Lightning for intent/shallow. Requires `OPENAI_API_KEY` and `NVIDIA_API_KEY`. |
| `config_frontier_models.yml` | GPT Sol/Luna; Gemma 4 summary | LlamaIndex frontier profile using GPT Luna for intent, shallow research, source routing, and research, with GPT Sol for clarification, orchestration, planning, and writing. Requires `OPENAI_API_KEY`, `NVIDIA_API_KEY`, and `TAVILY_API_KEY` for the enabled Tavily tools. |
| `config_web_default_guardrails.yml` | Nemotron 3.5 Lightning; 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.5 Lightning; 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. |
Expand Down
34 changes: 12 additions & 22 deletions configs/config_frontier_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,21 @@ general:
- "*"

llms:
nemotron_lightning_intent_llm:
_type: nim
model_name: nvidia/nemotron-3.5-lightning-30b-a3b
base_url: "https://integrate.api.nvidia.com/v1"
api_key: ${NVIDIA_API_KEY}
temperature: 0.1
top_p: 0.9
gpt_luna_intent_llm:
_type: openai
model_name: "gpt-5.6-luna"
api_key: ${OPENAI_API_KEY}
max_tokens: 1024
num_retries: 5
num_retries: 2
parallel_tool_calls: false
chat_template_kwargs:
enable_thinking: false

nemotron_lightning_agent_llm:
_type: nim
model_name: nvidia/nemotron-3.5-lightning-30b-a3b
base_url: "https://integrate.api.nvidia.com/v1"
api_key: ${NVIDIA_API_KEY}
temperature: 0.2
top_p: 0.7
gpt_luna_shallow_llm:
_type: openai
model_name: "gpt-5.6-luna"
api_key: ${OPENAI_API_KEY}
max_tokens: 8192
num_retries: 5
num_retries: 2
parallel_tool_calls: false
chat_template_kwargs:
enable_thinking: true

gpt_sol_agent_llm:
_type: openai
Expand Down Expand Up @@ -141,7 +131,7 @@ functions:

intent_classifier:
_type: intent_classifier
llm: nemotron_lightning_intent_llm
llm: gpt_luna_intent_llm
verbose: true
tools:
- web_search_tool
Expand All @@ -160,7 +150,7 @@ functions:

shallow_research_agent:
_type: shallow_research_agent
llm: nemotron_lightning_agent_llm
llm: gpt_luna_shallow_llm
verbose: true
tools:
- web_search_tool
Expand Down
Binary file modified docs/assets/AIQ-arch-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/notebooks/0_Getting_Started_with_AIQ.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,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 `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"
">**Optional — Frontier model config:** For improved research quality, you can use `configs/config_frontier_models.yml`, which assigns `gpt-5.6-luna` to intent classification, shallow research, source routing, and deep-research execution, and `gpt-5.6-sol` to clarification, orchestration, planning, and writing. When using Docker Compose or the web UI, set `BACKEND_CONFIG` to `/app/configs/config_frontier_models.yml`. Remember to set the required API keys in your `.env` file.\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/source/customization/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ only the additional sections you need.
| `configs/config_web_azure_ai_search.yml` | Web API | Azure AI Search knowledge retrieval and web search |
| `configs/config_web_frag.yml` | Web API / Helm base | Foundational RAG plus Tavily. Requires separately deployed RAG query and ingestion services. Paper search is commented out. |
| `configs/config_web_opensearch.yml` | Web API | Built-in OpenSearch knowledge backend plus Tavily. Supports unauthenticated or basic self-hosted OpenSearch and SigV4 (`es` or `aoss`); infrastructure and credentials are deployment opt-ins. |
| `configs/config_frontier_models.yml` | Web API | Shipped LlamaIndex frontier profile: Nemotron 3.5 Lightning for intent/shallow, GPT-5.6 Sol for clarification/orchestration/planning/writing, GPT-5.6 Luna for source routing/research, and Gemma 4 for summaries. Requires `NVIDIA_API_KEY`, `OPENAI_API_KEY`, and `TAVILY_API_KEY` for the enabled Tavily tools; the commented paper-search opt-in requires `SERPER_API_KEY` when enabled. Validate the complete workflow against the configured provider endpoints before deployment. |
| `configs/config_frontier_models.yml` | Web API | Shipped LlamaIndex frontier profile: GPT-5.6 Luna for intent/shallow/source routing/research, GPT-5.6 Sol for clarification/orchestration/planning/writing, and Gemma 4 for summaries. Requires `NVIDIA_API_KEY`, `OPENAI_API_KEY`, and `TAVILY_API_KEY` for the enabled Tavily tools; the commented paper-search opt-in requires `SERPER_API_KEY` when enabled. Validate the complete workflow against the configured provider endpoints before deployment. |
| `configs/config_web_default_guardrails.yml` | Web API | LlamaIndex with workflow Guardrails attached explicitly, shallow-agent Guardrails dynamically attached through `workflow_functions`, and async deep-agent Guardrails applied by the AI-Q runner from the same target configuration. |
| `configs/config_web_frag_mcp_auth.yml` | Web API | Foundational RAG plus a protected per-user OAuth MCP source example. Requires a real protected MCP endpoint and shared token-store configuration; it is not a zero-config default. |
| `configs/config_domain_routing_and_skills.yml` | Direct deep-research workflow | Automatic domain routing, Tavily, DuckDuckGo news, Polymarket, LlamaIndex, enabled Serper paper search, built-in skills, and a Modal sandbox. Requires the corresponding service credentials and Modal setup. |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/customization/swapping-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AI-Q 2.2 ships these exact model assignments and parameters:
| Configuration | Intent and shallow roles | Clarification and deep-research roles | Optional summary role |
| --- | --- | --- | --- |
| `configs/config_cli_default.yml`, `configs/config_web_default_llamaindex.yml` | `nvidia/nemotron-3.5-lightning-30b-a3b` | `nvidia/nemotron-3-ultra-550b-a55b` for clarification, orchestration, source routing, research, planning, and writing | `google/gemma-4-31b-it` in the web profile |
| `configs/config_frontier_models.yml` | `nvidia/nemotron-3.5-lightning-30b-a3b` | `gpt-5.6-sol` for clarification, orchestration, planning, and writing; `gpt-5.6-luna` for source routing and research | `google/gemma-4-31b-it` |
| `configs/config_frontier_models.yml` | `gpt-5.6-luna` | `gpt-5.6-sol` for clarification, orchestration, planning, and writing; `gpt-5.6-luna` for source routing and research | `google/gemma-4-31b-it` |

The checked-in files define the documented compatibility boundary; they are not a substitute for an end-to-end run
against your provider endpoints and credentials. Changing a model, endpoint, role assignment, prompt, or inference
Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples/hybrid-frontier-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ SPDX-License-Identifier: Apache-2.0

# Hybrid Frontier Model

The checked-in `configs/config_frontier_models.yml` profile combines NVIDIA NIM models for intent classification and
shallow research with GPT Sol/Luna for clarification and deep research.
The checked-in `configs/config_frontier_models.yml` profile uses GPT Luna for bounded classification and research
roles, GPT Sol for coordination and writing, and NVIDIA NIM for document summaries.

## Shipped Configuration

| Role | Model |
| --- | --- |
| Intent classification and shallow research | `nvidia/nemotron-3.5-lightning-30b-a3b` |
| Intent classification and shallow research | `gpt-5.6-luna` with role-specific token budgets |
| Clarification, orchestration, and planning | `gpt-5.6-sol` |
| Source routing and research | `gpt-5.6-luna` |
| Report writing | `gpt-5.6-sol` with the writer token budget from the checked-in config |
Expand All @@ -31,7 +31,7 @@ as experimental until the complete workflow passes evaluation.

## Prerequisites

- `NVIDIA_API_KEY` for NVIDIA NIM models
- `NVIDIA_API_KEY` for the Gemma document-summary model
- `OPENAI_API_KEY` for the GPT Sol/Luna roles
- `TAVILY_API_KEY` for the default web-search tools

Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Complete, annotated configuration examples for common use cases.
| [Full Pipeline -- Foundational RAG](./full-pipeline-web.md) | Complete production setup with hosted RAG | `config_web_frag.yml` |
| [Azure AI Search Knowledge Layer](./azure-ai-search.md) | Managed hybrid document retrieval | `config_web_azure_ai_search.yml` |
| [CLI with Local NIMs](./cli-with-local-nims.md) | Interactive CLI mode with self-hosted NIM models | `config_cli_default.yml` |
| [Hybrid Frontier Model](./hybrid-frontier-model.md) | NIM for intent/shallow + shipped GPT Sol/Luna role assignment | `config_frontier_models.yml` |
| [Hybrid Frontier Model](./hybrid-frontier-model.md) | GPT Luna for intent/research + GPT Sol for coordination/writing | `config_frontier_models.yml` |
| [Deep Research Skills and Sandbox](./skills-sandbox/index.md) | DeepAgents skills with provider-backed sandbox execution for quantitative research workflows | `config_domain_routing_and_skills.yml` |
14 changes: 14 additions & 0 deletions tests/aiq_agent/agents/deep_researcher/test_deepagents_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ def test_frontier_profile_uses_validated_gpt_role_split() -> None:
config = yaml.safe_load(Path("configs/config_frontier_models.yml").read_text(encoding="utf-8"))
llms = config["llms"]

assert llms["gpt_luna_intent_llm"] == {
"_type": "openai",
"model_name": "gpt-5.6-luna",
"api_key": "${OPENAI_API_KEY}",
"max_tokens": 1024,
"num_retries": 2,
"parallel_tool_calls": False,
}
assert llms["gpt_luna_shallow_llm"] == {
**llms["gpt_luna_intent_llm"],
"max_tokens": 8192,
}
assert llms["gpt_sol_agent_llm"] == {
"_type": "openai",
"model_name": "gpt-5.6-sol",
Expand All @@ -66,6 +78,8 @@ def test_frontier_profile_uses_validated_gpt_role_split() -> None:
**llms["gpt_sol_agent_llm"],
"model_name": "gpt-5.6-luna",
}
assert config["functions"]["intent_classifier"]["llm"] == "gpt_luna_intent_llm"
assert config["functions"]["shallow_research_agent"]["llm"] == "gpt_luna_shallow_llm"
deep_research = config["functions"]["deep_research_agent"]
assert {
role: deep_research[f"{role}_llm"]
Expand Down
9 changes: 7 additions & 2 deletions tests/aiq_agent/test_default_model_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@ def _registered_source_tools(config: dict) -> set[str]:
def test_default_profiles_use_role_appropriate_models(config_path: Path):
config = _load_config(config_path)
functions = config.get("functions", {})
is_frontier_profile = config_path.name == "config_frontier_models.yml"

for function in functions.values():
if not isinstance(function, dict):
continue

function_type = function.get("_type")
if function_type == "intent_classifier":
if is_frontier_profile:
continue
alias = function["llm"]
assert alias == "nemotron_lightning_intent_llm"
assert _model_for_alias(config, alias) == LIGHTNING_MODEL
Expand All @@ -101,6 +104,8 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path):
assert not config["llms"][alias]["parallel_tool_calls"]
assert not _thinking_enabled(config, alias)
elif function_type == "shallow_research_agent":
if is_frontier_profile:
continue
alias = function["llm"]
assert alias == "nemotron_lightning_agent_llm"
assert _model_for_alias(config, alias) == LIGHTNING_MODEL
Expand All @@ -111,9 +116,9 @@ def test_default_profiles_use_role_appropriate_models(config_path: Path):
assert config["llms"][alias]["max_tokens"] == 8192
assert not config["llms"][alias]["parallel_tool_calls"]
assert _thinking_enabled(config, alias)
elif config_path.name != "config_frontier_models.yml" and function_type == "clarifier_agent":
elif not is_frontier_profile 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":
elif not is_frontier_profile and function_type == "deep_research_agent":
assert function["writer_llm"] == "nemotron_ultra_writer_llm"
for role in (
"orchestrator_llm",
Expand Down
Loading