Medication data lives inside a shadow root that is itself inside another shadow root (web component nesting). Standard XPath evaluation via fontoxpath cannot cross shadow boundaries. LLM_DOM extracts correctly if the snapshot serializer includes shadow content; otherwise LLM_VISION is required.
document cannot reach nodes inside shadow rootsLLM_DOM can workLLM_VISION always works — the content is rendered visually regardless of shadow encapsulation{
"action": "EXTRACT_DATAMODEL",
"parameters": {
"execution": "LLM_DOM",
"extract_data_model": {
"type": "object",
"properties": {
"medications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rx_id": { "type": "string" },
"drug": { "type": "string" },
"prescriber": { "type": "string" },
"refills": { "type": "number" },
"last_filled": { "type": "string" }
}
}
}
}
}
}
}