Similarite de Documents
Compares a document with others in the knowledge base and returns the most similar documents.
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
documentId | dynamic value | No | Yes | Reference document identifier to find similar documents. |
content | dynamic value | No | Yes | Reference text to find similar documents (alternative to documentId). |
limit | number | No | No | Maximum number of similar documents to return (1 to 50). (Default: 10, min 1, max 50) |
minScore | number | No | No | Minimum similarity score (0 to 1). Documents below are excluded. (Default: 0.5, min 0, max 1) |
includeChunks | boolean | No | No | Include matching chunks in each result. (Default: false) |
outputVariable | text | No | No | Output variable name containing the similar documents. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : similarDocuments
{
"found": false,
"count": 0,
"similar": [],
"clusters": []
}
Example
Find documents similar to a report.
Input :
{"documentId": "doc-42"}
Output :
{"similar": [{"id": "doc-15", "title": "Rapport Q2", "similarity": 0.87}], "count": 1}
Tip
Useful for detecting duplicates or suggesting related reading. Similarity is a score between 0 and 1.