feat(knowledge): add Azure AI Search backend#308
Open
harmke wants to merge 7 commits into
Open
Conversation
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
Signed-off-by: Harmke Alkemade <halkemade@nvidia.com>
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Adds Azure AI Search as a Knowledge Layer backend for AI-Q. This gives deployments a managed alternative to the existing LlamaIndex/ChromaDB and Foundational RAG backends while preserving the shared Knowledge API, NAT function registration, document summaries, and citation formatting.
The adapter generates embeddings client-side through the existing NVIDIA embedding integration and stores document chunks in one Azure AI Search index per logical collection.
This PR includes:
azure_ai_searchretriever and ingestor adapters with vector, hybrid, and opt-in semantic-ranked retrieval.AZURE_SEARCH_API_KEYor Azure identity authentication throughDefaultAzureCredential.Search Service ContributorandSearch Index Data Contributorroles.AIQ_EMBED_BASE_URLandAIQ_EMBED_MODEL, with Azure index dimensions configured throughAIQ_EMBED_DIM.This PR does not provision Azure infrastructure. The Azure AI Search service, required permissions, and embedding endpoint must already exist.
Validation
All commands were run from the repository root unless noted.
Adapter registration and factory compliance:
Documentation build:
The three Sphinx warnings are unresolved cross-reference warnings in unrelated existing pages (
architecture/agents/sandbox.mdandintegration/agent-skills.md).Live Azure service validation was also completed against a Basic-tier Azure AI Search service using NVIDIA-hosted
nvidia/nv-embed-v1embeddings (4096 dimensions). The full adapter compliance flow passed14/14under admin-key authentication, covering collection creation, TXT ingestion, asynchronous status polling, file listing, hybrid retrieval with semantic ranking, chunk normalization, file deletion, and collection cleanup.DefaultAzureCredentialalso selected a system-assigned managed identity in Azure Container Apps, and index creation/deletion, document upload/deletion, and querying all succeeded with the documentedSearch Service ContributorandSearch Index Data Contributorroles.git commit -sor an equivalent sign-off.Where should reviewers start?
Start with
sources/knowledge_layer/src/azure_ai_search/adapter.pyfor index ownership, schema validation, ingestion, replacement, and retrieval behavior. Then reviewsources/knowledge_layer/src/register.pyfor NAT configuration and authentication defaults, followed bytests/knowledge_layer_tests/test_azure_ai_search.pyfor the expected lifecycle and failure handling.The main design decision is that AI-Q creates and manages only namespaced indexes carrying its ownership marker; unmanaged or incompatible indexes are ignored rather than modified.
Related Issues