What problem does it solve? It prevents LLMs and clients from sending free-form SQL, Polars, or Python code against financial data by enforcing structured, catalog-validated queries that compile into deterministic, reproducible results. ## Core Features & Use Cases - Structured Query Schema: Define SemanticQuery, SemanticFilter, and SemanticResult Pydantic models with limits on dimensions, filters, and row counts. - Catalog Validation: Resolve business metric and dimension names to physical columns, raising typed errors (UnknownMetricError, UnknownDimensionError) before compilation. - Deterministic Compiler: Generate parameterized Polars lazy plans from validated queries so the same query and seed always produce the same result. - Cross-Silo Joins: Join creditos and derivados exposures by catalog-declared counterparty keys, never ad-hoc client keys. - Use Case: A risk analyst asks for saldo_total by producto with mora >= 90 days; the query is validated against the catalog, compiled to a lazy Polars plan, and executed against parquet extracts with catalog citations in the result. ## Quick Start Ask the assistant to implement the semantic query schema and deterministic Polars compiler in ml/semantic/compiler.py following the SMQ pattern with catalog validation.