Downloads · 30 days
12
36% of all-time downloads
veritiana-ai/prompt-task-complexity-classifier
prompt-task-complexity-classifier is a text classification model from veritiana-ai. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Downloads · 30 days
12
36% of all-time downloads
All-time downloads
33
Public
Repo size
1.5 MB
Likes
0
Public
Click a slice to open those files.
.png1.4 MB · 91%
From the Hugging Face model README

A compact ONNX classifier from Veritiana AI that identifies the type of work requested by an AI prompt and estimates its complexity before generative execution begins.
The model runs locally, including directly in a browser through ONNX Runtime Web. It does not generate text and does not require prompt content to be sent to a remote classification service.
Live browser test: https://www.veritiana.com/prompt_classifier.html
The model produces two independent probability distributions.
general_chat, writing, translation, summarization, research, coding, mathematics, document_analysis, high_stakes
low, medium, high
Example result:
task: coding
complexity: high
This release is a public recognition layer, not a complete AI router.
Prompt
→ local feature extraction
→ ONNX task and complexity classifier
→ probabilities and confidence
→ future routing policy
→ model, tools, context, safeguards and budget
The open model answers what kind of request this is and how demanding it appears. Commercial routing value begins when those signals are combined with provider capabilities, prices, latency, organizational policies, tool access, execution quality and feedback history to decide how the request should be executed.
The classifier is also part of the product direction behind Veritiana AI Meter, where local recognition helps distinguish the type and estimated complexity of visible AI work.
The input is a fixed vector of 1,544 float32 features:
Two independent multinomial logistic-regression heads produce task and complexity probabilities.
input
features float32 [batch, 1544]
outputs
task_probabilities float32 [batch, 9]
complexity_probabilities float32 [batch, 3]
The released ONNX model is approximately 75 KB and uses ONNX opset 13.
The feature extractor is part of the model contract. Raw text cannot be passed directly to model.onnx.
The repository includes the exact implementation in features.py, with matching browser logic in examples/browser/src/main.js.
The eight numerical features encode:
Hashing uses FNV-1a 32-bit over JavaScript UTF-16 code units so Python and browser implementations remain compatible.
The recorded internal split contains 1,287 examples.
| Output | Accuracy | Macro-F1 |
|---|---|---|
| Task | 91.22% | 91.04% |
| Complexity | 86.79% | 87.24% |
These are internal weak-label evaluation results, not independently established real-world accuracy.
Important limitations:
Full per-class reports and confusion matrices are in evaluation.json.
The original normalized import contained 19,087 prompts:
| Source | Imported rows | Recorded use |
|---|---|---|
| OpenAssistant/oasst1 | 10,170 | filtered root prompter messages |
| grammarly/coedit | 8,000 | source text, task fixed to writing |
| evalplus/mbppplus | 376 | prompt field, task fixed to coding |
| google/IFEval | 541 | prompt field, weak task labels and instruction-count complexity signal |
After filtering, balancing and deterministic augmentation, the prepared set contained 6,349 rows.
The datasets themselves are not redistributed. Data provenance, row counts, SHA-256 values and the known revision limitation are documented in dataset-manifest.json.
A complete minimal Vite example is included in examples/browser.
cd examples/browser
npm install
npm run dev
The example loads model.onnx, reproduces the 1,544-feature contract and prints both probability distributions.
For the complete production interface, use the live Veritiana test:
https://www.veritiana.com/prompt_classifier.html
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-inference.txt
python examples/python/classify.py "Refactor this API and add rollback tests."
Expected output structure:
{
"task": {
"label": "coding",
"confidence": 0.0,
"probabilities": {}
},
"complexity": {
"label": "high",
"confidence": 0.0,
"probabilities": {}
}
}
The numerical values depend on the supplied prompt. The example does not send data to an external service.
Exact reproduction requires either:
dataset.jsonl with SHA-256 1d56520b25809488fa8be91bcd14219accdb31146e1ca56686ff805d34c21649, ortraining-balanced.jsonl with SHA-256 ab2665fcd75800b2350593b7af4222e81d8cc93a34f2bf67320514a92526f44c.The datasets are not included in this repository.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-training.txt
python prepare_training_set.py dataset.jsonl \
--output training-balanced.jsonl \
--report training-balanced-report.json \
--seed 42 \
--confidence 0.65 \
--target-per-task 800 \
--max-per-task 2000
python train.py training-balanced.jsonl \
--output-dir reproduced-output \
--version 3.1.0-multisource-balanced \
--test-size 0.20 \
--seed 42 \
--c 4.0
Reference model SHA-256:
dca7560742f19207d089d469c2907e7a1b7c06e2bbf14d2404a5d9359043f572
Exact byte reproduction can also depend on the numerical environment and BLAS implementation. The feature contract and output probabilities are the primary compatibility target.
README.md
model.onnx
config.json
classifier-meta.json
evaluation.json
dataset-manifest.json
training-config.json
features.py
prepare_training_set.py
train.py
requirements-inference.txt
requirements-training.txt
LICENSE
NOTICE
assets/
veritiana-prompt-classifier-architecture.png
examples/
python/
browser/
upload_to_hub.py
Do not use the classifier as:
Inference can run entirely on the user device. The model itself does not upload, store or transmit prompt content. Integrators remain responsible for the behavior of the surrounding application.
The model and repository code are released under Apache License 2.0. See LICENSE and NOTICE.
@software{veritiana_prompt_classifier_2026,
title = {Veritiana Prompt Task and Complexity Classifier},
author = {Veritiana AI},
year = {2026},
version = {3.1.0},
url = {https://www.veritiana.com/prompt_classifier.html}
}