SiliconFlow icon

SiliconFlow

Interact with SiliconFlow AI models

Actions4

Rerank → Create

AI-generated

Overview

This node performs a reranking operation using SiliconFlow AI models. It takes a search query and a list of documents, then ranks the documents based on their relevance to the query. This is useful in scenarios where you want to prioritize or filter search results or documents according to their relevance to a specific query, such as improving search engine results or content recommendation systems.

Use Case Examples

  1. Given a search query and multiple documents, the node returns the most relevant documents ranked by the AI model.
  2. In a content management system, rerank documents to show the most pertinent articles based on user queries.

Properties

Name Meaning
Model The AI reranking model to use for reranking the documents.
Query The search query string to compare documents against.
Documents The documents to rerank, provided as a string with one document per line or comma-separated.
Additional Fields Optional parameters to customize the reranking behavior.

Output

JSON

  • results - Array of reranked document results.
  • query - The original search query string.
  • documentsCount - The count of documents provided for reranking.
  • usage - Token usage information from the rerank API response.
  • _rawResponse - The full raw response from the rerank API.

Dependencies

  • SiliconFlow API key credential

Troubleshooting

  • Ensure at least one document is provided; otherwise, the node throws an error.
  • Check that the API key credential for SiliconFlow is correctly configured and has access to the rerank endpoint.
  • If the response from the API is empty or malformed, verify the model selection and input parameters.

Discussion