Overview:

The Similarity Search block enables users to efficiently sift through large volumes of text, identifying and extracting the most pertinent sections based on a specified search query. This powerful functionality caters to various applications where rapid information retrieval is essential.


Inputs & Outputs

I/OFeatureTypeSimple Explanation
inputquerystringThe term or phrase you want to search for in the text.
inputnum_resultsnumberIndicates how many relevant sections should be returned.
inputchunk_size (optional)numberSize of each retrieved section in tokens; defaults to 1000 tokens.
inputtextstringThe large body of text that will be searched through.
outputrelevant_chunksstring[]An array containing the most relevant segments related to your query.

Use Cases

Consider how this block could enhance productivity across different scenarios:

  • Researching: When conducting literature reviews or academic research, utilize this block to rapidly locate specific findings or references within extensive documents, saving valuable time.

  • Filtering Reports: In corporate environments, after generating lengthy reports filled with data and insights, leverage this tool to pinpoint critical details quickly without having to read through every line.

  • Extracting Key Sections: Journalists and content creators can employ this feature when drafting articles by extracting essential quotes or excerpts from long interviews that are directly relevant to their narrative.

In summary, whenever there’s a need for swift navigation of large text bodies with precision, the Similarity Search block is indispensable!