ByteChef LogoByteChef
AutomationKnowledge Base

Use it in Workflows and Agents

Retrieve chunks from a workflow step, or connect a knowledge base to an AI agent for retrieval-augmented generation.

Workflows and AI agents query a knowledge base through the Knowledge Base component. Use it as a workflow action or attach it to an AI agent as a tool or vector store.

Search from a workflow step

Add the Knowledge Base Search Data action to a workflow to fetch the most relevant chunks for a query.

PropertyTypeDefaultDescription
Knowledge BaseSelect-Required. The knowledge base to search.
QueryString-The natural-language text to match. Leave it empty for a filter-only search.
TagsArray-Restrict the search to documents with at least one of the given tags.
Metadata FilterArray-Metadata key-value pairs applied before ranking. Entries within a group are combined with AND; groups are combined with OR.
Top KInteger10Maximum number of chunks to return.
Similarity ThresholdNumber0.0Minimum relevance score (0.0 to 1.0). Chunks with a lower score are dropped.

The action returns an array of matching chunks, each with its content, relevance score, and metadata, for use in a prompt, a condition, or another step.

Ground an AI agent (RAG)

Attach the Knowledge Base component to an AI agent so the agent retrieves context from your documents:

Cluster elementDescription
Knowledge Base VectorStoreThe agent searches the knowledge base automatically when it answers. Optionally restrict it with Tags.
Knowledge Base Search (tool)The agent decides when to search the knowledge base.
Load Knowledge Base Documents (tool)The agent can add text content to the knowledge base.
Update Knowledge Base Documents (tool)The agent can update documents or chunks in the knowledge base.

In both retrieval modes, the flow is:

User question → embed → nearest chunks from the knowledge base → chunks added to the prompt → model answers

Filtering by tag

When one knowledge base holds distinct kinds of content, set Tags so a workflow or agent retrieves only the intended documents. A document matches when it has at least one of the requested tags. For example, an agent restricted to policy never retrieves a chunk from an untagged product specification in the same knowledge base.

Retrieval quality depends on ingestion

If an agent gives vague answers, check the chunk settings and confirm that the expected documents are Ready.

Write to a knowledge base from a workflow

The Knowledge Base component also has actions that change a knowledge base:

ActionDescription
Load DataLoads data into the knowledge base as documents, using the document reader configured on the step. Optionally adds Additional Metadata. The documents are chunked and embedded like uploaded files.
Update DocumentsUpdates the content of a Document or a Document Chunk, or of multiple documents matched by Metadata Filter when Update Multiple is on.
Delete DocumentsDeletes documents that match a metadata filter.

Coming soon

Scheduled sources that keep a knowledge base in sync with an external system are not available in the latest released version of ByteChef.

How is this guide?

Last updated on

On this page