Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chunk

The fundamental storage unit in the memory system. A Chunk pairs an immutable identity (always a Sparkle) with a mutable semantic code (any HyperBinary type).

The unique id for a chunk facilitates the compositionality, as this chunk is either present or absent. At the same time, the potentially learnable code (for a chunk) offers opportunities to learn and adapt, just like weights from traditional neural nets.

Structure

FieldTypeDescription
idSparkleImmutable identity — determines storage key
codeHyperBinarySemantic content (can be updated). If absent, defaults to id
notestringHuman-readable annotation, primarily for debugging
extraprotobuf AnyExtensible payload for application-specific data, primarily for debugging

Inspection

Chunks are typically created via producers (see Producers), but can be inspected after retrieval (see Selectors).

# chunk = memory.first_picked_chunk(view, memory.by_item_key("animals", "cat"))

chunk.id        # Sparkle
chunk.code      # HyperBinary
chunk.note      # str
chunk.extra     # Optional[bytes]
Last change: , commit: bdbfd5e