Skip to content

Add Support for Different Types of Knowledge Bases#711

Merged
kanushka merged 6 commits intowso2:mainfrom
dan-niles:azure-ai-search-knowledge-base-support
Oct 27, 2025
Merged

Add Support for Different Types of Knowledge Bases#711
kanushka merged 6 commits intowso2:mainfrom
dan-niles:azure-ai-search-knowledge-base-support

Conversation

@dan-niles
Copy link
Contributor

@dan-niles dan-niles commented Oct 22, 2025

Purpose

Related Issue: wso2/product-ballerina-integrator#1571

Currently, BI only supports creating Vector Knowledge Bases. With the changes introduced in ballerina-platform/ballerina-language-server#421, support for Azure AI Search Knowledge Bases is being added.

This PR extends the BI knowledge base creation logic and UI to support multiple knowledge base types, allowing easy integration of additional types in the future.

Screen.Recording.2025-10-23.at.12.29.35.AM.mov

Goals

  • Introduce a generic knowledge base creation flow that supports multiple knowledge base types.
  • Make the system extensible for future knowledge base types with minimal code changes.

Approach

  • Refactored the knowledge base creation logic to dynamically handle different knowledge base types.
  • Updated the BI side panel form to allow users to select and configure the desired knowledge base type.
  • Followed a similar pattern used in Model Providers, Embedding Providers, and Vector Stores.

User stories

  • As a user, I can create different types of knowledge bases (Vector or Azure AI Search).
  • As a developer, I can easily extend support for new knowledge base types in the future.

Release note

Enhanced the Knowledge Base creation interface to support multiple knowledge base types, including Vector and Azure AI Search Knowledge Bases.

@dan-niles dan-niles changed the title Add support for Azure AI Knowledge Base Add Support for Different Types of Knowledge Bases Oct 25, 2025
@dan-niles dan-niles marked this pull request as ready for review October 25, 2025 05:39
@kanushka kanushka requested a review from Copilot October 27, 2025 05:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the knowledge base creation system to support multiple knowledge base types (Vector and Azure AI Search) instead of being limited to Vector Knowledge Bases only. The changes rename components from "VECTOR_KNOWLEDGE_BASE" to "KNOWLEDGE_BASE" throughout the codebase and introduce a card-based selection UI for choosing knowledge base types.

Key Changes:

  • Renamed all references from "VECTOR_KNOWLEDGE_BASE" to "KNOWLEDGE_BASE" across node types, enums, and component names
  • Added a new card-based selection interface (SidePanelView.KNOWLEDGE_BASES) for choosing knowledge base types
  • Updated the knowledge base form to dynamically write to connections.bal instead of the current file
  • Modified the icon rendering logic to support Azure-specific icons when the module includes "azure"

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ApiCallNodeWidget.tsx Updated node type check from VECTOR_KNOWLEDGE_BASE_CALL to KNOWLEDGE_BASE_CALL
NodeIcon/index.tsx Renamed node icon mappings from VECTOR_KNOWLEDGE_BASE to KNOWLEDGE_BASE
KnowledgeBaseForm/index.tsx Refactored form to use connections.bal and renamed component from VectorKnowledgeBaseForm
FormGenerator/index.tsx Updated node type check and component reference
FlowDiagram/index.tsx Modified navigation flow to show card selection before form display
PanelManager.tsx Added KNOWLEDGE_BASES card list view and updated labels
bi.tsx Added icon factory logic for Azure and knowledge base categorization
localStorage.ts Updated default expanded category name
NodeList/index.tsx Updated category configuration name
categoryConfig.ts Renamed category title from Vector Knowledge Bases
CardList/index.tsx Added tooltip support to cards
rpc-manager.ts Updated console log messages
extended-language-client.ts Updated API endpoint constant name
extended-lang-client.ts Updated SearchKind type
bi.ts Updated NodeKind type definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dan-niles dan-niles force-pushed the azure-ai-search-knowledge-base-support branch from 67216ef to 36e9c2a Compare October 27, 2025 06:26
@kanushka kanushka merged commit 45b33e8 into wso2:main Oct 27, 2025
5 checks passed
@dan-niles dan-niles deleted the azure-ai-search-knowledge-base-support branch October 27, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants