You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,6 +13,8 @@ The Assessment feature provides automated confidence evaluation of document extr
13
13
-**Per-Attribute Scoring**: Provides individual confidence scores and explanations for each extracted attribute
14
14
-**Token-Optimized Processing**: Uses condensed text confidence data for 80-90% token reduction compared to full OCR results
15
15
-**UI Integration**: Seamlessly displays assessment results in the web interface with explainability information
16
+
-**Confidence Threshold Support**: Configurable global and per-attribute confidence thresholds with color-coded visual indicators
17
+
-**Enhanced Visual Feedback**: Real-time confidence assessment with green/red/black color coding in all data viewing interfaces
16
18
-**Optional Deployment**: Controlled by `IsAssessmentEnabled` parameter (defaults to false for cost optimization)
17
19
-**Flexible Image Usage**: Images only processed when explicitly requested via `{DOCUMENT_IMAGE}` placeholder
18
20
@@ -174,11 +176,161 @@ Assessment results are appended to extraction results in the `explainability_inf
174
176
}
175
177
```
176
178
179
+
## Confidence Thresholds
180
+
181
+
### Overview
182
+
183
+
The assessment feature supports flexible confidence threshold configuration to help users identify extraction results that may require review. Thresholds can be set globally or per-attribute, with the UI providing immediate visual feedback through color-coded displays.
184
+
185
+
### Configuration Options
186
+
187
+
#### Global Thresholds
188
+
Set system-wide confidence requirements for all attributes:
189
+
190
+
```json
191
+
{
192
+
"inference_result": {
193
+
"YTDNetPay": "75000",
194
+
"PayPeriodStartDate": "2024-01-01"
195
+
},
196
+
"explainability_info": [
197
+
{
198
+
"global_confidence_threshold": 0.85,
199
+
"YTDNetPay": {
200
+
"confidence": 0.92,
201
+
"confidence_reason": "Clear match found in document"
202
+
},
203
+
"PayPeriodStartDate": {
204
+
"confidence": 0.75,
205
+
"confidence_reason": "Moderate OCR confidence"
206
+
}
207
+
}
208
+
]
209
+
}
210
+
```
211
+
212
+
#### Per-Attribute Thresholds
213
+
Override global settings for specific fields requiring different confidence levels:
214
+
215
+
```json
216
+
{
217
+
"explainability_info": [
218
+
{
219
+
"YTDNetPay": {
220
+
"confidence": 0.92,
221
+
"confidence_threshold": 0.95,
222
+
"confidence_reason": "Financial data requires high confidence"
223
+
},
224
+
"PayPeriodStartDate": {
225
+
"confidence": 0.75,
226
+
"confidence_threshold": 0.70,
227
+
"confidence_reason": "Date fields can accept moderate confidence"
228
+
}
229
+
}
230
+
]
231
+
}
232
+
```
233
+
234
+
#### Mixed Configuration
235
+
Combine global defaults with attribute-specific overrides:
236
+
237
+
```json
238
+
{
239
+
"explainability_info": [
240
+
{
241
+
"global_confidence_threshold": 0.80,
242
+
"CriticalField": {
243
+
"confidence": 0.85,
244
+
"confidence_threshold": 0.95,
245
+
"confidence_reason": "Override: higher threshold for critical data"
246
+
},
247
+
"StandardField": {
248
+
"confidence": 0.82,
249
+
"confidence_reason": "Uses global threshold of 0.80"
250
+
}
251
+
}
252
+
]
253
+
}
254
+
```
255
+
256
+
### Assessment Prompt Integration
257
+
258
+
Include threshold guidance in your assessment prompts to ensure consistent confidence evaluation:
259
+
260
+
```yaml
261
+
assessment:
262
+
task_prompt: |
263
+
Assess extraction confidence using these thresholds as guidance:
264
+
- Financial data (amounts, taxes): 0.90+ confidence required
265
+
- Personal information (names, addresses): 0.85+ confidence required
266
+
- Dates and standard fields: 0.75+ confidence acceptable
267
+
268
+
Provide confidence scores between 0.0 and 1.0 with explanatory reasoning:
269
+
{
270
+
"attribute_name": {
271
+
"confidence": 0.85,
272
+
"confidence_threshold": 0.90,
273
+
"confidence_reason": "Explanation of confidence assessment"
274
+
}
275
+
}
276
+
```
277
+
177
278
## UI Integration
178
279
179
-
Assessment results automatically appear in the web interface:
280
+
Assessment results automatically appear in the web interface with enhanced visual indicators:
281
+
282
+
### Visual Feedback System
283
+
284
+
The UI provides immediate confidence feedback through color-coded displays:
285
+
286
+
#### Color Coding
287
+
- 🟢 **Green**: Confidence meets or exceeds threshold (high confidence)
0 commit comments