mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-28 23:48:53 +00:00
* Add feature to Top P Sampler * Add release notes * Fix zip call * Fix mypy * Restore doc string and make mypy happy hopefully * Make mypy happy * PR comment * Revert change to make mypy happy * Add back type ignore * try to fix typing * Update haystack/components/samplers/top_p.py Co-authored-by: Daria Fokina <daria.fokina@deepset.ai> * Update haystack/components/samplers/top_p.py --------- Co-authored-by: anakin87 <stefanofiorucci@gmail.com> Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
5 lines
486 B
YAML
5 lines
486 B
YAML
---
|
|
enhancements:
|
|
- |
|
|
The parameter min_top_k is added to the TopPSampler which sets the minimum number of documents to be returned when the top-p sampling algorithm results in fewer documents being selected. The documents with the next highest scores are added to the selection. This is useful when we want to guarantee a set number of documents will always be passed on, but allow the Top-P algorithm to still determine if more documents should be sent based on document score.
|