Search
AI-generatedOverview
This node enables querying Cloudflare AutoRAG knowledge bases using AI-powered semantic search. It allows users to perform two main operations:
- Search: Retrieve raw document chunks from the knowledge base that match a query, useful when you want exact content matches.
- AI Search: Perform a semantic search combined with AI generation to synthesize and generate comprehensive answers based on retrieved context.
Typical use cases include building chatbots, enhancing documentation search, or creating Retrieval-Augmented Generation (RAG) applications where relevant information is fetched and then used to generate intelligent responses.
For example, you can ask "What are the key features of Workers AI?" and get either a list of matching document excerpts or an AI-generated summary answer based on those documents.
Properties
| Name | Meaning |
|---|---|
| AutoRAG Name | The unique name of your AutoRAG instance (knowledge base) in Cloudflare. This identifies which knowledge base to query. |
| Query | The question or search query to ask your knowledge base. Be specific and clear for best results. Examples: "How do I configure authentication?" or "What are the pricing tiers?" |
| Additional Options | A collection of optional parameters to customize the search: • Model (string): Text generation model to use for AI response (only for AI Search). Leave empty to use default. • Rewrite Query (boolean): Whether to optimize the query for better semantic search. • Result Limit (number): Max number of document chunks to retrieve (1-50). • Minimum Score (number 0.0-1.0): Minimum similarity score threshold for results to be included. Higher values return more relevant matches. |
Output
The node outputs JSON data containing the full response from the Cloudflare AutoRAG API, enriched with metadata about the operation performed and the original query. The structure includes:
- The raw search or AI search results as returned by the API.
- Fields indicating the operation type (
searchoraiSearch). - The AutoRAG knowledge base name used.
- The original query string.
If errors occur during the request, the output will contain an error message describing the issue.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Cloudflare AutoRAG API.
- The node makes HTTP POST requests to Cloudflare's AutoRAG endpoints under the account associated with the provided credentials.
- No additional external dependencies beyond standard HTTP and authentication mechanisms.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect AutoRAG knowledge base name will result in not found or similar errors.
- Providing invalid parameter values (e.g., limit outside 1-50) may cause API errors.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors returned by the API are captured and presented with their message and details.
- If the node encounters an error but "Continue On Fail" is enabled, it outputs the error message per item instead of stopping execution.
Resolution tips:
- Verify that the API key credential is correctly configured and has access to the target AutoRAG account.
- Double-check the AutoRAG instance name matches exactly what is set up in the Cloudflare dashboard.
- Adjust query parameters like
limitandminScorewithin allowed ranges. - Enable "Rewrite Query" for ambiguous queries to improve search relevance.
Links and References
- Cloudflare AutoRAG Documentation
- Cloudflare API Reference
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)