Documentation Index
Fetch the complete documentation index at: https://backstage.spotify.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Semantic plugin represents the future of AiKA’s knowledge retrieval capabilities. It provides advanced semantic search functionality through an MCP (Model Context Protocol) server, enabling AiKA to find contextually relevant information across your organization’s documentation with greater accuracy than traditional keyword-based search.What is Semantic Search?
Semantic search uses vector embeddings to understand the meaning and context of queries, rather than just matching keywords. This allows AiKA to:- Find relevant information even when exact keywords don’t match
- Understand context and intent behind questions
- Retrieve more accurate results by considering semantic relationships between concepts
- Handle natural language queries more effectively
How It Works With AiKA
MCP Integration
The Semantic plugin exposes its functionality through an MCP (Model Context Protocol) server. When AiKA operates in agent mode:- The semantic search MCP tool is registered and available
- AiKA’s reasoning engine can decide when to invoke semantic search
- The tool performs vector-based similarity search across your knowledge base
Agent Mode RequirementThe Semantic plugin currently only affects AiKA when running in agent mode. It provides the semantic search tool that the agent can choose to use during its reasoning process. This is different from legacy RAG experience.
Getting Started
Prerequisites
Before enabling the Semantic plugin, ensure you have:- AiKA configured and running in your Portal instance
- Access to the Config Manager
- AI Gateway configured with at least an embedding model
Installation
1. Configure AI Models (Required)
The Semantic plugin requires an embedding model to function. Configure this through the Config Manager:- Navigate to the Config Manager
- Go to AI Gateway configuration at
/config-manager/ai - Configure the following fields using AI Gateway for reference:
ai.models.textEmbeddingModel(required)ai.models.rerankingModel(recommended)
semantic plugin configuration at /config-manager/semantic:
semantic.models.embedding(required): Set to a model likeopenai|text-embedding-3-smallsemantic.models.rerank(recommended): Set to a model likecohere|rerank-v3.5
Model RecommendationThe
semantic plugin will work without a reranking model, but we strongly recommend configuring one for better search quality. If no reranking model is specified (neither in semantic.models.rerank nor ai.models.rerankingModel), results will be returned based solely on embedding similarity.2. Enable the Semantic Plugin
To enable the Semantic plugin in your Portal instance:- Navigate to the Config Manager
- Start the
semanticplugin- The semantic MCP server will be started automatically as part of this process. It will be immediately available for AiKA to use.
- The plugin will begin indexing your TechDocs automatically.
- You will need to configure
semantic-backend-module-confluenceto begin indexing Confluence documents. See below for details.
- You will need to configure
3. Disable the Legacy Search Module
To prevent conflicts between the new semantic search and the older keyword-based search tools, you should disable thesearch-backend-module-action:
- Navigate to the Config Manager
- Navigate to the
searchplugin and select the “Modules” tab. - Locate the
search-backend-module-actionmodule and stop it.
Initial Data Ingestion
When you first enable thesemantic plugin, the system needs to ingest data from your configured knowledge sources and generate vector embeddings for all documents.
Initial Setup TimeThe initial data ingestion and vector generation process can take time. This is a one-time process that happens when the plugin first starts. You may notice slower search performance or limited results until the indexing completes.
Indexing Confluence Documents
Overview
By default, thesemantic plugin automatically indexes TechDocs. To include Confluence documents in your semantic search index, you need to configure the semantic-backend-module-confluence module.
Configuration
Configure Confluence indexing through the Config Manager undersemantic.collators.confluence.
Required Fields
The following fields are required for Confluence indexing to work: Base URL (semantic.collators.confluence.baseUrl)
- The base URL for accessing the Confluence API
- The correct base URL depends on the type of API token you are using. Scoped tokens use the Atlassian REST API URL, while classical tokens use the org wiki URL. See Authentication Types below for details.
semantic.collators.confluence.auth)
- Confluence API credentials
- Required fields depend on the authentication type selected
Authentication Types
Choose one of the following authentication methods:Bearer Authentication
Use a scoped API token.Basic Authentication
Use a classical, non-scoped API token, along with your email address.Username/Password (Not Recommended)
Use username and password directly:Troubleshooting
Semantic Plugin Not Working
If the semantic plugin isn’t functioning:- Verify embedding model is configured: The semantic plugin requires an embedding model. Check that you have configured either:
ai.models.textEmbeddingModelin your AI Gateway configuration, ORsemantic.models.embeddingin your semantic plugin configuration
- Check backend logs: Look for errors related to model initialization or API credentials
- Verify AI Gateway setup: Ensure your AI provider credentials are properly configured
- Ensure data ingestion is complete: If you just enabled the plugin, give some time for the initial indexing to finish
- Confirm AiKA is in agent mode: The semantic plugin only works when AiKA is operating in agent mode
- Disable legacy search module: Make sure the
search-backend-module-actionis disabled to avoid conflicts
semantic plugin and enable the search-backend-module-action to revert to the legacy keyword-based search functionality.