Skip to main content

Crate recallbench

Crate recallbench 

Source
Expand description

RecallBench — A universal benchmark harness for AI memory systems.

This library exposes the core traits and types needed to implement memory system adapters for benchmarking.

§Implementing a Memory System

use recallbench::traits::MemorySystem;
use recallbench::types::{ConversationSession, IngestStats, RetrievalResult};

struct MySystem;

#[async_trait::async_trait]
impl MemorySystem for MySystem {
    fn name(&self) -> &str { "my-system" }
    fn version(&self) -> &str { "1.0.0" }
    async fn reset(&self) -> anyhow::Result<()> { Ok(()) }
    async fn ingest_session(&self, session: &ConversationSession) -> anyhow::Result<IngestStats> {
        Ok(IngestStats::default())
    }
    async fn retrieve_context(&self, query: &str, date: Option<&str>, budget: usize) -> anyhow::Result<RetrievalResult> {
        Ok(RetrievalResult { context: String::new(), items_retrieved: 0, tokens_used: 0, duration_ms: 0 })
    }
}

Modules§

checkpoint
config
datasets
errors
judge
llm
longevity
metrics
report
resume
runner
sampling
systems
traits
types
web