Skip to content

Commit 73c2e8b

Browse files
feat: Add AI Memory Benchmark Suite and Issue Templates
- Introduced a new AI Memory Benchmark Suite with support for MTEB, BEIR, LongBench, and LAMA benchmarks. - Created a unified runner for executing benchmarks with customizable parameters. - Added configuration for available benchmarks and default datasets. - Implemented individual benchmark runners for MTEB, BEIR, LongBench, and LAMA. - Added issue templates for bug reports and feature requests to enhance community engagement.
1 parent efc9760 commit 73c2e8b

130 files changed

Lines changed: 398 additions & 20992 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Report a reproducible bug or regression in OMem.
4+
title: "[BUG] "
5+
labels: [bug]
6+
assignees: []
7+
---
8+
9+
### Describe the bug
10+
A clear and concise description of what the bug is.
11+
12+
### Steps to reproduce
13+
1.
14+
2.
15+
3.
16+
17+
### Expected behavior
18+
What you expected to happen.
19+
20+
### Actual behavior
21+
What actually happened.
22+
23+
### Reproduction code
24+
```python
25+
# paste a minimal example that reproduces the issue
26+
```
27+
28+
### Environment
29+
- OMem version:
30+
- Python version:
31+
- OS:
32+
- Backend/optional dependencies:
33+
34+
### Additional context
35+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discussion board
4+
url: https://github.com/mohitkumarrajbadi/omem/discussions
5+
about: Use discussions for general questions and design ideas.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature, connector, integration, or enhancement for OMem.
4+
title: "[FEATURE] "
5+
labels: [enhancement]
6+
assignees: []
7+
---
8+
9+
### What feature are you requesting?
10+
Describe the feature, integration, or connector you want.
11+
12+
### Why is this useful?
13+
Explain the use case and how it would help OMem users or make the project production ready.
14+
15+
### Proposed behavior
16+
What should OMem do differently? Include any API ideas or CLI behavior.
17+
18+
### Example
19+
```python
20+
# example usage or integration snippet
21+
```
22+
23+
### Additional notes
24+
Add relevant links, expected labels, or related issues.

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,41 @@ Browse open issues at: https://github.com/mohitkumarrajbadi/omem/issues
100100

101101
---
102102

103+
## Issue Templates & Labels
104+
105+
To make contributions production-ready, we use issue templates and labels that help maintainers prioritize, triage, and ship work faster.
106+
107+
### Use the right template
108+
- Open a new issue and choose either **Bug report** or **Feature request**.
109+
- Include a short title and provide enough context so maintainers can reproduce or evaluate the request quickly.
110+
- For bug reports, include reproduction steps, expected behavior, actual behavior, and environment details.
111+
- For feature requests, describe the problem, why it matters, and an example of the desired behavior.
112+
113+
### Issue labels
114+
Use the labels below when filing issues or PRs; maintainers will also apply them during triage.
115+
116+
| Label | When to use | Example / meaning |
117+
|---|---|---|
118+
| `bug` | Defect, regression, crash, incorrect results | Core memory retrieval returns wrong result |
119+
| `enhancement` | New capability, connector, integration, or UX improvement | Add LangGraph memory adapter |
120+
| `good first issue` | Simple, easy-to-start contributions | Add CLI flag, write a small unit test |
121+
| `documentation` | Docs, examples, usage guides, README improvements | Add integration docs for LangChain |
122+
| `performance` | Speed, latency, benchmarking, optimization | Improve RAG throughput or memory add latency |
123+
| `security` | Vulnerability, data safety, encryption, secrets handling | Review encryption or input sanitization |
124+
| `testing` | Test coverage, new tests, CI improvements | Add regression tests for recall() |
125+
| `question` | Clarification, ask for design guidance, contribution help | Ask how to extend storage backends |
126+
127+
### Issue title format
128+
Use a clear prefix to make issues easier to scan:
129+
- `[BUG]` for defects
130+
- `[FEATURE]` for new features or integrations
131+
- `[DOCS]` for documentation requests
132+
- `[PERF]` for performance work
133+
134+
Example: `[FEATURE] add LangGraph connector for OMem memory`
135+
136+
---
137+
103138
## Code Style
104139

105140
**Linting:** Run `ruff check .` before committing. CI will fail if ruff reports errors.

benchmarks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
concurrency - thread-safety and parallel throughput
1111
memory - RSS/heap profiling under load
1212
integrity - data correctness under stress
13+
ai_memory - MTEB / BEIR / LongBench / LAMA-style AI memory evaluation
1314
competitor - head-to-head comparison framework
1415
report - JSON/HTML report generation
1516

benchmarks/ai_memory/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# OMem AI Memory Benchmark Suite
2+
3+
This folder provides a structured benchmark package for evaluating OMem against:
4+
5+
- `MTEB` — embedding and retrieval evaluation
6+
- `BEIR` — robustness across domains
7+
- `LongBench` / `SCROLLS` — long-span retrieval and reasoning
8+
- `LAMA` / `LAMA-UHN` — factual memory retention and recall
9+
10+
## Structure
11+
12+
- `config.py` — default benchmark names, dataset references, and model defaults
13+
- `mteb.py` — MTEB-style benchmark runner
14+
- `beir.py` — BEIR-style benchmark runner
15+
- `longbench.py` — long-range benchmark runner
16+
- `lama.py` — factual memory retention runner
17+
- `runner.py` — unified CLI and suite entrypoint
18+
19+
## Usage
20+
21+
Install optional benchmark dependencies first:
22+
23+
```bash
24+
pip install mteb beir datasets transformers sentence-transformers
25+
```
26+
27+
Then run the suite:
28+
29+
```bash
30+
python -m benchmarks.ai_memory.runner --benchmark mteb beir longbench lama --queries 100
31+
```
32+
33+
## Notes
34+
35+
These modules are intentionally structured as a proper benchmark folder with a shared runner. Each benchmark stub is ready for dataset ingestion and evaluation logic to be implemented in the corresponding file.

benchmarks/ai_memory/__init__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""AI Memory benchmark suite for OMem.
2+
3+
This package hosts schema and runner helpers for the core AI memory
4+
benchmarks: MTEB, BEIR, LongBench/SCROLLS, and LAMA/LAMA-UHN.
5+
"""
6+
7+
from .config import AVAILABLE_BENCHMARKS, DEFAULT_DATASETS, DEFAULT_MODEL
8+
from .beir import run_beir
9+
from .lama import run_lama
10+
from .longbench import run_longbench
11+
from .mteb import run_mteb
12+
from .runner import run_ai_memory_benchmarks
13+
14+
__all__ = [
15+
"AVAILABLE_BENCHMARKS",
16+
"DEFAULT_DATASETS",
17+
"DEFAULT_MODEL",
18+
"run_mteb",
19+
"run_beir",
20+
"run_longbench",
21+
"run_lama",
22+
"run_ai_memory_benchmarks",
23+
]

benchmarks/ai_memory/beir.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""BEIR-style domain robustness benchmark runner."""
2+
3+
from typing import Any, Dict, Optional
4+
5+
from omem import OMem
6+
7+
8+
def run_beir(dataset: str = "ms_marco", model_name: str = "all-MiniLM-L6-v2", n_queries: int = 100) -> Dict[str, Any]:
9+
try:
10+
import beir # noqa: F401
11+
except ImportError as exc:
12+
return {
13+
"benchmark": "beir",
14+
"dataset": dataset,
15+
"status": "missing_dependency",
16+
"note": "Install `beir` to run this benchmark.",
17+
"error": str(exc),
18+
}
19+
20+
engine = OMem(backend="memory", model=model_name)
21+
22+
return {
23+
"benchmark": "beir",
24+
"dataset": dataset,
25+
"status": "ready",
26+
"note": "Benchmark runner initialized. Implement dataset ingestion and metric evaluation.",
27+
"model": model_name,
28+
"n_queries": n_queries,
29+
}

benchmarks/ai_memory/config.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Configuration and dataset defaults for AI memory benchmarks."""
2+
3+
AVAILABLE_BENCHMARKS = ["mteb", "beir", "longbench", "lama"]
4+
DEFAULT_MODEL = "all-MiniLM-L6-v2"
5+
DEFAULT_DATASETS = {
6+
"mteb": "msmarco-passage",
7+
"beir": "ms_marco",
8+
"longbench": "wiki_long_doc",
9+
"lama": "open_lama",
10+
}

benchmarks/ai_memory/lama.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""LAMA / LAMA-UHN-style factual memory retention benchmark runner."""
2+
3+
from typing import Any, Dict
4+
5+
from omem import OMem
6+
7+
8+
def run_lama(dataset: str = "open_lama", model_name: str = "all-MiniLM-L6-v2", n_queries: int = 100) -> Dict[str, Any]:
9+
try:
10+
import datasets # noqa: F401
11+
except ImportError as exc:
12+
return {
13+
"benchmark": "lama",
14+
"dataset": dataset,
15+
"status": "missing_dependency",
16+
"note": "Install `datasets` to load LAMA-style datasets.",
17+
"error": str(exc),
18+
}
19+
20+
engine = OMem(backend="memory", model=model_name)
21+
22+
return {
23+
"benchmark": "lama",
24+
"dataset": dataset,
25+
"status": "ready",
26+
"note": "Benchmark runner initialized. Implement factual recall ingestion and evaluation.",
27+
"model": model_name,
28+
"n_queries": n_queries,
29+
}

0 commit comments

Comments
 (0)