Robility KB Retrieval

Estimated reading: 6 minutes

The KB Retrieval component retrieves relevant information from an existing knowledge base created through KB Ingestion. It uses vector embeddings to understand the semantic intent behind a query, rather than matching exact keywords and returns the most contextually relevant results.

This component enables automation workflows and AI agents to access factual, contextual, and structured information in real time, helping them generate more accurate responses and make better-informed decisions. It is the primary bridge between your knowledge base and any downstream agent or workflow step that requires grounded, retrievable context.

Prerequisites

Before using the KB Retrieval component, ensure the following are in place:

Requirements
Requirement Details
Existing Knowledge Base A knowledge base must already be created and populated via the KB Ingestion component.
Agent or downstream component A connected component to act on the retrieved results (e.g., an Agent node).
LLM Provider configured Required only if using Query Fusion search type.
Tool Mode (for agent workflows) Enable Tool Mode and connect the tool node to the agent’s tool node.

Parameters

Knowledge Retrieval Configuration
Parameter Description
Knowledge Base Select the existing knowledge base from which information will be retrieved.
Query The input text is used to search the knowledge base. In Tool Mode, this is passed dynamically by the agent at runtime.
Top K Number of top results to return. Default: 5. Must be greater than 1.
Timeout (Seconds) Maximum wait time before the process is stopped. Default: 30. Increase for large knowledge bases.
Retry Count Number of retry attempts if the process fails. Default: 2.
Delay Between Retries Time in milliseconds to wait between retry attempts.
Delay Before Execution Time in milliseconds to wait before the process starts.
Delay After Execution Time in milliseconds to wait after the process completes.
Continue on Error Controls workflow behavior on failure:

Stop Workflow halts execution immediately;
Continue skips the failed component and moves to the next step;
Continue Using Error Output proceeds while capturing error details for logging or conditional handling.

Search Type

Search Type How It Works Best For
Similarity Finds results most similar in meaning to your query using vector distance. Simple, direct questions with a clear intent.
Hybrid Combines semantic meaning and exact keyword matching. Most general-purpose use cases (recommended default).
MMR (Maximal Marginal Relevance) Returns relevant but diverse results, reducing repetition. When you need varied perspectives or non-redundant answers.
Query Fusion Rewrites your query in multiple ways to broaden search coverage. Complex, ambiguous, or multi-faceted questions.

MMR-Specific Parameters

Parameter Description
Fetch K Number of results fetched before filtering for diversity. Default: 20. Must be greater than Top K.
Lambda Multiplier Controls the balance between relevance and diversity. Range: 0 to 1. Values 0–0.4 favor diversity; values 0.5–1 favor relevance. Default: 0.5.

Query Fusion-Specific Parameters

Parameter Description
Number of Queries How many variations of the query will be generated. More queries improve coverage but increase processing time. Default: 3. Must be greater than 1.
LLM Provider The model provider used to generate query variations (e.g., Azure OpenAI, Google Vertex AI).

Output

Output Description
Knowledge Base List Returns a list of all available knowledge bases in the workflow.
Retrieval Results Returns the most relevant results based on your query, in a structured dataframe format.

Tool Mode

In Tool Mode, the KB Retrieval component exposes standardized, slug-based outputs that uniquely identify it within your workflow. The agent can invoke the component programmatically at runtime, querying the knowledge base only when needed, rather than relying on pre-loaded or fixed context. This ensures the right knowledge base is queried at the right moment, keeping workflow execution accurate and contextually grounded.

Demo Slugs

Tool Slugs
Slug Description
list_knowledge_bases Retrieves all available knowledge bases, enabling the agent to identify and select the correct one based on the current workflow context.
retrieve_data Queries the selected knowledge base using the configured retrieval type and returns the most relevant results for the agent to act on.

Workflow Sequence

1. Enable Tool Mode on the KB Retrieval component and connect its tool node to the agent’s tool node.
2. Agent forms a query — The user inputs a question, which the agent passes to the component at runtime.
3. Component retrieves results — The component processes the query using the configured search type (Similarity, Hybrid, MMR, or Query Fusion) and returns the most relevant content.
4. Agent acts on results — The agent uses the retrieved content to respond accurately or determine the next step in the workflow.

Example

User Query: “What is Webex?”

Output: The most relevant results about Webex, retrieved from the connected knowledge base and returned to the agent for use in its response.

Best Practices

1. Use specific, focused queries — The more precise your query, the more relevant the results. Avoid overly broad questions like “Tell me everything about X.” Instead, ask “What are the pricing tiers for X?”
2. Test with varied inputs — Run queries that reflect real user questions, including edge cases, partial questions, and queries with ambiguous phrasing, to evaluate retrieval quality.
3. Check result relevance, not just count — A high Top K value returns more results but may include lower-relevance content. Review the actual content of returned results to determine if the retrieval is performing as expected.
4. Validate across search types — If you are unsure which search type to use, test the same query under Similarity and Hybrid to compare result quality before committing to a configuration.
5. Use unique slugs for multiple components — If your workflow includes more than one KB Retrieval component, assign a distinct slug to each so the agent always references the correct instance. To update: enable Tool Mode → go to the Action section → click the icon next to the Action field → enter a unique slug name.
6. Choose the right search type for your use case — Hybrid is the recommended default. Use MMR when your knowledge base has overlapping or redundant content. Use Query Fusion for complex, multi-part queries or when users tend to phrase questions inconsistently.
7. Tune MMR parameters deliberately — Start with the default Lambda Multiplier of 0.5. Increase toward 1 if retrieval relevance is more important than variety; decrease toward 0 if you need broader, non-repetitive coverage.
8. Set Timeout appropriately for your knowledge base size — Large knowledge bases may require a Timeout value higher than the default of 30 seconds. Monitor for timeout-related failures and adjust accordingly.
9. Avoid over-fetching with Query Fusion — Increasing the Number of Queries improves coverage but adds latency. Use 3–5 queries for most cases; only increase beyond that if retrieval quality is consistently poor on complex inputs.

Share this Doc

Robility KB Retrieval

Or copy link

CONTENTS