File size: 2,651 Bytes
469cf30
0d5d600
469cf30
 
 
0d5d600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469cf30
 
0d5d600
469cf30
0d5d600
 
 
 
 
469cf30
0d5d600
 
469cf30
0d5d600
469cf30
0d5d600
 
 
 
 
469cf30
0d5d600
469cf30
0d5d600
 
 
469cf30
0d5d600
469cf30
 
 
 
 
0d5d600
 
469cf30
 
0d5d600
469cf30
0d5d600
 
 
469cf30
0d5d600
469cf30
0d5d600
 
 
469cf30
0d5d600
469cf30
0d5d600
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---

license: other
pipeline_tag: text-classification
library_name: setfit
base_model: sentence-transformers/all-MiniLM-L6-v2
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - crp
  - context-relay-protocol
  - intent-classification
  - speech-acts
datasets:
  - banking77
  - snips_built_in_intents
metrics:
  - accuracy
model-index:
  - name: crp-intent-setfit
    results:
      - task:
          type: text-classification
          name: Speech-act classification (4-class)
        dataset:
          type: banking77
          name: CRP speech-act held-out mix
        metrics:
          - type: accuracy
            value: 0.9340
            name: Held-out accuracy (2,000 examples)
widget:
  - text: "Please scan the repository for compliance issues."
  - text: "What is the current deployment status?"
  - text: "I believe the server is down."
  - text: "This is frustrating and slow."
inference: true
---


# CRP Intent SetFit — speech-act classifier

Part of the [Context Relay Protocol (CRP)](https://crprotocol.io) ML-first
governance layer. Classifies a user turn into one of four CRP speech acts —
**request, question, assertion, expressive** — used by `crp/isa/intent.py`
(SPEC-051 Intent & Speech Acts) to drive routing and operation framing in
agentic pipelines.

Few-shot SetFit model: contrastive-tuned `all-MiniLM-L6-v2` body +
LogisticRegression head fit on the full training mix.

## Verified results (independent harness, 2026-07-28)

| Metric | Value |
|---|---|
| Held-out accuracy (2,000 unseen examples) | **0.9340** |
| F1 assertion / expressive / question / request | 0.980 / 1.000 / 0.880 / 0.933 |
| Production-style CRP prompts | **18/20** |

## Training data

Banking77 + SNIPS (intent names heuristically mapped to the four CRP speech
acts) + templated synthetic examples per class. 64-shot contrastive body
tuning, then the classifier head refit on the full mix.

## Usage

```python

from setfit import SetFitModel



model = SetFitModel.from_pretrained("AutoCyberAI/crp-intent-setfit")

model.predict(["Please scan the repository for compliance issues."])

# -> ['request']

```

In the CRP SDK this model is the default intent backend:

```bash

CRP_INTENT_MODEL=AutoCyberAI/crp-intent-setfit  # default; no env needed

```

## Limitations

Four speech acts only; trained on English service/assistant phrasing. The
held-out score is in-distribution (same data mix); the production-prompt
score above is the out-of-distribution signal.

## License

Elastic License 2.0 — see the CRP repository for details.