-
Notifications
You must be signed in to change notification settings - Fork 219
feat(knowledge): add OpenSearch as a first-class knowledge backend #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
KyleZheng1284
merged 55 commits into
NVIDIA-AI-Blueprints:develop
from
rhossi:feat/opensearch-aoss
Jul 6, 2026
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
8a2b34a
feat(knowledge): add OpenSearch backend adapter with self-hosted and …
rhossi 4b024b5
test(knowledge): add OpenSearch unit, live, and AOSS live test suites
rhossi 0b57923
feat(config): add web mode workflow config for OpenSearch backend
rhossi 570c77c
docs(knowledge): document OpenSearch backend in setup guide
rhossi 0556553
docs(deploy): add initial AOSS deployment guide and helm example
rhossi 344e5da
docs(plans): add OpenSearch EKS reference deployment implementation plan
rhossi 4118eee
docs(opensearch): add v1.0 to v2.0 migration callout to AOSS guide
rhossi f2c6ec3
docs(opensearch): add architecture diagram showing SigV4 in Dask workers
rhossi d56b5c3
docs(opensearch): list EKS and tooling prerequisites for AOSS deployment
rhossi dd4bf58
docs(opensearch): walk through AOSS encryption, network, and collecti…
rhossi d619e24
docs(opensearch): document Pod Identity trust policy and AOSS IAM per…
rhossi 61def3b
docs(opensearch): expand Pod Identity section with AOSS data access p…
rhossi 3202b39
docs(opensearch): add nvcr.io pull secret to example values and AOSS …
rhossi 7e8b74e
docs(opensearch): document hosted-API and NIM-on-EKS embedding setups
rhossi 5a9a80c
docs(opensearch): add end-to-end verification and smoke test for AOSS…
rhossi 6cba393
docs(opensearch): add teardown commands for AOSS reference deployment
rhossi c1d7156
docs(knowledge): link OpenSearch backend setup to EKS deployment guide
rhossi 89bc9a2
docs(opensearch): resolve sphinx -W warnings in AOSS deployment guide
rhossi 202eb80
fix(opensearch): pass input_type for asymmetric NIM embedding models
rhossi 845541b
fix(opensearch): fail fast when NVIDIA_API_KEY is missing for hosted API
rhossi 3f7e3ab
docs(opensearch): explicit text-only callout for ingestion path
rhossi ee5c644
docs(opensearch): correct health endpoint expected response shape
rhossi f41df60
docs(opensearch): note AOSS visibility delay in verification steps
rhossi e43c315
docs(api): document that conversation_id JSON body field is silently …
rhossi d511ea3
docs(opensearch): note Dask worker logging is silenced by default env
rhossi 8174497
docs(plans): add OpenSearch gaps and risks implementation plan
rhossi d48ee77
fix(opensearch): make _ensure_index idempotent under concurrent creat…
rhossi ce34aec
fix(opensearch): list_files aggregates instead of capping at 10k hits
rhossi 6f193b2
fix(opensearch): close Dask client when submit() raises
rhossi 3f770b8
fix(opensearch): only evict in-memory tracking on actual delete
rhossi 2176d4f
style(tests): fix ruff lint errors in opensearch adapter tests
rhossi 821173f
fix(opensearch): paginate list_files via composite agg
rhossi dc4d599
style(tests): apply ruff format to opensearch serverless live tests
rhossi c19c6d0
fix(opensearch): stop indexing internal source_path in chunk metadata
rhossi a603905
fix(opensearch): address CodeRabbit review findings
rhossi 1d20d8c
style(docs): fix MD031 blank-line spacing around code fences in plan …
rhossi 2d84b38
docs(knowledge): add missing OpenSearch env vars to setup guide
rhossi 292e6a7
fix(opensearch): fix index mismatch in submit_job and unblock async r…
rhossi 50d2bbd
fix(opensearch): treat empty Dask batch as completed, not failed
rhossi 0587694
docs(opensearch): add docstrings to all functions to reach 80% covera…
rhossi 702a256
docs: fix MD040 bare opening fences in OpenSearch plan files
rhossi 2eefe2c
fix: resolve index mismatch, async blocking, and Dask timestamp failure
rhossi cad484d
chore: regenerate uv.lock after rebase onto develop
rhossi d57fdf2
docs(tests): add docstrings to all opensearch test functions and helpers
rhossi 295d625
test(opensearch): clear retriever factory cache in registration test
rhossi d2c0ce6
Merge branch 'NVIDIA-AI-Blueprints:develop' into feat/opensearch-aoss
rhossi 4adec45
fix(opensearch): address review — credential leakage, index collision…
rhossi be31fe9
fix(config): align deep_research_agent with canonical FRAG config
rhossi 5e8242e
fix(ci): allowlist placeholder NVIDIA_API_KEY in AOSS helm example
rhossi f3ccdab
fix(opensearch): address AWS docs/helm review + distributed-summary n…
rhossi fa2c3ab
docs(opensearch): fix worker-log guidance and MD028 blockquote
rhossi 7c5a91e
chore(docs): remove internal OpenSearch planning notes from the PR
rhossi c29f891
Merge develop into feat/opensearch-aoss
KyleZheng1284 2a5e6e2
Merge branch 'develop' into feat/opensearch-aoss
KyleZheng1284 0f791f4
Merge branch 'develop' into feat/opensearch-aoss
KyleZheng1284 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| # This is a Web mode configuration for OpenSearch vector retrieval. | ||
| # It has the following features: | ||
| # - Web search enabled by default | ||
| # - Knowledge retrieval using the built-in OpenSearch backend. | ||
| # - Supports self-hosted OpenSearch and Amazon OpenSearch Serverless via SigV4. | ||
|
|
||
| general: | ||
| use_uvloop: true | ||
| telemetry: | ||
| logging: | ||
| console: | ||
| _type: console | ||
| level: INFO | ||
| # tracing: | ||
| # langsmith: # Optional: LangSmith tracing - requires langsmith API key. Set using `export LANGSMITH_API_KEY=<your-langsmith-api-key>` | ||
| # _type: langsmith | ||
| # project: nvidia-aiq | ||
|
|
||
| front_end: | ||
| _type: aiq_api | ||
| runner_class: aiq_api.plugin.AIQAPIWorker | ||
| # ========================================================================= | ||
| # Knowledge API is automatically enabled when knowledge_retrieval function | ||
| # is configured | ||
| # ========================================================================= | ||
| # Async Job API Settings | ||
| # ========================================================================= | ||
| # Async job infrastructure database (NAT JobStore + EventStore) | ||
| # Used by: /v1/jobs/async routes, SSE streaming, job status persistence | ||
| # Requires async driver for SQLite (aiosqlite) or PostgreSQL (asyncpg) | ||
| # Environment overrides: | ||
| # - NAT_JOB_STORE_DB_URL (direct override) | ||
| # - NAT_JOB_STORE_DB_URL_DEV / NAT_JOB_STORE_DB_URL_PROD (via NAT_ENV) | ||
| db_url: ${NAT_JOB_STORE_DB_URL:-sqlite+aiosqlite:///./jobs.db} | ||
| # Job expiry - how long completed jobs stay in database before cleanup | ||
| expiry_seconds: 86400 # 24 hours (min: 600, max: 604800/7 days) | ||
| cors: | ||
| allow_origin_regex: 'http://localhost(:\d+)?|http://127.0.0.1(:\d+)?' | ||
| allow_methods: | ||
| - GET | ||
| - POST | ||
| - DELETE | ||
| - OPTIONS | ||
| allow_headers: | ||
| - "*" | ||
| allow_credentials: true | ||
| expose_headers: | ||
| - "*" | ||
|
|
||
| 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 | ||
|
|
||
| functions: | ||
| # ========================================================================= | ||
| # Data Source Registry | ||
| # ========================================================================= | ||
| # Central registry that controls: | ||
| # 1. UI toggles — each source appears as an on/off switch in the frontend | ||
| # 2. Per-message filtering — users can select active sources per request | ||
| # 3. Tool auto-inheritance — agents with no explicit `tools` list receive | ||
| # every tool listed here (use `exclude_tools` on agents to specialize) | ||
| # | ||
| # Source entry fields: | ||
| # id, name, description, tools, requires_auth (default: false), | ||
| # default_enabled (default: true) | ||
| # | ||
| # See docs/source/customization/tools-and-sources.md for full details. | ||
| # ========================================================================= | ||
| data_sources: | ||
| _type: data_source_registry | ||
| sources: | ||
| - id: web_search | ||
| name: "Web Search" | ||
| description: "Search the web for real-time information." | ||
| tools: | ||
| - web_search_tool | ||
| - advanced_web_search_tool | ||
| - id: knowledge_layer | ||
| name: "Knowledge Base" | ||
| description: "Search uploaded documents and files." | ||
| tools: | ||
| - knowledge_search | ||
|
|
||
| web_search_tool: | ||
| _type: tavily_web_search | ||
| max_results: 5 | ||
| max_content_length: 1000 | ||
|
|
||
| advanced_web_search_tool: | ||
| _type: tavily_web_search | ||
| max_results: 2 | ||
| advanced_search: true | ||
|
|
||
| # Knowledge Retrieval (see sources/knowledge_layer/KNOWLEDGE-LAYER-SETUP.md) | ||
| knowledge_search: | ||
| _type: knowledge_retrieval | ||
| backend: opensearch | ||
| collection_name: ${COLLECTION_NAME:-test_collection} | ||
| top_k: 5 | ||
| opensearch_url: ${OPENSEARCH_URL:-http://localhost:9200} | ||
| opensearch_auth_type: ${OPENSEARCH_AUTH_TYPE:-none} | ||
| opensearch_aws_region: ${AWS_REGION:-us-east-1} | ||
| opensearch_aws_service: ${OPENSEARCH_AWS_SERVICE:-aoss} | ||
| opensearch_index_prefix: ${OPENSEARCH_INDEX_PREFIX:-aiq} | ||
| opensearch_embedding_dim: ${OPENSEARCH_EMBEDDING_DIM:-2048} | ||
| 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_base_url: ${AIQ_EMBED_BASE_URL:-https://integrate.api.nvidia.com/v1} | ||
|
|
||
| # Paper Search (optional - requires SERPER_API_KEY) | ||
| # Uncomment the block below and set SERPER_API_KEY to enable academic paper search. | ||
| # paper_search_tool: | ||
| # _type: paper_search | ||
| # max_results: 5 | ||
| # serper_api_key: ${SERPER_API_KEY} | ||
|
|
||
| # ========================================================================= | ||
| # Agents — inherit all registry tools; use exclude_tools to specialize | ||
| # ========================================================================= | ||
| intent_classifier: | ||
| _type: intent_classifier | ||
| llm: nemotron_llm_intent | ||
| # tools: omitted -> inherits all from data_source_registry | ||
| # exclude_tools: [] | ||
|
|
||
| clarifier_agent: | ||
| _type: clarifier_agent | ||
| llm: nemotron_super_llm | ||
| planner_llm: nemotron_super_llm | ||
| # tools: omitted -> inherits all from data_source_registry | ||
| # exclude_tools: [] | ||
| max_turns: 3 | ||
| enable_plan_approval: true | ||
| log_response_max_chars: 2000 | ||
| verbose: true | ||
|
|
||
| shallow_research_agent: | ||
| _type: shallow_research_agent | ||
| llm: nemotron_super_llm | ||
| # tools: omitted -> inherits all from data_source_registry | ||
| exclude_tools: | ||
| - advanced_web_search_tool | ||
| max_llm_turns: 10 | ||
| max_tool_iterations: 5 | ||
|
|
||
| deep_research_agent: | ||
| _type: deep_research_agent | ||
| enable_citation_verification: true | ||
| 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 | ||
| # tools: omitted -> inherits all from data_source_registry | ||
| exclude_tools: | ||
| - web_search_tool | ||
|
|
||
| workflow: | ||
| _type: chat_deepresearcher_agent | ||
| enable_escalation: true | ||
| enable_clarifier: true | ||
| use_async_deep_research: true | ||
| checkpoint_db: ${AIQ_CHECKPOINT_DB:-./checkpoints.db} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
deploy/helm/examples/aws-opensearch-serverless-values.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Example values for AI-Q with Amazon OpenSearch Serverless. | ||
| # | ||
| # Before applying this file: | ||
| # - Create an OpenSearch Serverless vector collection and note its data endpoint. | ||
| # - Create an AOSS data access policy for the service account IAM role. | ||
| # - Create an EKS Pod Identity association that maps the backend service account | ||
| # for this release (default name: aiq-backend in namespace ns-aiq) to that role. | ||
|
|
||
| aiq: | ||
| apps: | ||
| backend: | ||
| image: | ||
| # Override this when testing a custom image that includes unreleased changes. | ||
| repository: nvcr.io/nvidia/blueprint/aiq-agent | ||
| tag: "2.0.0" | ||
| pullPolicy: IfNotPresent | ||
| imagePullSecrets: | ||
|
KyleZheng1284 marked this conversation as resolved.
|
||
| - name: ngc-image-pull-secret | ||
| secretEnv: | ||
| NVIDIA_API_KEY: NVIDIA_API_KEY # pragma: allowlist secret | ||
| env: | ||
| CONFIG_FILE: configs/config_web_opensearch.yml | ||
| COLLECTION_NAME: default_collection | ||
| OPENSEARCH_URL: https://abc123.us-west-2.aoss.amazonaws.com | ||
| OPENSEARCH_AUTH_TYPE: sigv4 | ||
| OPENSEARCH_AWS_SERVICE: aoss | ||
| OPENSEARCH_INDEX_PREFIX: aiq | ||
| AWS_REGION: us-west-2 | ||
| OPENSEARCH_INGESTION_MODE: auto | ||
| OPENSEARCH_DASK_FILE_TRANSFER: bytes | ||
| DASK_NWORKERS: "1" | ||
| DASK_NTHREADS: "4" | ||
| frontend: | ||
| # The frontend image also comes from nvcr.io, so it needs the same NGC pull | ||
| # secret; without it the frontend lands in ImagePullBackOff on a fresh cluster. | ||
| imagePullSecrets: | ||
| - name: ngc-image-pull-secret | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.