cluster-selection-is-deterministic-and-budget-exact
IN derived (depth 1)
Cluster-based belief selection produces identical results given the same seed, returns exactly the requested budget count, and processes beliefs in sorted order — ensuring fully reproducible, precisely-sized belief subsets for derive prompt construction.
Summary
When you ask the system to pick a subset of beliefs for building a derive prompt, the selection process is fully predictable and precise. Given the same inputs and random seed, it will always pick the exact same beliefs in the exact same order, and it will return exactly as many as you asked for, no more, no less. This matters because it means derive results are reproducible and debuggable — if something goes wrong, you can replay the exact same selection to investigate.
Justifications
SL — Three independent determinism properties combine to guarantee reproducible budget-exact clustering
Antecedents (all must be IN):
- cluster-beliefs-deterministic-with-seed — Given the same beliefs dict, budget, and seed, `cluster_beliefs` produces identical output across calls.
- cluster-beliefs-returns-exact-budget — `cluster_beliefs` returns exactly `budget` belief IDs when the input set is larger than the budget, and all items when the input set is smaller.
- cluster-embed-order-is-deterministic — Beliefs are sorted by ID before embedding (`ids = sorted(beliefs.keys())`), making cluster assignments reproducible given the same random seed.
Dependents
These beliefs depend on this one:
- cluster-derive-is-semantically-informed-and-deterministic — When using cluster-based belief selection, the derive pipeline achieves semantically-informed budget allocation (embedding-based grouping ensures topical diversity across the prompt) with end-to-end determinism (sorted embedding order, fixed-seed clustering, and exact budget counts feed into reproducible prompt construction with accurate token allocation).