Skip to main content

ExtractionPolicy

Trait ExtractionPolicy 

Source
pub trait ExtractionPolicy: Send + Sync {
    // Required method
    fn instructions(&self, memory_dir: &Path) -> String;
}
Expand description

What the model is told about writing memories down.

The engine’s extraction strategy is a prompt: the model decides what is worth remembering, and the only lever anyone has is the wording. Making the wording replaceable is therefore the whole of “the extraction policy is replaceable” — anything more would be inventing a mechanism that does not exist to abstract over it.

Required Methods§

Source

fn instructions(&self, memory_dir: &Path) -> String

The instructions that go into the system prompt.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§