Skip to content

Commit e6f6b39

Browse files
docs: sync Haystack API reference on Docusaurus (#12048)
Co-authored-by: anakin87 <44616784+anakin87@users.noreply.github.com>
1 parent 95d17ca commit e6f6b39

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

docs-website/reference/haystack-api/evaluators_api.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,20 @@ print(result["individual_scores"])
107107
print(result["results"])
108108
# [{
109109
# 'relevant_statements': ['Python, created by Guido van Rossum in the late 1980s.'],
110-
# 'score': 1.0
110+
# 'score': 1.0,
111+
# 'status': 'evaluated'
111112
# },
112113
# {
113114
# 'relevant_statements': ['The JVM has two primary functions: to allow Java programs to run on any device or
114115
# operating system (known as the "write once, run anywhere" principle), and to manage and
115116
# optimize program memory'],
116-
# 'score': 1.0
117+
# 'score': 1.0,
118+
# 'status': 'evaluated'
117119
# },
118120
# {
119121
# 'relevant_statements': [],
120-
# 'score': 0.0
122+
# 'score': 0.0,
123+
# 'status': 'evaluated'
121124
# }]
122125
```
123126

@@ -180,7 +183,8 @@ Run the LLM evaluator.
180183

181184
- <code>dict\[str, Any\]</code> – A dictionary with the following outputs:
182185
- `score`: Mean context relevance score over all the provided input questions.
183-
- `results`: A list of dictionaries with `relevant_statements` and `score` for each input context.
186+
- `results`: A list of dictionaries with `relevant_statements`, `score`, and `status` for each input
187+
context. `status` is `evaluated` for valid results and `error` for failed evaluations.
184188

185189
#### run_async
186190

@@ -199,7 +203,8 @@ Run the LLM evaluator asynchronously.
199203

200204
- <code>dict\[str, Any\]</code> – A dictionary with the following outputs:
201205
- `score`: Mean context relevance score over all the provided input questions.
202-
- `results`: A list of dictionaries with `relevant_statements` and `score` for each input context.
206+
- `results`: A list of dictionaries with `relevant_statements`, `score`, and `status` for each input
207+
context. `status` is `evaluated` for valid results and `error` for failed evaluations.
203208

204209
#### to_dict
205210

@@ -687,7 +692,8 @@ print(result["score"])
687692
# 0.5
688693
print(result["results"])
689694
# [{'statements': ['Python is a high-level general-purpose programming language.',
690-
# 'Python was created by George Lucas.'], 'statement_scores': [1, 0], 'score': 0.5}]
695+
# 'Python was created by George Lucas.'], 'statement_scores': [1, 0], 'score': 0.5,
696+
# 'status': 'evaluated'}]
691697
```
692698

693699
#### __init__
@@ -753,7 +759,8 @@ Run the LLM evaluator.
753759
- <code>dict\[str, Any\]</code> – A dictionary with the following outputs:
754760
- `score`: Mean faithfulness score over all the provided input answers.
755761
- `individual_scores`: A list of faithfulness scores for each input answer.
756-
- `results`: A list of dictionaries with `statements` and `statement_scores` for each input answer.
762+
- `results`: A list of dictionaries with `statements`, `statement_scores`, `score`, and `status` for
763+
each input answer. `status` is `evaluated` for valid results and `error` for failed evaluations.
757764

758765
#### run_async
759766

@@ -774,7 +781,8 @@ Run the LLM evaluator asynchronously.
774781
- <code>dict\[str, Any\]</code> – A dictionary with the following outputs:
775782
- `score`: Mean faithfulness score over all the provided input answers.
776783
- `individual_scores`: A list of faithfulness scores for each input answer.
777-
- `results`: A list of dictionaries with `statements` and `statement_scores` for each input answer.
784+
- `results`: A list of dictionaries with `statements`, `statement_scores`, `score`, and `status` for
785+
each input answer. `status` is `evaluated` for valid results and `error` for failed evaluations.
778786

779787
#### to_dict
780788

0 commit comments

Comments
 (0)