Skip to content

Commit

Permalink
fixed error in target_column attribute use and replaced with column_map
Browse files Browse the repository at this point in the history
  • Loading branch information
Uma Krishnaswamy authored and Uma Krishnaswamy committed Dec 19, 2024
1 parent 7d1d212 commit 70ce7da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/docs/guides/evaluation/scorers.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,13 @@ In Weave, Scorers are used to evaluate AI outputs and return evaluation metrics.

similarity_scorer = EmbeddingSimilarityScorer(
client=llm_client
target_column="reference_text", # the dataset column to compare the output against
threshold=0.4 # the cosine similarity threshold to use
)
```

**Parameters:**

- `target`: This scorer expects a `target` column in your dataset, it will calculate the cosine similarity of the embeddings of the `target` column to the AI system output. If your dataset doesn't contain a column called `target` you can use the scorers `column_map` attribute to map `target` to the appropriate column name in your dataset. See the Column Mapping section for more.
- This scorer expects a `target` column in your dataset, it will calculate the cosine similarity of the embeddings of the `target` column to the AI system output. If your dataset doesn't contain a column called `target` you can use the scorers `column_map` attribute to map `target` to the appropriate column name in your dataset. See the Column Mapping section for more.
- `threshold` (float): The minimum cosine similarity score between the embedding of the AI system output and the embdedding of the `target`, above which the 2 samples are considered "similar", (defaults to `0.5`). `threshold` can be in a range from -1 to 1:
- 1 indicates identical direction.
- 0 indicates orthogonal vectors.
Expand Down

0 comments on commit 70ce7da

Please sign in to comment.