Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AMAP ML SkillClaw judge sessions parallel

From Leeroopedia
Knowledge Sources
Domains Quality_Evaluation, LLM_Judging
Last Updated 2026-10-22 00:00 GMT

Overview

Concrete tool for judging session quality via LLM scoring across multiple dimensions, provided by the SkillClaw evolve server package.

Description

The judge_sessions_parallel async function evaluates sessions that lack reliable session-level scores. It judges each candidate session in parallel using an LLM, which scores the session across five dimensions: task_completion, response_quality, efficiency, tool_usage, and overall_score. The scores are attached to each session as `_judge_scores`. Sessions that already have reliable PRM or aggregate scores are skipped.

Usage

Import and use when you need to:

  • Score sessions that lack reliable quality metrics
  • Add LLM-judged quality dimensions to session data
  • Filter sessions by quality for evolution evidence

Code Reference

Source Location

  • Repository: SkillClaw
  • File: `evolve_server/pipeline/session_judge.py:L397-432`

Signature

async def judge_sessions_parallel(
    llm: AsyncLLMClient,
    sessions: list[dict[str, Any]],
) -> int:
    """Judge all sessions that lack a reliable session-level score.

    Only sessions without reliable scores (PRM, aggregate) are judged.
    Returns the count of successfully judged sessions.
    """

Import

from evolve_server.pipeline.session_judge import judge_sessions_parallel

I/O Contract

Inputs

Name Type Required Description
llm AsyncLLMClient Yes Async LLM client for judging
sessions list[dict] Yes Summarized sessions (with _trajectory, _summary)

Outputs

Name Type Description
Returns int Count of successfully judged sessions
Side effects dict mutation Each judged session gets _judge_scores dict with task_completion, response_quality, efficiency, tool_usage, overall_score, rationale

Usage Examples

Judge Sessions

import asyncio
from evolve_server.core.llm_client import AsyncLLMClient
from evolve_server.pipeline.session_judge import judge_sessions_parallel

llm = AsyncLLMClient(api_key="sk-...", model="gpt-4o")

# Sessions must be summarized first
judged_count = asyncio.run(judge_sessions_parallel(llm, sessions))
print(f"Judged {judged_count} sessions")

for session in sessions:
    scores = session.get("_judge_scores", {})
    if scores:
        print(f"Session {session['session_id']}: overall={scores.get('overall_score')}")

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment