RAG action
Reference for the retrieve_rag_content workflow action
Last updated
Was this helpful?
Reference for the retrieve_rag_content workflow action
retrieve_rag_content actionretrieve_rag_content retrieves CMS Content through the helper selected in global_settings.default_rag_helper. It can run as a normal workflow task or as a tool mounted on an AI Agent.
query
string
Yes
Non-empty natural-language or keyword query sent to the selected helper.
limit
positive integer
3 when omitted
Maximum number of content hits to return. The value is passed to the helper.
content_type_id
string
None
Restricts retrieval to one Content Type. The action validates that the Content Type exists.
include_inactive
boolean
false
Allows inactive content to be returned when the helper has indexed it.
hits
RagHit[]
Ranked structured results returned by the helper.
text
string
The text value from each hit, joined with a blank line between hits. Convenient for an LLM prompt.
warning
string or undefined
Explains a helper configuration or availability problem. In this case, hits is empty and text is empty.
RagHitcontentId
string
ID of the matching Content entry.
title
string
Content title.
text
string
Matching canonical text or chunk text returned by the helper.
score
number or undefined
Optional helper-specific rank or similarity score.
contentTypeId
string or undefined
ID of the entry's Content Type.
source
string
Registered runtime name of the helper that produced the hit, such as fulltext-search, sqlite-vector, or pgvector.
The action converts helper configuration and availability errors into warning, but unexpected application errors can still fail the workflow task. Always configure normal workflow error handling as well.
Use a stable Content Type ID in the action settings or API request. Do not use the displayed label where an ID is required.
Use text as model context and retain hits for traceability.
Define the action with kind: tools and mount the definition in the AI Agent's tools binding.
Call the search endpoint from a trusted backend, then supply the returned texts to the model under a separate, clearly delimited context section. Do not expose administrative reindexing endpoints to untrusted clients.
Last updated
Was this helpful?
Was this helpful?