Knowledge (RAG)

Knowledge (RAG) performs native knowledge search and document maintenance.
Purpose and use: Execute one native knowledge operation directly: search, document upsert, update, or delete. Use rag_search for retrieval; document operations are writes.
Configuration: Required operation: rag_search, rag_document_upsert, rag_document_update, or rag_document_delete. Required parameters object (editor default uses query: {{ $trigger.text }}, topK: 5, minSimilarity: 0.4). Optional requireApproval boolean, default false; optional toolScope (inherit, invoker, integration; default inherit). Required parameter keys vary with operation.
Input/output and routing: One input and one output; normal control-flow connection. Search output includes status, query, chunks, count, and readOnly. Write result shape depends on the document operation.
Expressions: Parameters such as query, title, content, and document ID are recursively expression-resolved.
Errors, permissions, and effects: Knowledge grants and audience ceilings apply. Write operations can pause for approval when configured; the approval snapshot is immutable. Approval is not valid for rag_search, which is read-only. Confirm source/audience scope, document identity/content, and approval authority before enabling write operations.
Example configuration — fields validated against the 1.1.1 node schema; replace the identifiers with your own: {"operation":"rag_search","parameters":{"query":"{{ $trigger.subject }}","topK":5,"minSimilarity":0.4}}. Expected result: search metadata plus the retrieved chunks that matched the query.