Live data from Hacker News

A LLM+OLAP Solution

doris.apache.org

21–28 of 28 posts

Re: A LLM+OLAP Solution

#21
post #19
post #6

For an article about LLM+OLAP, it doesn't spend much time on that part. Specifically it seems like their strategy is around using an LLM to generate a DSL query for an unnamed semantic layer, then everything downstream of that is normal warehousing, with the semantic layer handling actual SQL creation. I wish it spent time on talking about how they trained their LLM to reliably generate parsable queries for the seman…

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 sema…

What is an example of a "semantic layer" in this context.

Re: A LLM+OLAP Solution

#22
post #21
post #19

Earlier quoted context omitted.

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 sema…

What is an example of a "semantic layer" in this context.

Cube (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

[1] https://www.getdbt.com/product/semantic-layer

[2] https://cloud.google.com/blog/products/data-analytics/introd...

[3] 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.

Re: A LLM+OLAP Solution

#23
It looks ClickHouse's competitors are catching up quickly. Particularly StarRocks, which was first a fork of Apache Doris and then a rewrite. They claimed to have faster query engines with cost-based optimizers and cross-table joins. I was wondering if ClickHouse will release something major soon too.

Re: A LLM+OLAP Solution

#24
Anyone know if you could put something like this over DuckDB?

I’m prototyping a distributed DuckDB in the same vain as LiteStream for SQLite and I wonder if it would be a good fit for something like this.

Re: A LLM+OLAP Solution

#25

Anyone know if you could put something like this over DuckDB? I’m prototyping a distributed DuckDB in the same vain as LiteStream for SQLite and I wonder if it would be a good fit for something like this.

Given that the architecture has a semantic layer, you just need to pick one that integrates with DuckDB, e.g. Cube [1].

About distributed DuckDB, have you checked Boiling Data? [2]

1- https://cube.dev/blog/introducing-duckdb-and-motherduck-inte... 2- https://boilingdata.medium.com/lightning-fast-aggregations-b...

Re: A LLM+OLAP Solution

#26
post #25

Anyone know if you could put something like this over DuckDB? I’m prototyping a distributed DuckDB in the same vain as LiteStream for SQLite and I wonder if it would be a good fit for something like this.

Given that the architecture has a semantic layer, you just need to pick one that integrates with DuckDB, e.g. Cube [1]. About distributed DuckDB, have you checked Boiling Data? [2] 1- https://cube.dev/blog/introducing-duckdb-and-motherduck-inte... 2- https://boilingdata.medium.com/lightning-fast-aggregations-b...

I haven't seen Boiling Data.

I feel like I never have novel ideas sigh.

Interesting links though, thank you!

Re: A LLM+OLAP Solution

#27

Anyone know if you could put something like this over DuckDB? I’m prototyping a distributed DuckDB in the same vain as LiteStream for SQLite and I wonder if it would be a good fit for something like this.

I was thinking same, had hobby project where I did uploaded csv to DuckDb and then I use generate queries with chatgpt but building sematic layer top op duckdb sound much better.

Re: A LLM+OLAP Solution

#28
post #25

Earlier quoted context omitted.

Given that the architecture has a semantic layer, you just need to pick one that integrates with DuckDB, e.g. Cube [1]. About distributed DuckDB, have you checked Boiling Data? [2] 1- https://cube.dev/blog/introducing-duckdb-and-motherduck-inte... 2- https://boilingdata.medium.com/lightning-fast-aggregations-b...

I haven't seen Boiling Data. I feel like I never have novel ideas sigh . Interesting links though, thank you!

I tried Boiling Data, but the product looks dead or abandoned: https://github.com/ClickHouse/ClickBench/issues/125 It does not work at all.
Post reply on HN