/rasa-agent-skills:rasa-setting-up-enterprise-searchfrom rasa-agent-skills
Adds knowledge base search to a Rasa CALM assistant using EnterpriseSearchPolicy, connects vector stores (Faiss, Milvus, Qdrant), and configures generative or extractive search modes.
Ships in rasa-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Enterprise Search lets a Rasa assistant answer informational questions by
retrieving relevant documents from a knowledge base and generating (or
extracting) answers. It is powered by the EnterpriseSearchPolicy and
triggered via the built-in pattern_search pattern.
EnterpriseSearchPolicy
configured? If not, add EnterpriseSearchPolicy to policies in config.yml with
the desired vector store type and options (see "Enterprise Search Policy").config.yml to
SearchReadyLLMCommandGenerator (see "Command generator").endpoints.yml if using Milvus or Qdrant
(see "Connecting vector stores").rasa-configuring-model-groups skill).pattern_search in a flows file to trigger action_trigger_search
(see "Triggering Enterprise Search")../docs for Faiss, or ingest into your
vector database for Milvus/Qdrant.Enterprise Search requires SearchReadyLLMCommandGenerator in the pipeline. This is the
search-aware variant of CompactLLMCommandGenerator — it produces SearchAndReply
commands when the LLM within the Command Generator detects an informational question.
If the project currently uses CompactLLMCommandGenerator, replace it.
# config.yml
pipeline:
- name: SearchReadyLLMCommandGenerator
llm:
model_group: command_generator_llm # defined in endpoints.yml
Add EnterpriseSearchPolicy to policies in config.yml. The policy
supports two modes:
check_relevancy is enabled and the answer is not relevant,
the policy triggers pattern_cannot_handle.use_generative_llm: false to return a pre-authored answer
directly with no LLM generation. Documents must be ingested in Q&A format (see example
below). Use vector_store.threshold so only high-confidence matches are returned.The embedding model used for querying must match the model used to embed documents during ingestion.
# config.yml
policies:
- name: FlowPolicy
- name: EnterpriseSearchPolicy
llm:
model_group: enterprise_search_llm # LLM for answer generation
embeddings:
model_group: enterprise_search_embeddings # must match ingestion model
vector_store:
type: "faiss" # faiss | milvus | qdrant | custom module path
source: "./docs" # Faiss only: path to .txt files
# threshold: 0.0 # Milvus/Qdrant only: minimum similarity (0–1)
# use_generative_llm: true # false for extractive search
citation_enabled: true # append source references to the answer
check_relevancy: true # trigger pattern_cannot_handle if irrelevant
max_messages_in_query: 2 # conversation turns in search query (default: 2)
include_date_time: true # current date/time in prompt (default: true)
timezone: "UTC" # IANA timezone for date/time context
Corresponding model groups in endpoints.yml:
# endpoints.yml
model_groups:
- id: enterprise_search_llm
models:
- provider: <your-provider> # e.g. openai, azure, self-hosted
model: <your-llm-model>
- id: enterprise_search_embeddings
models:
- provider: <your-provider>
model: <your-embedding-model> # must match ingestion model
Extractive search Q&A ingestion format — page_content holds the question
(vectorized for similarity), metadata.answer holds the response text:
[
{
"page_content": "What is the return policy?",
"metadata": {
"title": "return_policy",
"type": "faq",
"answer": "Items can be returned within 30 days of purchase."
}
}
]
By default, pattern_search responds with utter_no_knowledge_base (denying the
request). Override it to trigger document search instead.
pattern_searchWhen the command generator detects an informational question, it pushes pattern_search
onto the dialogue stack. Override this pattern to call action_trigger_search:
# data/pattern_search.yml (or any flows file)
flows:
pattern_search:
description: handle a knowledge-based question or request
name: pattern search
steps:
- action: action_trigger_search
action_trigger_search is a default action that can also be used as a step in any flow.
This is useful when a specific point in a business process needs to pull knowledge base
content:
flows:
troubleshoot_device:
description: Guides users through troubleshooting their device.
steps:
- collect: device_model
- action: action_trigger_search # search KB for device-specific help
- action: utter_anything_else
Rasa supports three built-in vector stores. Choose based on your environment.
In-memory index built from .txt files during rasa train. Not meant for production.
Use Milvus or Qdrant for production workloads.
# config.yml
- name: EnterpriseSearchPolicy
vector_store:
type: "faiss"
source: "./docs" # directory of .txt files, indexed at train time
No endpoints.yml configuration needed — the index is stored on disk.
Connect to a self-hosted Milvus instance. Documents must already be ingested with the same embedding model.
# config.yml
- name: EnterpriseSearchPolicy
vector_store:
type: "milvus"
threshold: 0.7 # minimum similarity score (0–1)
# endpoints.yml
vector_store:
type: milvus
host: localhost # required
port: 19530 # required
collection: rasa # required
# user: ""
# password: ""
Connect to a self-hosted or Qdrant Cloud instance.
Adjust content_payload_key and metadata_payload_key to match how documents were
ingested into Qdrant.
# config.yml
- name: EnterpriseSearchPolicy
vector_store:
type: "qdrant"
threshold: 0.5
# endpoints.yml
vector_store:
type: qdrant
collection: rasa # required
host: 0.0.0.0
port: 6333
content_payload_key: page_content # key for document text during ingestion
metadata_payload_key: metadata # key for document metadata during ingestion
# api_key: ${QDRANT_API_KEY} # for Qdrant Cloud
# prefer_grpc: false
# grpc_port: 6334
Override the default prompt with a Jinja2 template file. Available variables:
docs,slots,current_conversation,current_datetime.# config.yml
- name: EnterpriseSearchPolicy
prompt_template: prompts/enterprise-search-template.jinja2
See the Rasa docs on Generative Search prompts for the default template and all available variables.
For proprietary search engines, slot-based filtering, re-ranking, or unsupported vector stores, implement a custom retriever class.
Subclass rasa.core.information_retrieval.InformationRetrieval and implement connect
and search:
from rasa.utils.endpoints import EndpointConfig
from rasa.core.information_retrieval import SearchResultList, InformationRetrieval
class MyRetriever(InformationRetrieval):
def connect(self, config: EndpointConfig) -> None:
# config.kwargs contains keys from endpoints.yml vector_store block
pass
async def search(
self, query: str, tracker_state: dict, threshold: float = 0.0
) -> SearchResultList:
# query: user message; tracker_state: full conversation state
# self.embeddings: langchain Embeddings object from Rasa config
pass
Reference the class in config.yml:
- name: EnterpriseSearchPolicy
vector_store:
type: "addons.custom_retrieval.MyRetriever"
Connection parameters in endpoints.yml are passed to connect via config.kwargs:
# endpoints.yml
vector_store:
api_key: ${SEARCH_API_KEY}
collection: my_collection
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub rasahq/rasa-agent-skills --plugin rasa-agent-skills18 skills in this plugin
/rasa-building-flowsBuilds conversation flows for Rasa CALM assistants using YAML. Use when creating or editing flows, designing flow architecture, adding branching logic, writing flow and collect step descriptions, or connecting flows with call and link steps.
/rasa-building-skillsBuilds skills (capabilities) for a Rasa CALM assistant. Use when the user asks to create, add, or build a skill, capability, or feature for their Rasa assistant.
/rasa-calling-mcp-tools-from-flowsCalls MCP tools directly from Rasa flow steps. Use when invoking an MCP tool via a call step, mapping slot values to tool parameters, or extracting tool results into slots. This replaces custom action code for simple API integrations.
/rasa-configuring-assistantConfigures config.yml and endpoints.yml for Rasa CALM assistants. Covers pipeline (command generators, flow retrieval), policies (FlowPolicy), action endpoint, and language settings. Use when setting up a new project or modifying pipeline components.
/rasa-configuring-mcp-serverConfigures MCP (Model Context Protocol) servers in a Rasa CALM assistant. Use when defining MCP servers in endpoints.yml, setting up authentication (API key, OAuth 2.0, pre-issued token), or connecting to multiple external services.
/rasa-configuring-model-groupsConfigures model_groups in endpoints.yml for LLM and embedding providers. Covers single and multi-deployment setups, routing strategies, failover, self-hosted models, and caching. Use when adding or changing LLM providers or setting up multi-LLM routing.