uberprompt infer
Find semantic edges between fragments that no uses declaration covers.
Usage
bash
uberprompt inferReads all prompt and fragment files and sends their texts to gpt-5-nano. The model flags pairs of fragments that are related but have no declared uses edge. With --apply, the edges are written to apps/demo/edges.json as kind: "semantic".
Flags
| Flag | Description |
|---|---|
--threshold <n> | Minimum confidence score (0-1) to accept an edge (default: 0.7) |
--apply | Write discovered edges to edges.json immediately |
--json | Output results as JSON |
Examples
Preview inferred edges without writing:
$ uberprompt infer
Inferred semantic edges:
escalation-criteria ↔ refund-policy (0.85)
brand-voice ↔ output-format (0.72)
2 edges found above threshold (0.70)
Run with --apply to write to edges.jsonApply with a higher threshold:
bash
uberprompt infer --threshold 0.85 --applyHow it works
- Loads all fragment texts from
apps/demo/fragments/and inline fragments fromapps/demo/prompts/ - Skips fragments with empty text (runtime input slots like
) - Sends fragment pairs to the model, which scores how related each pair is
- Filters results by the confidence threshold
- With
--apply, merges new edges intoedges.json(existing edges are preserved)