An agent that explains intraday VaR/CVaR moves — Genie vs prompt vs tool-calling
VaR(95%) moved 22% between the 09:00 and 13:00 production runs. The risk manager asks why. An analyst opens three spreadsheets, a SQL notebook, and a correlation matrix. Twenty minutes later: a partial answer, no audit trail.
The bottleneck is not computing VaR or CVaR. Positions, vol surfaces, and correlations update all day. The hard part is attributing the delta—exposure vs vol vs correlation—fast enough to act, with enough trust that compliance will replay it.
Databricks Genie / Genie Spaces
Genie sits on your governed lakehouse. Analysts ask in natural language; Unity Catalog enforces access and records lineage. Good for no-code self-service. Weak when you need custom attribution logic or tight prompt control. Cost scales with platform consumption. Lock-in is real.
Direct LLM prompt over the warehouse
Feed schema metadata to a model, let it generate SQL, narrate the output. Fastest path to a demo—hours, not weeks. Cheap at low volume, flexible phrasing. No guardrails: hallucinated joins, invented drivers, governance gaps in generated SQL. Fine for throwaway exploration; risky for production.
Custom agent with tool-calling (SQL + risk functions)
Wrap deterministic tools around your stack: governed SQL for snapshots, a decomposition function for attribution, optional position drill-down. The LLM orchestrates and narrates; it never freewheels the math. Auditable, reusable, full control. You own engineering, security, and an eval harness.
| Criterion | Genie | Direct prompt | Tool-calling |
|---|---|---|---|
| Governance | High (Unity Catalog, access policies) | Low (prompt-injected SQL, weak lineage) | High (governed tools + logged calls) |
| Cost | Medium–high at scale | Low to prototype; unpredictable in prod | Medium (build once, your infra) |
| Latency | Medium | Low (single chain) | Medium (tool round-trips) |
| Maintainability | High for analysts; low for custom logic | Low (brittle prompts) | Medium (tools + evals) |
| Answer quality | Good for simple queries; weak on attribution | Variable; hallucination risk | High when tools encode domain logic |
Recommendation. Already on Databricks and want analyst self-service? Start with Genie for exploratory "what moved?" questions. Building production explanations for a regulated desk? Tool-calling with deterministic risk functions is the durable path—I've used this pattern modernizing risk infrastructure for a major U.S. financial institution. Need a proof-of-concept before budget approval? Direct prompt works—just don't ship it to the trading floor.
Takeaway: The explanation agent is only as trustworthy as the tools underneath it. Narration is cheap; auditable attribution is not.
If your team is wrestling with intraday risk explainability, let's talk — https://fjferrada.com
Un agente que explica movimientos intradía de VaR/CVaR — Genie vs prompt vs tool-calling
VaR(95%) se movió 22% entre las corridas de producción de las 09:00 y las 13:00. El risk manager pregunta por qué. Un analista abre tres planillas, un notebook SQL y una matriz de correlaciones. Veinte minutos después: respuesta parcial, sin trazabilidad.
El cuello de botella no es calcular VaR o CVaR. Posiciones, superficies de volatilidad y correlaciones se actualizan todo el día. Lo difícil es atribuir el delta—exposición vs vol vs correlación—con la velocidad para actuar y la confianza para que compliance lo pueda reproducir.
Databricks Genie / Genie Spaces
Genie opera sobre tu lakehouse gobernado. Los analistas preguntan en lenguaje natural; Unity Catalog aplica acceso y registra linaje. Sirve para self-service sin código. Se queda corto cuando necesitas lógica de atribución custom o control fino del prompting. El costo escala con consumo de plataforma. El lock-in es real.
Prompt directo de LLM sobre el warehouse
Alimentas metadata de esquema al modelo, genera SQL y narra el resultado. El camino más rápido a un demo—horas, no semanas. Barato a bajo volumen, frases flexibles. Sin guardrails: joins alucinados, drivers inventados, brechas de gobernanza en SQL generado. Sirve para exploración descartable; es riesgoso en producción.
Agente custom con tool-calling (SQL + funciones de riesgo)
Envuelves herramientas determinísticas: SQL gobernado para snapshots, una función de descomposición para atribución, drill-down opcional de posiciones. El LLM orquesta y narra; no inventa la matemática. Auditable, reutilizable, control total. Tú asumes ingeniería, seguridad y un harness de evaluación.
| Criterio | Genie | Prompt directo | Tool-calling |
|---|---|---|---|
| Gobernanza | Alta (Unity Catalog, políticas de acceso) | Baja (SQL inyectado, linaje débil) | Alta (tools gobernados + logs) |
| Costo | Medio–alto a escala | Bajo para prototipo; impredecible en prod | Medio (construyes una vez, tu infra) |
| Latencia | Media | Baja (cadena única) | Media (round-trips de tools) |
| Mantenibilidad | Alta para analistas; baja para lógica custom | Baja (prompts frágiles) | Media (tools + evals) |
| Calidad de respuesta | Buena en consultas simples; débil en atribución | Variable; riesgo de alucinación | Alta cuando los tools codifican lógica de dominio |
Recomendación. ¿Ya estás en Databricks y quieres self-service para analistas? Empieza con Genie para preguntas exploratorias de "¿qué se movió?". ¿Construyes explicaciones de producción para un desk regulado? Tool-calling con funciones de riesgo determinísticas es el camino durable—he usado este patrón modernizando infraestructura de riesgo para una institución financiera importante en EE.UU. ¿Necesitas un proof-of-concept antes de aprobar presupuesto? El prompt directo funciona—solo no lo lleves al trading floor.
Conclusión: El agente explicador es tan confiable como las herramientas debajo. Narrar es barato; atribuir de forma auditable no lo es.
Si tu equipo tiene un problema de explicabilidad de riesgo intradía, conversemos — https://fjferrada.com