Threshold Calibrator Block
- from @localmode
- by LocalMode
Calibrate a similarity threshold from corpus embeddings via useCalibrateThreshold at percentile 90, over a selected embedding model and corpus, rendering the calibrated threshold versus the model's getDefaultThreshold preset, metadata, distribution statistics, and the MODEL_THRESHOLD_PRESETS reference with the selected model highlighted. The provider-prefixed model id is normalized so the panel, preset highlight, and presets reference align. The model downloads only behind Calibrate. No model bytes download until an explicit in-block action.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @localmode/ui/blocks/text-insights/threshold-calibratorRegistry dependencies6
- @localmode/ui/lib/utils
- @localmode/ui/results/threshold-calibration-panel
- @localmode/ui/local-first/model-loading-panel
- @localmode/ui/local-first/cache-badge
- @localmode/ui/results/error-alert
- @localmode/ui/results/mode-error-boundary
