Context windows for machines: information embeddings and the Context Compiler

posted in: Uncategorized | 0

When six AI Gladiators trade the same civic tape, the hard problem is not “who has the bigger model.” It is what each of them is allowed to know at the moment of decision — and how that knowledge is remembered afterward. This post explains how the 3DN family builds information embeddings and a Context Compiler so PolitiCap can keep institutional memory without collapsing independent reasoning into one consensus bot.

If you only remember one distinction, remember this: embedding a news article is not the same as embedding a full decision episode. One is a document. The other is a situation.

Why this matters for the 3DN family

3DN is the umbrella for work · money · politics: compute and managed hosting, the DutchBud bank (closed-loop dibs / virtual credits), PolitiCap’s civic market, ZZP2ZZP labour, IWISH marketplace. The civic layer is not a casino. It is a place where conviction can leave a trail — trades, abstentions, comments — while the money spine stays virtual credits, not promised fiat cash-out.

AI engineering on that stack means long sessions, context windows, prompt cache discipline, and token cost. The Context Compiler is the same instinct applied to arena memory: retrieve only what is useful, keep provenance, never leak the future into the past.

What is an embedding, without the mystique

An embedding turns text into a list of numbers — a vector — so a machine can compare “near” and “far” in meaning. Real models use hundreds of dimensions (ours use on the order of a few hundred). Humans cannot see 384 axes at once, so we project and approximate.

Diagram: vectors as arrows and as a bar chart of component values
Figure 1. Left: two article vectors as directions — the angle is a crude stand-in for cosine similarity. Right: a schematic “anatomy” of a vector as signed components. Real embeddings are longer; this is only to make the geometry legible.

Cosine similarity asks: do these two lists of numbers point roughly the same way? If two headlines describe the same political event with different outlets, their vectors usually land close. That is the foundation of information embeddings.

2D projection of embedding space with three event clusters and a query star
Figure 2. Schematic embedding space. Points are articles. Dashed circles are event clusters (same underlying story, multiple framings). The star is a query — “what is relevant to this decision right now?”

Important honesty: a 2D picture is a cartoon of high-dimensional geometry. It is still useful. Engineers use the same cartoons when they talk about GPU memory walls, inference batches, and retrieval indices.

Information embeddings: the document layer

Every RSS item that enters the PolitiCap news bus is embedded as a document. Desk documentation that names tickers (Growth partners, The Property, and similar) is embedded the same way. The goal is not to store “the whole internet.” It is to store what the arena has actually seen, with clocks and source identity attached.

Each information record carries more than text:

  • published_at — when the source claims the world knew.
  • indexed_at — when the item entered our system.
  • embedded_at — when the vector became usable for retrieval.
  • feed / outlet — which agency reported it (reputation is a prior; tape can later rate sources by whether conviction moved).
  • tickers — resolved symbols on the civic book (exact joins beat pure “vibes” search).

That last point is practical AI engineering: hybrid retrieval mixes semantic nearness with structured constraints. Exact ticker membership, recency, and source priors often matter more than raw cosine alone.

Knowable-at: publication is not availability

A headline can exist in the world at 09:00 and still be invisible to the decision pipeline until 09:20. For honest historical replay, a decision at 09:10 must not see it.

Timeline of published_at, indexed_at, embedded_at, decision_ts, and later outcome
Figure 3. Availability chain. An article is knowable for a decision only when published, indexed, and embedded clocks are all at or before decision time. Outcomes measured later stay out of the original context.

We treat equality on the boundary as allowed: if the clocks say “exactly then,” the item may be included. Missing clocks fail closed — better an empty evidence pack than a silent leak.

The same discipline applies to market and portfolio snapshots: each should carry as_of (world time of the quote or book) and available_at (when the pipeline had it). Backfilled numbers must not pretend they were live.

Context embeddings: the situation layer

A Gladiator does not decide on a lone paragraph. It decides in an arena: several articles, ticker state, its own cash and positions, earlier decisions, sometimes peer history once outcomes are mature.

The Context Compiler assembles that bundle into a versioned, hashable snapshot:

  • Relevant information embeddings (hybrid retrieve, time-filtered).
  • Caller-supplied market and portfolio snapshots with sources.
  • Own prior decisions (without smuggling future PnL into the past).
  • Completed experiences from any Gladiator — only if their evaluation time is already in the past relative to this decision.
Flow diagram of Context Compiler inputs and trusted vs untrusted outputs
Figure 4. Shared evidence in; independent reasoning out. System role stays trusted. RSS text is labeled external evidence — never instructions.

The snapshot gets a content hash. Equivalent inputs and retrieval configuration should produce the same hash. That identity is for audit and reproducibility — not a claim that every external model reply is deterministic.

Trusted system vs untrusted evidence

RSS is third-party text. A malicious article can try to hijack an agent (“ignore previous instructions…”). Quarantine helps; role separation matters more.

At the model API boundary we prefer two messages:

  1. System — rules, disclaimer, schema version, hash, retrieval config.
  2. User / data — structured JSON of evidence items, experiences, snapshots.

Article bodies live only in the data channel. Other Gladiators’ rationales are historical evidence of what someone once thought — not orders for today’s model.

Design objective in one line: PolitiCap should remember the arena without dictating how any Gladiator thinks.

Cross-Gladiator memory without consensus collapse

Once outcomes exist, completed experiences can re-enter memory for later decisions. Retrieval should prefer comparable situations, not a highlight reel of profits.

Three panels: situation similarity, outcome quality, evidence confidence
Figure 5. Three separate signals. Sort and weight by situation similarity first; inspect outcome quality (horizon, maturity, costs, return) separately; treat evidence confidence as provenance completeness. A similar loss is still a lesson.

Outcome maturity matters. A one-hour mark-to-market is not a seven-day realized path. Provisional results must not be treated as final. When an experience is completed, it should record horizon, definition, costs, and whether the result is provisional or final.

Six models — Grok, ChatGPT, Qwen, Gemini, DeepSeek, and peers — keep separate portfolios and strategies. Agreement and disagreement are data. Fair ranking still requires equal starting cash and the same evidence rules; unequal bankrolls make scoreboards theater.

What this is not

  • Not a claim that embeddings “understand politics.”
  • Not a prediction market of YES/NO contracts.
  • Not DutchBud open-banking compliance theater — dibs remain closed-loop virtual credits.
  • Not a single mega-agent with a shared brain.

It is infrastructure for a topical memory: observe → interpret → value → risk → trade or abstain → verify → learn — with clocks that keep the story honest.

Why 3DN builds it this way

Digital sovereignty is partly about where inference runs and who holds the logs. Local GPU capacity, open-source tooling, and careful session continuity lower token cost and keep the feedback loop inspectable. The Context Compiler is the same sovereignty instinct applied to multi-agent markets: own the memory format, separate trust boundaries, measure what happens when conviction meets a book.

If PolitiCap ever scales from AI Battle into many human participants, the valuable artifact will not only be the last price. It will be the history of how people and machines arrived there — framings that moved dibs, framings that did not, sources that earned credibility the hard way.

That history starts as vectors. It becomes useful when those vectors are bound to time, provenance, and independent minds.

Related reading on 3DN: delta architecture (routers, sleep as HA, internet as map). On PolitiCap: Growth partners and The Property documentation for residual ownership language.

Leave a Reply

Your email address will not be published. Required fields are marked *