Find Embeddings#
The block allows you to find the most similar rows in the knowledge base, which is a table of objects and their embeddings, based on a given query embedding[^1], and return the indices of these rows as a list sorted in descending order of similarity.
Embeddings for both the query and the embedding table being searched can be obtained using the "Get Embeddings" block. When the block is used for the first time, a vector database is built, which may take a long time. In subsequent calls to the block with the same "Database ID," the already created vector database will be used, and the speed of the block's operation increases significantly.
| Query Embedding | [Text] The embedding for which similar rows need to be found in the table. The value for this field can be obtained using the "Get Embedding" block. |
| Knowledge Base | [Data Table] The table in which the search will be conducted. One of the columns of the table must contain embeddings; other columns can contain any user data. |
| Database ID | [Text] You can specify a different database ID so that the block starts building the vector database from scratch on the first run. When the block is used for the first time, a vector database is built, which may take a long time. In subsequent calls to the block with the same "Database ID," the already created vector database will be used, and the speed of the block's operation increases significantly. |
| Embedding Column | [Number/Text] The index or name of the column from the table specified in the "Knowledge Base" property, where the embeddings are located. Default is |
| Number of Results | [Number] The maximum number of result rows returned by the block from the knowledge base. Default is |
| Row Indices | [List] A list of row indices from the Knowledge Base containing the most similar embeddings to the query, sorted in descending order of similarity. |
| Similarity | [List] Numerical measures of similarity for each of the results. |
| Error Handling Level | Select the error handling level. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Message Level | Select the message level that the blocks will output during operation. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Error Message | [Text] Returns detailed information about the error in case of incorrect execution of the block's work. |
[^1]: An embedding is a vector (a set of numbers) that characterizes the meaning associated with the given input text. Words or sentences with similar meanings will have embeddings with minimal cosine distance. Embeddings can also be used to search for the most semantically similar words, rows, or paragraphs in document databases.