Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

opendecision-agent

by Luiz Eduardo ludolua/opendecision-agent

opendecision-agent is an open-weight model for text classification from Luiz Eduardo, released under Creative Commons Attribution-ShareAlike 4.0. Its published files total 4.7 MB.

A small, auditable classifier that predicts what an assistant should do next in a task-oriented conversation.

Parameters—
Context—
Weights4.7 MB
Licensecc-by-sa-4.0
AccessOpen weights
Monthly Downloads—

Model Card

By Luiz Eduardo, published under cc-by-sa-4.0, revision 3686f1bbfbca.

A small, auditable classifier that predicts what an assistant should do next in a task-oriented conversation. Given the current state, it returns one action from a fixed vocabulary with a probability for each, so an agent can act alone when it is confident and hand the decision to a person when it is not. It ships with a decision policy (config.toml) that blocks impossible actions and sets a minimum confidence per action. Direct use. Decide the next step of a conversational agent (ask, search, present options, confirm, execute, end the conversation), route uncertain decisions to human review, and log decisions with feedback to collect training data. Out of scope. Executing irreversible…

Read Luiz Eduardo's full model card

A small, auditable classifier that predicts what an assistant should do next in a task-oriented conversation. Given the current state, it returns one action from a fixed vocabulary with a probability for each, so an agent can act alone when it is confident and hand the decision to a person when it is not. It ships with a decision policy (config.toml) that blocks impossible actions and sets a minimum confidence per action.

Model details

Developed by Luiz Araujo
Model type TF-IDF features + multinomial logistic regression (scikit-learn)
Task next-action prediction for task-oriented agents (text classification)
Language English
License cc-by-sa-4.0
Size 4.7 MB
Code github.com/leduardoaraujo/OpenDecision

Uses

Direct use. Decide the next step of a conversational agent (ask, search, present options, confirm, execute, end the conversation), route uncertain decisions to human review, and log decisions with feedback to collect training data.

Out of scope. Executing irreversible actions (payments, bookings) from a prediction alone, domains far from the training data without re-evaluating, and any use as a source of facts: the model chooses an action, it does not generate or verify content.

How to get started

from huggingface_hub import hf_hub_download
import skops.io as sio

model = sio.load(hf_hub_download("ludolua/opendecision-agent", "model.skops"))  # no types outside skops' trusted list

state = "[intent SearchOnewayFlight] [filled destination_airport origin_airport] [missing departure_date] [requested none] || user: I need a one way flight from New York to Seattle."
probabilities = dict(zip(model.classes_, model.predict_proba([state])[0]))
print(max(probabilities, key=probabilities.get), probabilities)

Dependencies: scikit-learn, skops and huggingface_hub. Use a scikit-learn version compatible with the training one. The full toolkit (CLI, REST API, decision log, evaluation, policy) is in the OpenDecision repository.

Input format

The state is the dialogue state followed by the last turns, separated by ||:

[intent <ActiveIntent>] [filled <slots>] [missing <slots>] [requested <slots>] || user: <text> || assistant: <text> || user: <text>
Tag Content
intent the user's active intent, e.g. SearchOnewayFlight
filled slots the user already provided (names only, no values)
missing required slots of the intent that are still empty
requested slots the user asked about

Use none for empty tags. Knowing which required slots are missing is the strongest signal: without the tags, accuracy drops from 0.90 to 0.77. Portuguese tags ([intencao] [preenchidos] [faltando] [pedidos], usuario:) are accepted by opendecision.vocabulary.normalize_state, which the OpenDecision package applies before predicting.

Actions

Action Meaning
answer answer a question about an item or the task
ask ask the user for missing information
confirm confirm the details with the user before a transaction
end_conversation close the conversation
execute run the transaction (booking, payment, transfer) and report the outcome
offer_more_help ask whether the user needs anything else
present_options present options from results already fetched
search query a tool, API or database before replying
suggest_next_step propose the next step, such as booking what was found

Training details

Data. 164982 assistant turns from the Schema-Guided Dialogue (Rastogi et al., 2020, CC BY-SA 4.0): conversations between people and a virtual assistant across 20 domains, written by crowd workers from simulated outlines. Build the CSV with opendecision import-sgd. The training data is not redistributed here; download it from the original source.

Preprocessing. States are normalized to the English tag format, then vectorized with TF-IDF over word unigrams and bigrams with accents stripped.

Hyperparameter Value
ngram_range (1, 2)
min_df 5
C 1.0
class_weight None
max_iter 1000
calibration none

The solver is L-BFGS, run in warm-started chunks so training progress can be reported. Hyperparameters live in config.toml and can be searched with opendecision tune.

Evaluation

Method. separate test split (sgd_generic_test.csv), with 42297 examples evaluated.

Results. Accuracy 0.901 and macro F1 0.865; always choosing the most frequent action would give 0.213. Expected calibration error: 0.084.

Action Precision Recall F1 Support
answer 0.983 0.962 0.972 4170
ask 0.997 0.941 0.968 9016
confirm 0.901 0.847 0.873 5697
end_conversation 0.926 0.892 0.908 4201
execute 0.939 0.921 0.93 5006
offer_more_help 0.73 0.767 0.748 2684
present_options 0.686 0.714 0.7 1030
search 0.849 0.958 0.9 8233
suggest_next_step 0.795 0.779 0.787 2260

Review thresholds. Decisions with confidence below the threshold go to a person:

Threshold Decisions automated Accuracy on automated
0.3 98.7% 90.9%
0.4 95.4% 92.3%
0.5 90.0% 94.3%
0.6 82.9% 96.3%
0.7 74.7% 97.8%
0.8 64.9% 98.8%
0.9 49.8% 99.6%

Decision policy

config.toml holds the decision policy used with this model: rules that block impossible actions, a minimum confidence per action, risk levels and error costs, in units of one human review (review_cost = 1). opendecision calibrate-policy re-fits the thresholds from the costs.

Action Risk Min. confidence Unreviewed error cost Confirm with user
answer low 0.3 2 no
ask low 0.33 2 no
confirm medium 0.71 10 no
end_conversation medium 0.54 8 no
execute irreversible 0.86 50 yes
offer_more_help low 0.31 2 no
present_options low 0.48 3 no
search low 0.64 3 no
suggest_next_step low 0.42 3 no

Rules:

  • no_search_or_execute_with_missing_fields: deny search, execute when any required slot is missing

Simulated on the evaluation data above, the policy automates 85.1% of decisions at 95.2% accuracy, with an expected cost of 0.309 reviews per decision.

Apply it with the OpenDecision package (pip install git+https://github.com/leduardoaraujo/OpenDecision):

import tomllib
from opendecision.policy import apply, from_dict

with open(hf_hub_download("ludolua/opendecision-agent", "config.toml"), "rb") as file:
    policy = from_dict(tomllib.load(file)["policy"])
decision = apply(probabilities, state, policy)  # probabilities and state from the snippet above
print(decision["action"], decision["needs_review"], decision["reasons"])

Bias, risks and limitations

  • The model matches word patterns. It does not understand business rules or verify facts, so the calling application must check preconditions before acting.
  • Logistic regression probabilities are not calibrated; pick thresholds from the tables above, and re-evaluate on your own traffic before automating.
  • The training conversations were written by crowd workers from simulated outlines in 20 service domains, so real users will be messier and other domains less accurate.
  • The action vocabulary is fixed; new actions require new labeled data.

Citation

@software{araujo2026opendecision,
  author = {Araujo, Luiz},
  title  = {OpenDecision: a small, auditable next-action model for AI agents},
  year   = {2026},
  url    = {https://github.com/leduardoaraujo/OpenDecision}
}

Training data:

@inproceedings{rastogi2020schema,
  title     = {Towards Scalable Multi-domain Conversational Agents: The Schema-Guided Dialogue Dataset},
  author    = {Rastogi, Abhinav and Zang, Xiaoxue and Sunkara, Srinivas and Gupta, Raghav and Khaitan, Pranav},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  volume    = {34},
  number    = {05},
  pages     = {8689--8696},
  year      = {2020}
}

Model card contact

Open an issue in the OpenDecision repository.

Identity and Version

Repository
ludolua/opendecision-agent
Publisher
Luiz Eduardo
Task
Text classification
Modality
Text
Library
sklearn
Parameters
Not stated by the source
Languages
en
Revision
3686f1bbfbcabb039e2f34410274cfdd1fc97980
First published
2026-10-11
Last updated
2026-10-11

Files and Weights

4 files, 4.7 MB in total.

Documentation1 file · 9.6 KB
Other2 files · 4.7 MB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
README.mdDocumentation9.6 KB —
config.tomlOther3.7 KB —
model.skopsOther4.7 MB 0a0da03293dd
.gitattributesRepository1.6 KB —

License and Download

License
cc-by-sa-4.0
Access
Open weights, no gate
Download from Luiz Eduardo

Released by Luiz Eduardo through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) google-research-datasets/schema_guided_dstc8

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
Schema-Guided Dialogue Task Next-action predictionMetric AccuracyComparison conditions not established 0.901 ludolua
Publisher reported
Evaluated revision not stated —
Schema-Guided Dialogue Task Next-action predictionMetric Macro F1Comparison conditions not established 0.865 ludolua
Publisher reported
Evaluated revision not stated —

Questions About opendecision-agent

Can I use opendecision-agent commercially?

Yes. opendecision-agent is released under Creative Commons Attribution-ShareAlike 4.0. CC BY-SA 4.0 permits sharing and adapting, including commercially, with credit to the creator, and requires adaptations to be released under the same license.

Similar Models

Model · Text classification

twitter-roberta-base-sentiment-latest

Cardiff NLP

This is a RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021, and finetuned for sentiment analysis with the TweetEval benchmark. The original Twitter-based RoBERTa model can be found here and the original reference paper is TweetEval. This model is suitable for English. 0 -> Negative; 1 -> Neutral; 2 -> Positive This sentiment analysis model has been integrated into TweetNLP. You can access the demo here.

Open weights cc-by-4.0 514 tokens transformers

Model · Text classification

finbert-tone

Yi

FinBERT is a BERT model pre-trained on financial communication text. The purpose is to enhance financial NLP research and practice. It is trained on the following three financial communication corpus. The total corpora size is 4.9B tokens. More technical details on FinBERT: Click Link This released finbert-tone model is the FinBERT model fine-tuned on 10,000 manually annotated (positive, negative, neutral) sentences from analyst reports. This model achieves superior performance on financial tone analysis task. If you are simply interested in using FinBERT for financial tone analysis, give it a try. If you use the model in your academic work, please cite the following paper: Huang, Allen H.…

Open weights 512 tokens transformers

Model · Text classification

ms-marco-MiniLM-L-6-v2

Joshua

https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-6-v2 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights 512 tokens transformers.js

Model · Text classification

twitter-xlm-roberta-base-sentiment

Cardiff NLP

This is a multilingual XLM-roBERTa-base model trained on ~198M tweets and finetuned for sentiment analysis. The sentiment fine-tuning was done on 8 languages (Ar, En, Fr, De, Hi, It, Sp, Pt) but it can be used for more languages (see paper for details). This model has been integrated into the TweetNLP library.

Open weights 514 tokens transformers

Model · Text classification

unbiased-toxic-roberta

Unitary

The huggingface models currently give different results to the detoxify library (see issue here). For the most up to date models we recommend using the models from https://github.com/unitaryai/detoxify Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary, where we are working to stop harmful content online by interpreting visual content in context. Score not directly comparable since it is obtained on the validation set provided and not on the test set. To update when the test labels are made available. It is also noteworthy to mention…

Open weights apache-2.0 514 tokens transformers

Model · Text classification

emotion-english-distilroberta-base

Hartmann

With this model, you can classify emotions in English text data. The model was trained on 6 diverse datasets (see Appendix below) and predicts Ekman's 6 basic emotions, plus a neutral class: 1) anger 2) disgust 3) fear 4) joy 5) neutral 6) sadness 7) surprise The model is a fine-tuned checkpoint of DistilRoBERTa-base. For a 'non-distilled' emotion model, please refer to the model card of the RoBERTa-large version. a) Run emotion model with 3 lines of code on single text example using Hugging Face's pipeline command on Google Colab: b) Run emotion model on multiple examples and full datasets (e.g.,.csv files) on Google Colab: Please reach out to [email protected] if you have any…

Open weights 514 tokens transformers