Straico Official icon

Straico Official

Get data from Straico API

Overview

The "Create" operation of the RAG (Retrieval-Augmented Generation) resource in this node allows users to create a new RAG base by uploading a file and specifying various chunking options. This operation is useful for building a knowledge base or document store that can be queried later with prompts, enabling enhanced AI responses based on the uploaded content.

Typical use cases include:

  • Uploading large documents or datasets to create a searchable knowledge base.
  • Preparing data for semantic search or question answering systems.
  • Chunking documents intelligently to optimize retrieval and generation quality.

For example, a user might upload a PDF manual and configure chunking to split it into manageable pieces, which can then be queried via prompt completions to answer user questions about the manual.

Properties

Name Meaning
File The file to upload as the source content for the new RAG base. Must be provided as binary data input.
Name The name to assign to the new RAG base.
Description A description of the RAG base to provide context or details about its contents.
Chunking Method The method used to split the uploaded file into chunks. Options: Fixed Size, Markdown, Python, Recursive, Semantic.
Chunk Size The size of each chunk (number of tokens or characters depending on method). Used with all chunking methods.
Chunk Overlap Number of overlapping tokens between chunks to maintain context across chunk boundaries. Applies to all chunking methods.
Separator Separator string used only for Fixed Size chunking to split text. Default is newline (\n).
Separators Comma-separated list of separators used only for Recursive chunking to split text recursively. Defaults to \n\n, ,, and space variants.
Breakpoint Threshold Type For Semantic chunking only, defines the breakpoint threshold type. Options: Percentile, Interquartile, Standard Deviation, Gradient.
Buffer Size For Semantic chunking only, buffer size parameter controlling chunking behavior.

Output

The output JSON contains the response from the API after creating the RAG base. It typically includes metadata about the created RAG such as its ID, name, description, and status. The exact structure depends on the external API but generally confirms successful creation and provides identifiers for further operations.

Binary data is not output by this operation; it only consumes binary input for the file upload.

Dependencies

  • Requires an API key credential for authenticating requests to the Straico API at https://api.straico.com.
  • The node uses multipart/form-data HTTP POST requests to upload files and create the RAG base.
  • Proper binary data input must be provided for the file property when executing this operation.

Troubleshooting

  • Missing Binary Data Error: If the specified file property does not exist in the incoming item’s binary data, the node throws an error like No binary data property "files" found on item!. Ensure the input contains the correct binary field matching the property name.
  • Invalid Chunking Options: Providing chunking options incompatible with the selected chunking method may cause unexpected behavior. Verify that options like separators or breakpoint threshold types are set only when applicable.
  • API Authentication Failures: Errors related to authentication indicate missing or invalid API credentials. Confirm the API key is correctly configured in n8n credentials.
  • File Upload Failures: Network issues or incorrect file formats may cause upload errors. Check connectivity and ensure the file is supported by the API.

Links and References

Discussion