Skip to content

Similarity Analysis Config

🔵 Default value: SimilarityOptions()

Environment Variable: SIMILARITY

In Key Concepts, Similarity Analysis explains how the different configuration attributes will affect the analysis results.

If your machine does not have a lot of computing power, similarity can be set to null. It can be enabled later on in the application.

from pydantic import BaseModel

class SimilarityOptions(BaseModel):
    faiss_encoder: str = "all-MiniLM-L12-v2" # (1)
    few_similar_threshold: float = 0.9 # (2)
    no_close_threshold: float = 0.5 # (3)
  1. The name of your encoder must be supported by sentence-transformers.
  2. Threshold to determine the ratio of utterances that should belong to another class for the smart tags conflicting_neighbors_train/conflicting_neighbors_eval.
  3. Threshold for cosine similarity for the smart tags no_close_train/no_close_eval.
{
  "similarity": {
    "faiss_encoder": "your_encoder"
  }
}
{
  "similarity": null
}