You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data should be stored, should ship a first class store integration, and should cache properly on hyperparams, return IDs from calls, make every interaction thru the whole system easily traced
History is coupled to cache: inspect_history(n) reads from history_window: Vec<CacheEntry> (last 100)
If cache: false on LM, there's no history at all
What's missing for "first class data storage":
Call log / audit trail — every LM call should be persisted regardless of cache settings. Schema should include:
call_id: Uuid
timestamp: DateTime
model: String
messages: Vec<Message> (what was sent)
raw_response: String
parsed_output: BamlValue
usage: LmUsage (prompt/completion tokens, cost)
module_path: String (which Predict leaf made this call)
signature_name: String
latency_ms: u64
Storage backend — options:
SQLite via rusqlite (simple, zero-config, good for local dev)
Append-only JSONL (simplest, grep-friendly)
Pluggable trait so users can bring their own (Postgres, S3, etc.)
Optimizer artifact storage — COPRO/GEPA/MIPRO produce optimized instructions and demos. Currently these live in-memory only. Should persist:
Best instructions per predictor
Selected demos per predictor
Score history across trials
The optimizer config that produced them
Dataset storage — DataLoader loads from files/HF but doesn't cache or version datasets locally.
Concrete proposal: Start with SQLite for the call log (solves the most immediate pain), make it opt-in via a feature gate. The call log naturally subsumes the history feature (#70) and provides the data #56 (tracing) needs to emit.
Activity
darinkishore commentedon Feb 12, 2026
Codebase audit — what exists today
Cache layer (
utils/cache.rs):ResponseCacheuses foyer (hybrid mem+disk) keyed onVec<(String, Value)>fromExampleCacheEntrystores{ prompt: String, prediction: Prediction }— minimalinspect_history(n)reads fromhistory_window: Vec<CacheEntry>(last 100)cache: falseon LM, there's no history at allWhat's missing for "first class data storage":
Call log / audit trail — every LM call should be persisted regardless of cache settings. Schema should include:
call_id: Uuidtimestamp: DateTimemodel: Stringmessages: Vec<Message>(what was sent)raw_response: Stringparsed_output: BamlValueusage: LmUsage(prompt/completion tokens, cost)module_path: String(which Predict leaf made this call)signature_name: Stringlatency_ms: u64Storage backend — options:
rusqlite(simple, zero-config, good for local dev)Optimizer artifact storage — COPRO/GEPA/MIPRO produce optimized instructions and demos. Currently these live in-memory only. Should persist:
Dataset storage —
DataLoaderloads from files/HF but doesn't cache or version datasets locally.Concrete proposal: Start with SQLite for the call log (solves the most immediate pain), make it opt-in via a feature gate. The call log naturally subsumes the history feature (#70) and provides the data #56 (tracing) needs to emit.
Related: #70 (history), #71 (cache keys), #56 (tracing)