AI training data & features
Your app database doubles as your feature store, dataset catalog and eval log.
Read live model inputs straight from your tables instead of syncing a feature cache. Export rows from consenting workspaces to Parquet files in object storage, and score new checkpoints against your test cases before switching traffic.
Read the models overview- Replaces
- Redis feature caches and sync jobs
- Airflow or Spark dataset ETL
- Custom Parquet manifest tables
- Separate eval and model databases
Online features
One query assembles a model’s live inputs at request time.
scoreClaim.edgeql reads linked customer attributes, 90-day counts, prior review outcomes and active model versions from your live tables in one round trip. You don’t need a separate Redis feature cache or sync job.
Model servingselect Claim { id, amount_cents, tier := .claimant.tier, risk_limit_cents := .claimant.risk_limit_cents, claims_90_days := count(( select .claimant.<claimant[is Claim] filter .created > datetime_of_statement() - <duration>'2160 hours' )), was_sent_to_review := exists ( select .claimant.<claimant[is Claim].<claim[is Prediction] filter .verdict = 'review' ), model := assert_single((select Slot filter .name = 'claims-risk')).serving.version, shadow := assert_single((select Slot filter .name = 'claims-risk')).shadow.version,}filter .id = <uuid>$claimTraining consent
Workspace opt-outs exclude rows from the next export.
Check .workspace.allows_training directly in an access policy on PreferencePair. Export keys see only rows from consenting workspaces, and flipping the flag hides a customer’s data immediately.
type PreferencePair { required workspace: Workspace; required prompt: str; required chosen: str; required rejected: str; access policy service_reads_consenting allow select using (global role ?= 'service' and .workspace.allows_training);}Eval comparisons
Compare a new checkpoint against the serving model in one query.
Store test cases and evaluation runs as ordinary rows. compareModels.edgeql totals pass rates, computes mean latency and lists every case the candidate model failed that the serving model passed.
Evaluations and shadow scoringwith mine := (select EvalResult filter .model = <str>$candidate), theirs := (select EvalResult filter .model = <str>$serving),select { total := count(mine), passed := count(mine filter .passed), serving_passed := count(theirs filter .passed), mean_ms := (math::mean(mine.latency_ms) if count(mine) > 0 else 0.0), regressions := ( select mine { name := .eval_case.name, verdict, expected := .eval_case.expected } filter not .passed and .eval_case in (select theirs filter .passed).eval_case ),}Shadow traffic
Queue shadow evaluations inside the prediction write.
Save the served prediction, record the exact feature JSON and insert an ext::napalm::Job in one transaction. A background worker scores the shadow version on those same inputs without slowing the user’s request.
with made := (insert Prediction { claim := <Claim><uuid>$claim, model := <str>$model, status := PredictionStatus.Completed, features := <json>$features, score := <float64>$score, verdict := <str>$verdict, latency_ms := <int32>$latency_ms, }), shadowed := ( for version in {<optional str>$shadow} union ( insert ext::napalm::Job { query := 'shadowScore', variables := <json>(prediction := <str>made.id, model := version), } ) ),select made { id };Edge downloads
Training workers pull shards over signed edge URLs.
Workers stream dataset shards and checkpoints straight from edge caches. Every account includes 500 GB of monthly file downloads before $0.04/GB rates apply.
$0.04 / GBdownload bandwidth for shards and checkpoints