Linea Docs

Retriever Node

Search a workspace knowledge base and return matching document snippets.

Retriever Node

The retriever node queries a workspace knowledge base and returns the most relevant entries for a given search query.

Configuration Fields

FieldTypeDefaultDescription
knowledgeBaseIdstringID of the knowledge base to search
querystringlastOutputSearch query (supports {{}} substitution)
topKnumber5Maximum number of results to return
outputFielddocuments | text | fulldocumentsHow to return results

The retriever currently uses keyword text search — not semantic/vector search. Semantic retrieval is planned for a future release.

Output

documents (default)

{
  "documents": [
    { "content": "...", "metadata": { "source": "policy.pdf" } }
  ],
  "count": 2,
  "query": "refund policy"
}

text

Returns only the concatenated text of all matching entries, separated by \n\n---\n\n. Useful for injecting directly into an agent prompt.

full

Returns the same object as documents mode with the additional text field included.

Wiring Pattern

A common pattern is to feed retriever output directly into an agent node:

[start] → [retriever] → [agent]

In the agent's instructions:

Use the following context to answer the question.

Context:
{{lastOutput.text}}

Question: {{input.question}}

Example Config

{
  "knowledgeBaseId": "kb_abc123",
  "query": "{{input.question}}",
  "topK": 5,
  "outputField": "text"
}

On this page