random_choices
Select k items from a population with optional weighted probabilities. Use this tool for random sampling with replacement in applications requiring weighted or unbiased selections.
Instructions
Choose k items from population with replacement, optionally weighted.
Args: population: List of items to choose from k: Number of items to choose (default 1) weights: Optional weights for each item (default None for equal weights)
Returns: List of k chosen items
Input Schema
Name | Required | Description | Default |
---|---|---|---|
k | No | ||
population | Yes | ||
weights | No |