Skip to content

Commit a66bb65

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ calculate_idcg(gt_docs: list[Document]) -> float
545545
Calculate the ideal discounted cumulative gain (IDCG) of the ground truth documents.
546546

547547
Ground truth documents whose comparison value cannot be determined (e.g. missing meta key)
548-
are excluded, since they can never be matched in `calculate_dcg` either. Including them here
548+
are excluded, since they can never be matched in `calculate_dcg` either. Documents that share
549+
a comparison value are collapsed to a single relevant item, mirroring `calculate_dcg`, which
550+
credits each relevant value at most once. Including duplicates or unmatchable documents here
549551
would inflate the IDCG and make it impossible for NDCG to reach 1.0 for a perfect retrieval.
550552

551553
**Parameters:**

0 commit comments

Comments
 (0)