Knowledge Query
Search a knowledge base directly, without invoking an AI model. The result is a list of relevant text snippets ready to be consumed by a later step.
What it does
Runs a semantic search against one of your workspace's knowledge bases. Writes the matching snippets to memory so that a later step (typically an LLM Prompt) can use them as context.
Think of this as the "look it up first" half of a retrieval-augmented generation pipeline. The "answer using it" half is then done by an LLM Prompt step that reads the snippets from memory.
What you configure
| Field | What it controls | Required | Notes |
|---|---|---|---|
| Knowledge base | Which knowledge to search. | required | Pick from the workspace's knowledges. |
| Query (memory input) | The text used as the search query. | required | Usually the user's question or the trigger's payload. |
| Results (memory output) | Where the matching snippets are stored. | required | The result is an array of snippets. |
📷 SCREENSHOT: The Knowledge Query step with the knowledge selector and the query/results fields.
Example scenario
Two-step Q&A. A webhook trigger receives a user question. Step 1 (Knowledge Query) searches the FAQ knowledge for relevant snippets. Step 2 (LLM Prompt) gets both the snippets and the question and writes a polished answer. Step 3 sends the answer back via HTTP.
Splitting this into two steps gives you two advantages: you can see exactly what was retrieved (in the Jobs view), and you can swap the model in step 2 without touching the retrieval.
Recommendations
- ✅ Place Knowledge Query before the LLM Prompt in the workflow. The prompt then reads from memory what the query produced.
- ✅ Use a focused query — the user's question is usually a better query than the entire conversation history.
- ✅ Inspect retrieval quality in the Jobs view before tuning prompts. Bad answers often come from bad retrieval, not from the model.
- ⚠️ The number of snippets returned is fixed per knowledge base. If you need more or fewer, adjust the knowledge configuration (see Knowledge → Create and Edit).
- ❌ Do not use this step if you are not also feeding the result into a downstream step. The snippets alone are not useful as a final output.
What to do next
- The downstream consumer: LLM Prompt.
- The alternative that does retrieval and answers in one step: AI Agent.
- How to build the knowledge base in the first place: Knowledge.