4 releases (2 breaking)
Uses new Rust 2024
| new 0.8.1 | Feb 17, 2026 |
|---|---|
| 0.8.0 | Feb 16, 2026 |
| 0.7.0 | Feb 14, 2026 |
| 0.6.11 | Feb 9, 2026 |
#660 in Testing
1.5MB
27K
SLoC
elicitation_rand
Random data generation through elicitation, following the "castle on cloud" verification pattern.
Overview
This crate enables agents to generate random data using the elicitation framework. Agents can control randomness through conversational construction of RNGs and generators, enabling reproducible testing, gaming applications, and simulations.
Use Cases
Testing & QA
- Reproducible test failures with agent-controlled seeds
- Property-based testing integration
- Synthetic data generation at scale
- Audit trails for test scenarios
Gaming & Simulations
- Agents as game masters with controlled randomness
- Procedural generation under agent guidance
- Dice rolls, loot tables, encounter generation
- Balanced RNG for gameplay fairness
Castle on Cloud
We follow the "castle on cloud" verification pattern:
- Trust:
randcrate's RNG implementations are correct - Verify: Our wrapper logic using Kani symbolic gate verification
- Don't verify: Randomness quality (that's
rand's job)
We trust the rand ecosystem and verify only that our wrappers correctly configure and use it.
Installation
[dependencies]
elicitation = "0.6"
elicitation_rand = "0.6"
Quick Start
use elicitation::Elicitation;
use elicitation_rand::RandomGenerator;
// Agent elicits seed
let seed = u64::elicit(communicator).await?;
// Create generator
let generator = RandomGenerator::<u32>::with_seed(seed);
// Generate random values
let value = generator.generate();
Status
🚧 In Development - See RAND_INTEGRATION_PLAN.md for implementation plan.
Planned phases:
- RNG elicitation (StdRng, SmallRng, ChaCha8Rng)
- Basic generators (primitives)
- Distribution generators (Uniform, Weighted, Normal)
- Specialized generators (Dice, Shuffle, Sampling)
- Kani verification (symbolic gate)
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Dependencies
~14–26MB
~359K SLoC