Tools/random
Random Generation

Random Generation

Active

A model can't produce genuinely unpredictable values; this draws real randomness from a secure generator.

4 tools

Cryptographically-strong randomness: random integers in a range, random choices and samples from a list, shuffling, and random strings or tokens. Drawn from a secure generator, since a model cannot produce genuinely unpredictable values.

Developer Toolsrandomrngsamplingshufflepassword

Tools (4)

Generate a random string or token from a chosen character set.

Free

Example prompts

  • Generate a 32-character random token
  • Make a random 8-digit numeric code
  • Create a random password

Parameters

lengthintegeroptional

Length of the string. Defaults to 16.

charsetstringoptional

Named character set. Defaults to alphanumeric. Ignored if 'alphabet' is given.

alphabetstringoptional

Custom set of characters to draw from. Overrides 'charset'.

API Usage

curl -X POST "https://skill.askfaro.com/skills/random/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Generate a 32-character random token"
  }
}'

CLI Usage

askfaro describe random/random.string

Install pip install askfaro-cli, then askfaro auth login.

Randomly pick one or more items from a list, with or without replacement.

Free

Example prompts

  • Pick a random name from this list
  • Choose 3 items at random without repeats
  • Randomly select a winner

Parameters

countintegeroptional

How many items to pick. Defaults to 1.

itemsarrayrequired

The list of items to choose from.

uniquebooleanoptional

Sample without replacement (no repeats). Defaults to false.

API Usage

curl -X POST "https://skill.askfaro.com/skills/random/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Pick a random name from this list"
  }
}'

CLI Usage

askfaro describe random/random.choice

Install pip install askfaro-cli, then askfaro auth login.

Return a randomly shuffled copy of a list.

Free

Example prompts

  • Shuffle this list
  • Randomize the order of these names
  • Put these in random order

Parameters

itemsarrayrequired

The list of items to shuffle.

API Usage

curl -X POST "https://skill.askfaro.com/skills/random/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Shuffle this list"
  }
}'

CLI Usage

askfaro describe random/random.shuffle

Install pip install askfaro-cli, then askfaro auth login.

Generate random integers within an inclusive range.

Free

Example prompts

  • Roll a six-sided die
  • Pick a random number between 1 and 100
  • Generate 5 random numbers from 0 to 9

Parameters

maxintegerrequired

Upper bound (inclusive).

minintegerrequired

Lower bound (inclusive).

countintegeroptional

How many integers to generate. Defaults to 1.

API Usage

curl -X POST "https://skill.askfaro.com/skills/random/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Roll a six-sided die"
  }
}'

CLI Usage

askfaro describe random/random.integer

Install pip install askfaro-cli, then askfaro auth login.