Expand description
Token budget allocation.
Given a budget and scored grains, decides which get full rendering and which are omitted entirely.
Two allocation strategies:
allocate()— pure priority-based allocation (70% threshold).allocate_with_diversity()— reserves slots per grain type before filling by priority, ensuring rare types are not crowded out.
Structs§
- Scored
Entry - A grain scored and measured for budget allocation.
Enums§
- Allocation
- Allocation decision for a single grain.
Functions§
- allocate
- Allocate budget across grains using priority-based allocation.
- allocate_
with_ diversity - Allocate budget with grain type diversity floor.