graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

Fix prompt tuning sampling error when LIMIT is greater than number of…

Open billierinaldi opened this issue 6 months ago • 0 comments

Description

Prompt tuning errors out when the number of chunks is less than the default LIMIT, saying "Auto-prompt generation failed: Cannot take a larger sample than population when 'replace=False'"

Proposed Changes

This patch sets the limit to the min of LIMIT and the number of chunks.

Checklist

  • [x] I have tested these changes locally.
  • [x] I have reviewed the code changes.
  • [ ] I have updated the documentation (if necessary).
  • [ ] I have added appropriate unit tests (if applicable).

billierinaldi avatar May 28 '25 20:05 billierinaldi