
GenSQL is a probabilistic programming system designed for querying generative models of database tables. Its primary function is to enable complex Bayesian workflows by integrating probabilistic models with tabular data for tasks like anomaly detection and synthetic data generation. GenSQL extends SQL with new primitives, ensuring accurate and efficient query execution, and supports various probabilistic programming languages6.

GenSQL integrates with traditional SQL operations by extending SQL with new primitives to enable complex Bayesian workflows. It combines probabilistic models, which can be automatically learned or custom-designed, with tabular data for tasks like anomaly detection and synthetic data generation. GenSQL's novel interface and soundness guarantees ensure accurate and efficient query execution.

GenSQL outperforms BayesDB significantly, achieving speedups ranging from 1.7x to 6.8x due to its efficient ClojureCat backend and strategic optimizations like caching and exploiting column independence.