Parallel Determinism

SkillDev tools

Provides patterns and utilities to ensure parallel TF-IDF results are identical to the sequential baseline, addressing floating-point ordering, tie-breaking, and pickling compatibility.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Parallel Determinism skill

What this skill tells your AI

The instructions your AI receives, as published by openlair/openskill in tasks-evolved/parallel-tfidf-search/environment/skills/evo-parallel-determinism/SKILL.md and read by ahel’s review.

Overview

Ensures parallel results match sequential exactly by handling:

  • Floating-point accumulation order
  • Tie-breaking in result sorting
  • Pickling compatibility for multiprocessing
  • Safe context selection (fork vs spawn)

Key Principles

  1. FP Ordering: Iterate query terms in same order as sequential (dict insertion order)
  2. Tie-breaking: Sort by (-score, doc_id) for deterministic ordering
  3. Pickling: Define NamedTuples/dataclasses at module level
  4. Context: Use 'fork' on Linux for performance (copy-on-write)

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-parallel-determinism/scripts')
from utils import (
    deterministic_score_accumulation,
    stable_sort_results,
    get_safe_mp_context
)

Functions

  • deterministic_score_accumulation(query_vector, doc_vector) - FP-safe dot product
  • stable_sort_results(results) - Sort with deterministic tie-breaking
  • get_safe_mp_context() - Get appropriate multiprocessing context

Signals

GitHub stars
89
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
evo-parallel-determinism
Source
github.com/openlair/openskill