Home/Financial AI/Appendix F

Appendix F.5 · Concept · Platform and Serving Notes

Compile-First Memory: Beliefs That Revise, Not Vectors That Match

Part IX logged every decision and mined predicates at scale. Those systems produce observations - gate outcomes, bridge closes, debate notes. This appendix entry asks: where do those observations live, and how do they supersede when Tuesday's stop-out contradicts Monday's thesis?

Related reading This entry stands on its own, but F4 covers a related idea in more depth if you want it.

The industry default - chunk, embed, retrieve by cosine similarity - answers the wrong question. It finds text that looks like the query; it does not maintain one current belief line per entity with revision numbers. This chapter is compile-first memory: synthesis compiler, tombstones, spreading activation, and RRF fusion - Lane B recall, never Lane A trade truth. Part VIII closes with a discipline orthogonal to fine-tuning but equally important for a finance specialist: how the platform remembers. The dominant industry pattern - chunk documents, embed them, retrieve by cosine similarity at query time - is the wrong default for trading systems. It optimises recall of text that looks like the question, not revision of beliefs that were wrong yesterday.

Figure 1. Concept map for this appendix entry: fight, desk translation, what to lock.

Appendix F.5 concept map

Why vector RAG fails as the desk brain

Retrieval-augmented generation over embeddings solves a library problem: find passages similar to this question. It does not solve a belief problem: we thought a name passed the gate on Monday; on Tuesday the trade closed at a loss - update what we believe about that name. Embedding search answers "what text resembles my question?" Belief memory answers "what do we currently think, and what changed since we last thought it?" Those are different optimization targets. Confusing them produces systems that sound fluent while repeating outdated gate calls. Embeddings are not forbidden - in a disciplined stack they can still index immutable filings at ingest time, as a librarian, never as the brain.

The synthesis compiler (deterministic, not generative)

Each entity (a ticker, a sector sleeve, a strategy pot) accumulates observations in a working tier: chat turns, bridge outcomes, closed case rows from the labeled corpus, debate notes. On a fixed schedule - typically once per trading day after the session - a consolidation job runs: 1. Groups observations by entity. 2. Merges them into one deterministic paragraph. The merge is not an LLM free-write; it is a compiler that concatenates, deduplicates, and orders facts by timestamp and source priority. 3. Always supersedes the prior active synthesis: the old row is tombstoned with a pointer to the new one, and a revision counter increments - so an operator can cite "revision 2 supersedes revision 1 after gate failure" as a clean audit trail.

Recall without embeddings: spreading activation and rank fusion

At query time, recall is not one algorithm but a fusion of ranked lists. No single list is authoritative; the platform merges evidence from several heterogeneous sources. Spreading activation (Collins-Loftus, 1975) propagates activation from entity cues along typed edges in a pointer graph: entity → closed case → prior observation → related pot. Each hop decays activation by a fixed factor. The mechanism is associative recall without vectors: "this ticker leads to that losing case leads to the related macro pot." Once several such lists exist - the synthesis line, the graph hop, a plain keyword hit - they need to be merged into one ranking, and their raw scores are not comparable (cosine similarity, a graph-activation weight, and a keyword match live on different scales). Reciprocal rank fusion (RRF) sidesteps that by ignoring scores entirely and using only each item's rank position in each list: an item's fused score is the sum of 1/(k + rank) across every list it appears in, for a small constant k (commonly 60). An item that sits near the top of two or three lists accumulates a high fused score even if it never had the single best raw score anywhere - rank-only scoring is what makes lists built by completely different mechanisms combinable without training anything.

The wiki compile loop

Syntheses should also append to a human-readable audit trail - dated revision blocks in markdown, one file per entity or one section per entity in a shared log. The wiki is not the machine store; append-only JSONL (or equivalent) remains the source of truth for automation. The wiki is what the operator reads at 2 a.m.

Definition

Active synthesis

An active synthesis is the single current compiled paragraph for an entity, tagged with a revision number that only ever counts up. At most one active synthesis exists per entity. Prior revisions remain in the store as tombstones for audit and for eval holdouts - they are never deleted, only superseded.

Worked picture

A belief that must supersede, not accumulate

Monday's working tier records: "Name passed pre-market gate; plan is swing long." Tuesday's tier records: "Bridge closed at stop; realized R negative." A vector index might return Monday's chunk if the operator asks "what happened with this name?" - similarity favours the longer, more detailed Monday note. A synthesis compiler produces one active line: "Revision 2: gate pass on Monday superseded by stop-out Tuesday; current belief: setup failed post-entry." Revision increments; Monday's synthesis is tombstoned, not orphaned in search results.

What breaks in production

Using the same retrieval stack for filings and for beliefs

A team that reuses one vector index for annual-report chunks and for "what we believe about this ticker" will eventually serve a chunk from last quarter's filing that contradicts this week's gate outcome - because similarity has no concept of supersession. Split the lanes: librarian search for documents; compile-first state for beliefs.

What to lock

Key idea

Treat memory as compiled state that revises on a schedule, not retrieved chunks that match today's embedding. Vectors may index immutable documents at ingest time; they must not be the default brain for beliefs that can be wrong yesterday and right today.

Book pointer · Appendix F.5 This essay is the precursor layer: richer explanation for the desk picture. Full derivations and callout stacks live in Financial AI Appendix F.5.
Next. Open f6: Appendix F.6. Agent Company Operating Systems: Proof, Context, and Autoresearch in Finance. Previous: f4 (Appendix F.4. Training Velocity Economics: When to Burst to the Cloud). Appendix F index.