Skip to main content

Data Forge

Turn messy real-world data into audited training records — with citations, timelines, and provenance you can inspect before export.

Data Forge sits on top of the same pipeline you already use for memory: retain → consolidate → recall/reflect → graph. It does not replace that stack. It materializes what the stack already knows into a portable format (ATR) that fine-tuning tools can consume.

For hand-curated examples (import, edit, generate variants, send to memory without running a recipe), use Taste Studio — the curation lane beside pipeline forge. See also: Intuition is taste by Anurag Atulya.


The problem in one sentence

Most teams can store conversations and documents. Few can prove what their model should learn from them — and ship a dataset without silent garbage.

What teams do todayWhat breaksWhat Forge adds
Export raw chat logsNo citations, no timeline groundingRecords link answers to specific memory IDs
Hand-label JSONL in a spreadsheetExpensive, drifts from source truthRecipes generate labels from live bank state
RAG + hopeRetrieval at inference ≠ training signalTraining examples built from the same recall/reflect paths you trust in prod
One-off export scriptsNo quality gate, no versioningQuality audit + optional memory-repo commit per export

Business ROI (plain numbers logic)

StakeholderWithout ForgeWith Forge
ML / applied AIWeeks scripting ETL; debugging “why did the model hallucinate this?”Recipe pick → preview held-back rows → export JSONL
Compliance / risk“We trained on customer data” with weak lineagePer-record provenance: document IDs, cited memories, quality issues
Product / opsMemory product stops at “search my notes”Same bank powers agents and fine-tunes — one source of truth
FinanceDuplicate labeling + re-ingest when memory improvesRe-run forge when bank updates; diff via memory repos (roadmap)

Compounding effect: Every retain makes the bank smarter. Every forge run turns that intelligence into durable model capability instead of throwaway context window.


How it works

Operator flow (control plane)

Three steps — same mental model as the API:

StepWhat you doWhat happens under the hood
1. ConnectChoose domain profile + source type; edit JSON templateIngest adapters normalize to retain_batch payloads
2. Purify & forgePick recipe + quality threshold; start jobAsync operation: ingest → consolidate → recipe → audit
3. Preview & exportInspect held-back rows; download formatExporters filter by threshold; lineage manifest attached

Job stages (poll via Operations):

Stage IDLabelMeaning
queuedQueuedJob accepted
ingestIngesting sourceSource normalized and retained
purifyPurifying memoriesConsolidation (optional wait)
recipeGenerating training recordsRecipe reads bank state
auditQuality auditScores + exportable flag per record
repo_commitVersioning datasetOptional memory-repo snapshot

Atulya Training Record (ATR)

ATR is the canonical intermediate format. Think of it as a labeled snapshot of memory state at forge time — not a chat log dump.

Top-level fields

FieldPurpose
record_idStable ID for this training example
forge_job_idLinks back to the async operation
bank_idTenant isolation (one bank per request)
recipe_idWhich recipe produced this row
timelineMulti-session turns with dates
facts / observationsEvidence snapshots cited in labels
graphGraph intelligence nodes (when recipe uses graph)
labelsAnswer, citations, tool traces, belief updates, etc.
provenanceDocument and chunk IDs from ingest
qualityScore, issues, exportable boolean
lineageRecipe version, repo commit (when enabled)

Why ATR first, exporters second

Export adapters are thin transforms. Your long-term archive should be ATR — future training stacks (including on-device Unsloth runs) can add adapters without re-ingesting source data.


Recipes

Recipes are opinionated generators: they run recall, reflect, consolidation, or graph APIs and emit ATR rows.

Recipe IDTraining signalNeeds new ingest?Typical cost
consolidation_pairsFact → observation summarization with source_memory_idsNo (bank-only OK)Low
temporal_qaMulti-hop Q&A with memory citationsNoMedium
agent_traceFull reflect tool trace (recall, expand, done)NoHigh (LLM)
graph_stateGraph node status labels (stable / changed / contradictory)NoLow
belief_updateBefore/after observation text when evidence changesNoLow
synthetic_expandMulti-session timelines from seed scenariosYes (scenario source)High

Domain profiles (suggested recipes)

ProfileUse caseSuggested recipes
startup_opsIncidents, deals, product decisionsagent_trace, temporal_qa, consolidation_pairs
family_officeHoldings, beneficiaries, compliancebelief_update, temporal_qa, graph_state
macroIndicators, geopolitical time seriesbelief_update, graph_state, consolidation_pairs
socialFeeds and conversational streamsconsolidation_pairs, temporal_qa
syntheticGenerated multi-session datasynthetic_expand, graph_state

Pass domain_tags when listing recipes or submitting jobs to get tailored suggestions.


Ingest sources

source_typeAcceptsNormalizes to
scenarioDated facts, supersession chains, expected answersretain_batch items
chatSessions with turns (or LoCoMo-style conversation shape)retain_batch items
timeseriesRows or CSV text with key/value/timestamp columnsretain_batch items
bank_only(no payload)Uses memories already in the bank

Validation runs before the job is queued. Invalid JSON or empty required fields return 400 with a structured error (field, message) — fix in the UI or CLI without digging through worker logs.


Quality audit

Every record is scored before export. The audit is deterministic (no LLM judge in v1) — fast, reproducible, CI-friendly.

CheckWhat it meansExample issue
ProvenanceAnswer must cite real evidenceanswer present without memory citations (temporal Q&A, agent trace)
CitationsCited IDs must exist in the record snapshotcited memory X not in record
TemporalQuery anchor vs fact timestampsquery_anchor precedes earliest fact
ContradictionsUnresolved contradictory graph nodesHeld back unless belief_update recipe
ThresholdOverall score ≥ your slider / API paramRow marked exportable: false

Held-back records are a feature. They tell you why a row is not safe to train on — before you spend GPU hours.


Exporters

Adapter IDOutputBest for
atr_jsonlFull ATR per lineArchive, custom pipelines, future Unsloth adapter
openai_chat_jsonlmessages[] per lineOpenAI / compatible SFT
graph_intelligence_jsonlGraph FT schemaGraph classification fine-tunes

Export respects quality_threshold — same semantics as the control-plane slider.


API and CLI

uv run atulya-admin forge run \
--bank my-bank \
--recipe temporal_qa \
--domain-tag startup_ops \
--source-file ./scenario-seed.json \
--wait
  • Control plane: Bank → Data Forge tab (connect → purify → preview → export)

Roadmap: memory that trains itself

Data Forge is phase 1 of a closed loop Atulya calls the knowledge compression loop:

PhaseCapabilityOutcome
NowForge + quality audit + exportersShip cited datasets from live memory
NextMemory-repo versioning on exportDiff datasets when bank evolves
PlannedUnsloth adapter + bundled training jobSelf-contained fine-tune without leaving the stack
North starEval-driven retain + re-forgeModel and memory co-improve — errors become new facts, not repeated mistakes

See also: the repo architecture note knowledge compression loop and the blog post From Memory to Model.