From 28838677087441c0223bef0f374f7b66f594d473 Mon Sep 17 00:00:00 2001 From: elenasamuylova <67064421+elenasamuylova@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:37:36 +0000 Subject: [PATCH] Docs: small fixes (#1368) --- docs/book/examples/tutorial-llm.md | 10 ++++------ docs/book/reference/all-metrics.md | 16 ++++++++-------- docs/book/tests-and-reports/run-tests.md | 2 +- docs/book/tests-and-reports/text-descriptors.md | 7 ++++--- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/book/examples/tutorial-llm.md b/docs/book/examples/tutorial-llm.md index 4784d4cab5..0c821ca1da 100644 --- a/docs/book/examples/tutorial-llm.md +++ b/docs/book/examples/tutorial-llm.md @@ -458,12 +458,10 @@ To compute the Semantic Similarity: ```python text_evals_report = Report(metrics=[ - ColumnSummaryMetric( - column_name=SemanticSimilarity( - display_name="Response-Question Similarity" - ) - .on(["response", "question"]) - ) + TextEvals(column_name="response", descriptors=[ + SemanticSimilarity(with_column="question", + display_name="Response-Question Similarity"), + ]) ]) text_evals_report.run(reference_data=None, diff --git a/docs/book/reference/all-metrics.md b/docs/book/reference/all-metrics.md index 35a3d50ba0..9df989790a 100644 --- a/docs/book/reference/all-metrics.md +++ b/docs/book/reference/all-metrics.md @@ -274,14 +274,14 @@ Check for regular expression matches. | **ExcludesWords()** Example use:
`ExcludesWords(words_list=['buy', 'sell', 'bet']`| **Required:**
`words_list: List[str]`

**Optional:** | | **ItemMatch()** Example use:
`ItemMatch(with_column="expected")`| **Required:**
`with_column: str`

**Optional:** | | **ItemNoMatch()** Example use:
`ItemMatch(with_column="forbidden")`| **Required:**
`with_column: str`

**Optional:** | -| **WordMatch()** Example use:
`WordMatch(with_column="expected"` | **Required:**
`with_column: str`

**Optional:** | -| **WordNoMatch()** Example use:
`WordMatch(with_column="forbidden"` | **Required:**
`with_column: str`

**Optional:** | -| **ExactMatch()** Example use:
`ExactMatch(column_name='column_1')`| **Required:**
`with_column`

**Optional:** | -| **IsValidJSON()** Example use:
`IsValidJSON(column_name='column_1')`| **Required:**
`column_name`

**Optional:** | -| **JSONSchemaMatch()** Example use:
`JSONSchemaMatch(expected_schema={"name": str, "age": int}, exact_match=False, validate_types=True)`| **Required:**
`expected_schema: Dict[str, type]`

**Optional:** | -| **JSONMatch()** Example use:
`JSONMatch(with_column="column_2")`| **Required:**
`with_column : str`

**Optional:**