Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

opendecision-flights

by Luiz Eduardo ludolua/opendecision-flights

opendecision-flights is an open-weight model for text classification from Luiz Eduardo, released under MIT License. Its published files total 32.7 KB.

A small, auditable classifier that predicts the next step of an agent that helps find flight tickets.

Parameters—
Context—
Weights32.7 KB
Licensemit
AccessOpen weights
Monthly Downloads—

Model Card

By Luiz Eduardo, published under mit, revision d89bf0378af0.

A small, auditable classifier that predicts the next step of an agent that helps find flight tickets. 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 actions…

Read Luiz Eduardo's full model card

A small, auditable classifier that predicts the next step of an agent that helps find flight tickets. 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 Portuguese
License mit
Size 0.0 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-flights", "model.skops"))  # no types outside skops' trusted list

state = "Tenho origem GRU destino REC ida 12/11 e ainda não consultei voos"
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

A free-text description of the current situation in Portuguese, for example "Tenho origem GRU destino REC ida 12/11 e ainda não consultei voos".

Actions

Action Meaning
ask ask the user for missing information
confirm confirm the details with the user before a transaction
present_options present options from results already fetched
search query a tool, API or database before replying

Training details

Data. 48 hand-written synthetic examples in Portuguese; they do not come from real users. training_data.csv is included in this repository.

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 1
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. stratified cross-validation with 5 folds, with 48 examples evaluated.

Results. Accuracy 0.5 and macro F1 0.502; always choosing the most frequent action would give 0.25. Expected calibration error: 0.182.

Only 48 examples evaluated: metrics vary a lot with so few cases.

Action Precision Recall F1 Support
ask 0.571 0.667 0.615 12
confirm 0.75 0.5 0.6 12
present_options 0.4 0.5 0.444 12
search 0.364 0.333 0.348 12

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

Threshold Decisions automated Accuracy on automated
0.3 62.5% 63.3%
0.4 8.3% 75.0%
0.5 0.0% -
0.6 0.0% -
0.7 0.0% -
0.8 0.0% -
0.9 0.0% -

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
ask low 0.7 2 no
confirm medium 0.8 10 yes
present_options low 0.7 3 no
search low 0.7 3 no

Rules:

  • none

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-flights", "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 data is small and synthetic; treat this model as a demonstration of the pipeline, not as a production model.
  • 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}
}

Model card contact

Open an issue in the OpenDecision repository.

Identity and Version

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

Files and Weights

5 files, 32.7 KB in total.

Documentation1 file · 6.8 KB
Other3 files · 24.3 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
README.mdDocumentation6.8 KB —
config.tomlOther1.2 KB —
model.skopsOther19.0 KB 08e89b0175dc
training_data.csvOther4.1 KB —
.gitattributesRepository1.6 KB —

License and Download

License
mit
Access
Open weights, no gate
Download from Luiz Eduardo

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

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
OpenDecision flights (synthetic) Task Next-action predictionMetric AccuracyComparison conditions not established 0.5 ludolua
Publisher reported
Evaluated revision not stated —
OpenDecision flights (synthetic) Task Next-action predictionMetric Macro F1Comparison conditions not established 0.502 ludolua
Publisher reported
Evaluated revision not stated —

Questions About opendecision-flights

Can I use opendecision-flights commercially?

Yes. opendecision-flights is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

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