224 points · by vquemener · 2y ago · 112 comments
With LLMs, it's more like you buy a large pancake machine that you dump all of your compost into (and you suspect the installers might have hooked up to your sewage line as input too). It triples your electricity bill, it makes bizarre screeching noises as it runs, you haven't seen your cat in a week, but at the end out come some damn fine pancakes.
I apologize. I'm talking about the thing that I was saying was a relief to be not talking about.
FWIW, Chronon does serve context within prompts to personalize LLM responses. It is also used to time-travel new prompts for evaluation.
What does this mean?
The user might say - I need a refund. The bot needs to know contextual information - order details, delivery tracking details etc.
Now you have written a prompt template that needs to be rendered with contextual information. This rendered prompt is what the model will use to decide whether to issue a refund or not.
Before you deploy this prompt to prod, you want to evaluate its performance - instances where it correctly decided to issue or decline a refund.
To evaluate, you can “replay” historical refund requests. The issue is that the information in the context changes with time. You want to instead simulate the value of the context at a historical point in time - or time-travel.
[0] https://dspy.ai/
Nah, this is nothing new.
We've solved this for ages with "snapshots" or "archives", or fancy indexing strategies, or just a freaking "timestamp" column in your tables.
What now?
For real-time ml systems, it give uou row oriented retrival latencies for features.
Most importantly, it helps modularize your ML system into feature pipelines training pipelines, and inference pipelines. No onolithic ML pipelines.
Data warehouse is more for relatively unstructured or blobby data with moderate read access and capacity for massive files.
OLAP is mostly for feeding streaming and event-driven flows, including but not limited to ML.
another one is the focus on pushing as much compute to the write-side as possible (within Chronon) - specially joins and aggregations.
OLAP databases and even graph databases don't scale well to high read traffic. Even when they do, the latencies are very high.
[1] https://www.starrocks.io/ [2] https://github.com/StarRocks/starrocks [3] https://www.starrocks.io/blog/starrocks-vs-clickhouse-the-qu...
Fundamentally most of the computation needs to happen before the read request is sent.
- Since the platform is designed to scale, it would be nice to see scalability benchmarks
- Is the platform compatible with human-in-the-loop workflows? In my experience, those workflows tend to require vastly different needs than fully automated workflows (e.g. online advertising)
re: human-in-the-loop workflows - do you mean labeling?
For our org, those are by far the most complicated to handle. Graph DBs are kind of scaling poorly, while storing state in stream processing jobs is way too large/expensive. Those would also be built on top of API sources, which then lead us to the unfortunate "log & wait" approach for our most important features
In the API itself - you could specify the chain links by specifying the source.
To be precise - a GroupBy(aggregation primitive) can have a Join(enrichment primitive) as a source. To rephrase, you can enrich first and then aggregate and continue this chain indefinitely.
> Graph DBs are kind of scaling poorly
That makes sense. Since you scaling these on the read side it is much much harder than pre-computing on the write side. (That is what Chronon allows you to do)
Online is a bit more involved - you need a month or more to test that your KV store scales against traffic coming from chronon for reads and writes.
Chronon is a full re-write of zipline with 1) a different underlying algorithm for time-travel to address scalability concerns. 2) a different serde and fetching strategy to address latency concerns.
Someone mentioned they wanted to add cadence support.
- inability to back-test new real-time features. People were forced to log-and-wait to create training sets for months. Chronon reduces this to hours or days.
- the difficulty of creating the lambda system (batch pipeline, streaming pipeline, index, serving endpoint) for every feature group. In chronon, you simply set a flag on your feature definition to spin up the lambda system.
https://www.chronon.ai/authoring_features/Source.html#stream...
Yes, exactly! I see there is some kind of support, but is it possible to use the OLTP database as an event source?
For example, say I had a table in my OLTP database, `data.returns`, that had columns `ts`, the event time, and `status`, which can be PENDING or COMPLETED. I'd like to generate point-in-time correct training data, where the feature is the count of completed returns. It seems like all the necessary information to calculate this is there
Admittedly some of the transforms proposed in this article are a little simple & don't represent the full space of feature eng requirements for all large orgs
We have plans to implement this behavior for computing the batch arm of feature serving.
and probably the only link you care about: https://github.com/airbnb/chronon#readme (Apache 2)