File size: 2,191 Bytes
4437ddb | 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 | # DOXA service contract
Run the development prototype on the same machine as the client.
```sh
python tools/service.py --model model.json --port 9010
curl http://127.0.0.1:9010/health
curl -H 'Content-Type: application/json' http://127.0.0.1:9010/v1/predict \
-d '{"claim_type":"budget","text":"The director said the repair grant covered the listed buildings.","context":"The publication reports the director’s statement. Payment logs were not supplied."}'
```
- `GET /health` returns service, methods and model revision.
- `POST /v1/predict` takes `claim_type`, `text` and optional `context`.
Scope is analyst-supplied. Unknown scope or ordinary advocacy can be
out of scope. Each segment permits 6,000 Unicode characters.
- `POST /v1/scorecard` accepts an object with `pairs`. It applies fixed
matching and bounds to 1–200 supplied pairs. Labels are treated as
supplied annotations with unverified provenance. It does not convert
predictions into empirical results.
- Invalid input can return 400, long bodies 413, and non-JSON 415.
Responses use `Cache-Control: no-store`. This prototype binds to
loopback, writes no request logs and persists no input.
- A returned evidence quote is an extractive model candidate. The quote
matches its segment at the given code-point offsets. The model makes
no independent fact finding or assessment of a person's beliefs.
## Deployment on doxa.tacitus.me
Keep retrieval, inference, aggregation and reviewer approval distinct.
Store model and measure revisions with every decision. Production use
requires authenticated API access, TLS, tenant authorization, managed
secret storage, privacy and retention decisions, request budgets, deletion,
monitoring and independently reviewed real-domain evaluation. Acceptable
use covers textual review, criticism and appeal. Prejudicial language
rubrics and publication policies need domain approval.
Use a held-out set and monitor error by genre, topic and source when
considering a rollout. Perform load, abuse and cross-tenant isolation
tests before production. The public Static Space runs inspection in the
browser. The local Python service remains a development interface.
|