← Concepts overview

01 · Hive distillation

How many short-lived LLM workers build one provable world model of a company — coordinated by a shared field of knowledge, not by a dispatcher — and how this runs natively in Snowflake.

Origin. Hive knowledge distillation was first tried three months ago on file-based storage (8Hats, WM Learning Machine, Aug 2026).

Built during the hackathon. We re-implemented it natively in Snowflake (§4–§7) and ran it on the pilot company:


1. Do we need a hive at all? Why not put everything into one context?

Measured on the pilot (RecPlace, RECPLACE.CORE.SRC_DOCUMENTS, ~2.8 chars/token for Russian):

Basket Docs ≈ tokens
meetings (summary + transcript) 1,464 5.9M
founder's Telegram archive 7,905 3.3M
team chats 4,360 1.8M
old sales calls 91 0.9M
knowledge-base notes 289 0.6M
product wiki 706 0.5M
public site 188 0.4M
founder insights + sales training + calls + engagement 152 0.3M
Total 15,155 ≈13.8M

Answer: hybrid.

Rule of thumb: use one context when the material is small, static and canonical; use the hive when it is large, living, multi-voiced and must be provable.

2. Core ideas (prior art, WMLM fleet)

  1. Preparing data = manufacturing workers. Role + lens + data boundaries + pointer to the field = the firmware of a worker instance. The machine that compiles agents for clients starts by compiling its own workers: a fractal of the same cycle.

  2. Optics: lenses and objective. What a worker extracts is determined by the frame of view, not by the corpus.

    Lenses are addressable (name + version + sha), immutable and inactive without the owner's signature. Two runs of the same lens@version are comparable.

  3. Fleet: species, instances, two lives. A species is a template (distiller, field keeper, consolidator, operator); an instance is species + objective. The operator is long-lived. Distillers are ephemeral: born for one chunk, deliver, finish. Chunk size is chosen to fit one life, so a worker never needs context compaction. Continuity lives in the field, not in an agent's context.

  4. Worker prompt: reconciled, then iteratively optimised.

  5. Stigmergic work field. A chunk is a need, not an assignment. Workers claim slots atomically; results live in the environment and survive any worker. A stale claim without a result expires and the chunk reopens. An append-only ledger is the pheromone trail. The number of workers is a free parameter: the field is the same for 1 or 20.

  6. Consensus depth as a run parameter. Where errors are expensive, N independent slots per chunk; a fact is accepted at ≥⌈2N/3⌉, matched by overlapping spans. Disagreement is kept as a signal of a murky source. Honest limit: N copies of one model ≠ independent verification. Slots can use different models.

  7. Field of facts: workers see their neighbours' work.

  8. Scaling has two layers. Correctness (atomic claims, TTL, results in the environment) and operational stability (observability, health, limits, restart, worker count under budget).

3. What changes on Snowflake (the key shift)

Snowflake thinks in sets, not processes. So the hive lives in generations (waves):

4. Data model

HIVE_RUNS        run_id, operator_lens@sha, model(s), consensus_depth, budget, status
HIVE_WAVES       run_id, wave_no, selection_rule, chunks, cost, field_size_before/after
CHUNK_QUEUE      chunk_id, need_score, status(open|done|silent), wave_no
FIELD_FACTS      fact_id, title_en, prose_en, span_ru, zone, domain, layer, knowledge_state,
                 entity_refs[], emb VECTOR(FLOAT,1024), strength, carriers, first_wave, status
FIELD_EVIDENCE   fact_id, chunk_id, wave_no, slot, relation(asserts|reinforces|contradicts|updates|refines),
                 span_ru, carrier, is_founder
FIELD_SIGNALS    kind(gap|question|contradiction|homonym|entity_unresolved|slot_divergence), about, strength, status
FIELD_SNAPSHOTS  chunk_id, wave_no, fact_ids[], signal_ids[], digest_text, snapshot_sha
SLOT_OUTPUTS     run, chunk, slot, model, prompt_sha, snapshot_sha, raw_json, gate_status

5. The neighbourhood: what a worker sees (field v2, natively)

Ring Content SQL
0 · same document facts from earlier chunks of this document doc_id
1 · same entities facts about the clients, managers, products mentioned in the chunk dictionary/alias match against Entities
2 · semantic neighbours top-K field facts by similarity to the chunk AI_EMBED + VECTOR_COSINE_SIMILARITY + QUALIFY
3 · same time / participant same period, same owner/peer day ± 30, owner_code
4 · open signals questions, gaps, contradictions, homonyms nearby FIELD_SIGNALS
+ glossary fixed ru → en terms GLOSSARY

Budget ~2–3K tokens; weighted by similarity × layer_weight × strength, canon first. The snapshot is written before the model call, and all slots of a chunk receive the same snapshot. Verified on the pilot: snowflake-arctic-embed-l-v2.0 gives 0.66 similarity for two Russian paraphrases of the same rule and 0.35 for an unrelated rule.

6. What a worker returns (new vs. WMLM)

A worker does not only add facts. It references field facts by id (JSON schema via response_format):

Result: deduplication and consensus become structural. The hive builds an evidence graph as it works (WMLM's v2 "fact graph", never implemented there). Gate in the same statement: CONTAINS(chunk_text, span_ru), length ≥ 15, closed enums, referenced ids exist.

7. Pheromones, need, evaporation

8. Wave cycle (HIVE_WAVE(run_id))

  1. Select top-B chunks by need_score (≤k per document; early waves seeded with canon).
  2. Build neighbourhoods → FIELD_SNAPSHOTS.
  3. Swarm: AI_COMPLETE(model, prompt(lens, glossary, digest, chunk), response_format) into SLOT_OUTPUTS.
  4. Gates: JSON, verbatim span, enums, valid references.
  5. Merge into the field: new facts + embeddings; reinforcements, contradictions, updates, signals.
  6. Recompute need of neighbouring chunks; evaporate.
  7. Account: cost, field growth, new contradictions → HIVE_WAVES.
  8. Stop when the queue is empty, the budget is spent, field growth per wave < ε, or the mission's evaluation passes (stop by exam, not by corpus exhaustion).

Orchestration: a Snowflake Task graph (HIVE_WAVE → CONSOLIDATE every M waves). Continuous learning: Stream on chunks → new chunks enter the queue with high need → periodic "dreaming". Consolidator (every M waves): per-domain slices (AI_AGG), homonyms, owner questions, master values with history.

9. Honest limits

10. Hackathon scope

Seed pass over the canon (long context) → 4–6 waves × ~80–100 chunks (KB notes → meetings → chats → calls). N=1 + cross-model judge on a sample. Rings 0/2/4 + glossary (1/3 if time allows). One consolidation at the end. Demo: "watch the hive learn" — per-wave field size, reinforcement vs. new-fact share (saturation), contradictions and owner questions appearing; one fact card with its evidence graph across people and sources.