3 ms·
Yeah, similar to what you and the other commenter from Definite said, we (Delphi)[0] find semantic layers way better for this kind of work than just going strai
by mjirv 3y ago
Yeah, similar to what you and the other commenter from Definite said, we (Delphi)[0] find semantic layers way better for this kind of work than just going straight to a database/data warehouse.
One thing you really need with LLMs is consistency. Text-to-SQL kind of lets the LLM do whatever it wants - join tables that shouldn't be joined, define aggregates one way in one query and another way in the next.
Because semantic layers define how tables should join, measure definitions, etc., they mean people get consistent results from one query to the next, which builds trust in the LLM.
Cube (which was mentioned in another comment and has a great open-source semantic layer) has a good article about that here: https://cube.dev/blog/semantic-layer-the-backbone-of-ai-powered-data-experiences https://cube.dev/blog/semantic-layer-the-backbone-of-ai-powe....
[0] https://delphihq.com https://delphihq.com
- bgorman 3y agoWhat is an example of a "semantic layer" in this context.
- mjirv 3y agoCube (https://cube.dev https://cube.dev) is a good one. Others include AtScale[0], dbt's MetricFlow[1], Google's Looker[2] (also a BI tool but powered by a semantic layer), and Propel[3]. [0] https://atscale.com https://atscale.com [1] https://www.getdbt.com/product/semantic-layer https://www.getdbt.com/product/semantic-layer [2] https://cloud.google.com/blog/products/data-analytics/introducing-looker-modeler https://cloud.google.com/blog/products/data-analytics/introd... [3] https://www.propeldata.com https://www.propeldata.com They're kind of an updated version of OLAP cubes if you're familiar with those. Typically semantic layers sit on top of a data warehouse, let you define metrics using code or a UI, and provide APIs or SQL connectors so that you can query them.