0442GitHub
Janus
Measures when to use Jev versus other models and routes accordingly.
FirasSX914/JanusREADME ↗
# Janus
[](https://github.com/FirasSX914/Janus/actions/workflows/tests.yml)
[](https://pypi.org/project/janus-decide/)
[](https://github.com/FirasSX914/Janus/blob/main/LICENSE)
[](https://pypi.org/project/janus-decide/)
Janus sends each decision to a small model or to a larger one, according to how
confident the small model is. It measures where that line sits on your data
before it routes anything. **Janus ships no default threshold: it measures one.**
It measures from either of two inputs:
- **a labelled dataset** — `--dataset`, with a gold label, so the report is
about how often each model is right;
- **a log of decisions already taken** — `--log`, with a confidence and no gold
label, so the report is about how often the logged model **agrees with a
reference model**. There is no ground truth in a log, and Janus refuses to
print a word that would suggest one.
[](https://github.com/FirasSX914/Janus/blob/main/RESEARCH.md)
<sub>Real output, replayed from the raw JSONL committed in this repository. No model is called.</sub>
```bash
pip install janus-decide
```
## Quickstart
Five minutes, on your own data. **Janus ships no default threshold: it measures one.**
**1. Install**
```bash
pip install "janus-decide[typesafe,deepseek]"
```
The bare package depends only on numpy; each backend is an extra. DeepSeek speaks the
OpenAI protocol, so `[deepseek]` and `[openai]` pull the same client.
**2. Prepare a labelled JSONL** — one object per line, three fields:
```json
{"id": 0, "text": "I lost my card", "gold_label": "lost_or_stolen_card"}
{"id": 1, "text": "when does my card arrive", "gold_label": "card_arrival"}
```
and a label file naming every class you allow:
```json
{
"instructions": "Which banking intent does this customer query express?",
"labe