Classify Text
POST /api/divinity/project-classifier/classify
Predict entry_type for arbitrary prose, project-scoped.
Request Body required
Section titled “Request Body required ”Request body for POST /api/divinity/project-classifier/classify.
object
Responses
Section titled “ Responses ”Successful Response
Response body for POST /api/divinity/project-classifier/classify.
predictions is empty when status is "untrained" or
"insufficient_corpus"; classifier_status is always
populated so the UI can show the same snapshot the
/status route returns without a second round-trip.
object
One per-entry-type prediction with similar-entry context.
similar_existing_entries is capped at the
ProjectContentClassifierService.chromadb_similar_k limit
(default 5) so unbounded ChromaDB queries don’t degrade UI
responsiveness on large projects.
object
Snapshot of one project’s classifier state.
Persisted to data/ml/project-{id}/classifiers/meta.json;
served by GET /api/divinity/project-classifier/status.
is_low_quality flips on when the trained classifier’s
cross-validated F1 macro falls below
low_quality_cv_f1_threshold (default 0.40). Predictions are
still served — the UI surfaces the flag so the author knows the
model trained on insufficient or noisy signal and that confident
predictions may be wrong.
object
object
Validation Error