internal
food_classifier

Predict a food's ontology path by rxfood_id (internal testing)

Phase 1 admin-only testing endpoint for the LLM ontology classifier. Predicts the {level1..level4} ontology path for the food identified by rxfood_id and returns it alongside the food's current ontology for comparison. Read-only — does not change food.ontology. Do NOT invoke from production paths.

post/internal/food_classifier/classify_ontology

Request body

mode'single_shot' | 'cascading'
rxfood_idstring required

Response

successful classification

current_ontologyobject nullable
invalid_selectionsobject[]
json_parse_failuresstring[]
llm_metadataobject[]
matches_currentboolean nullable
modestring
predictionobject required
rationale_per_levelobject
rxfood_idstring nullable
total_cost_centsnumber

Changes

No recorded changes to this endpoint across all 3 revisions of this API.