bench/

directory
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2026 License: MIT

README

Cortex Benchmarks

Evaluation suite for Cortex memory retrieval against standard benchmarks.

Benchmarks

Benchmark Questions Focus Source
LOCOMO 7,512 Long-term conversational memory (5 question types) snap-research/locomo
DMR ~500 Deep memory retrieval across sessions MemGPT/MSC-Self-Instruct
LongMemEval 500 Long-term interactive memory (5 abilities) xiaowu0162/LongMemEval

Quick Start

# 1. Download datasets
chmod +x download.sh
./download.sh

# 2. Run benchmarks
cd .. && go test ./bench/... -v -timeout 30m

# 3. Run specific benchmark with reporting
go run ./bench/locomo -data bench/datasets/locomo10.json -report bench/results/locomo.json

Evaluation Methodology

  1. Ingest — Parse dataset conversations into Cortex sessions + observations
  2. Query — For each question, run mem_search (FTS5 + optional graph boost)
  3. Score — F1 token overlap (always) + LLM-as-Judge (optional, needs API key)
  4. Aggregate — Per-type and overall accuracy
LLM Judge (Optional)

Set an API key to enable LLM-based answer evaluation:

export OPENAI_API_KEY=sk-...    # Uses gpt-4o
# OR
export ANTHROPIC_API_KEY=sk-... # Uses claude-sonnet

Without an API key, scoring falls back to F1 token overlap only.

Dataset Licenses

  • LOCOMO: CC BY-NC 4.0
  • MSC-Self-Instruct: Apache 2.0
  • LongMemEval: MIT

Directories

Path Synopsis
Package common provides shared utilities for benchmark evaluation.
Package common provides shared utilities for benchmark evaluation.
Package dmr implements the Deep Memory Retrieval benchmark runner for Cortex.
Package dmr implements the Deep Memory Retrieval benchmark runner for Cortex.
Package locomo implements the LOCOMO benchmark runner for Cortex.
Package locomo implements the LOCOMO benchmark runner for Cortex.
Package longmemeval implements the LongMemEval benchmark runner for Cortex.
Package longmemeval implements the LongMemEval benchmark runner for Cortex.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL