How to use Vectorize and search array step
Add the component
Add the Vectorize and search array step to your Tool (check how to get started with creating a tool).
Array to search
A vectorize and search array step requires an array as an input. This array can be entered within the step. However, it is often more practical to fetch the value from an input component or another step output. Use{{variable name}}
to provide the data to the Vectorize and search array step.

Search query
This is where the search string is provided (i.e. similar to the string typed in Google). It is often more practical to fetch the value from an input component or another step output. Use{{variable name}}
to provide the data to the Vectorize and search array step.
Page size
Set to 5 by default, page size indicates the maximum number of entries (from the provided array) to be returned as the search result.Field
We can specify the target field if the provided array is an array of objects (e.g. an array of JSON dictionaries), and we target a certain field within the objects. Follow the links below for more information about- How to run a step
- How to delete a step
- How to configure output
- How to configure a default value
- How to move a step in a Tool
- How to duplicate a step
- How to add condition to a step (i.e. execute only if a condition is met)
- How to loop a step (i.e. run one step multiple times)
Access the step output
The output is a dictionary with two keysresults
and scores
containing the top (i.e. page size) matching
results and their search score respectively.
Below you can see samples where the default name assigned to the step search_array
is used.
Note that a step name is different from the step title. Step titles can be found on the top left
of steps. A step name is shown on the bottom left, in smaller font and highlighted green.