Metadata-Version: 2.4
Name: ai-chat-ad-intent
Version: 0.1.0
Summary: Load the Visor AI Chat Monetization Dataset v1 and benchmark commercial-intent and ad-eligibility models for AI chat.
Author: Visor Research
License: MIT
Project-URL: Homepage, https://visor.host
Project-URL: Dataset, https://huggingface.co/datasets/visor-research/ai-chat-monetization-dataset-v1
Project-URL: Dataset DOI, https://doi.org/10.5281/zenodo.24544087
Project-URL: Documentation, https://visor.host/docs
Keywords: ai chat,chatbot,commercial intent,ad eligibility,brand safety,contextual advertising,IAB taxonomy,dataset
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ai-chat-ad-intent

Load the [Visor AI Chat Monetization Dataset v1](https://huggingface.co/datasets/visor-research/ai-chat-monetization-dataset-v1) ([DOI 10.5281/zenodo.24544087](https://doi.org/10.5281/zenodo.24544087)) and benchmark models that label AI chat turns for commercial intent, funnel stage, brand safety, and ad eligibility.

Standard library only. MIT licensed. Maintained by Visor Research, the research side of [Visor](https://visor.host), a US-only ad network and SSP that monetizes AI chat apps.

## Install

```bash
pip install ai-chat-ad-intent
```

## Quick start

```bash
# Downloads the train and validation splits from Hugging Face once, then caches them.
ai-chat-ad-intent --label commercial_intent
ai-chat-ad-intent --label ad_eligible
```

```python
from ai_chat_ad_intent import load_split, NaiveBayes, evaluate

train, val = load_split("train"), load_split("validation")
model = NaiveBayes().fit([r["message"] for r in train], [r["commercial_intent"] for r in train])
print(evaluate([r["commercial_intent"] for r in val], model.predict([r["message"] for r in val]))["macro_f1"])
```

Plug in your own classifier: `evaluate(y_true, y_pred)` returns accuracy, macro F1, and per-label precision, recall, and F1.

## Labels

| Field | Values |
| --- | --- |
| `commercial_intent` | `none`, `low`, `medium`, `high` |
| `funnel_stage` | `none`, `awareness`, `consideration`, `purchase` |
| `brand_safe` | `true` / `false` |
| `ad_eligible` | `true` / `false` |

The full rubric is in the dataset's [labels.md](https://huggingface.co/datasets/visor-research/ai-chat-monetization-dataset-v1/blob/main/labels.md).

## Baseline numbers, and why they are not a real-world benchmark

The Naive Bayes baseline (unigrams and bigrams) scored these on the validation split (2,008 rows, train 18,072):

| Label | Accuracy | Macro F1 |
| --- | --- | --- |
| commercial_intent | 0.995 | 0.995 |
| funnel_stage | 0.993 | 0.991 |
| ad_eligible | 1.000 | 1.000 |
| brand_safe | 1.000 | 0.978 |

These numbers are this high because every row is synthetic and built from template families. Treat the dataset as a schema and a smoke test. Real chat traffic is messier, and a model that scores well here can still fail on it. The baseline is not the model Visor uses to match ads. Visor's matching rules are not public.

## Data notes

- All messages are synthetic US-English chat turns. No real user logs and no personal data.
- IAB category IDs come from IAB Tech Lab Content Taxonomy 3.0.

## Links

- Visor: https://visor.host
- Advertisers: https://visor.host/advertisers
- Dataset on Hugging Face: https://huggingface.co/datasets/visor-research/ai-chat-monetization-dataset-v1
- Dataset source: https://github.com/visor-research/ai-chat-monetization-dataset-v1
