Skip to content

Measure search_skills end-to-end latency on local 7B model #1152

Closed

Description

@malibio

Context

PR #1149 (closes #1130) replaced pre-LLM skill routing with an LLM-orchestrated search_skills tool. The acceptance criteria included:

Latency measured on a local 7B-class model and documented in PR (rough floor: how many extra ms per turn vs the current router).

The PR shipped without this measurement because the bench requires a warm nodespace-nlp-engine with a loaded model — outside the scope of the unit-test pass. Architectural reasoning alone (~1-3s extra per turn for the inference round that decides whether to call search_skills) is not a substitute for measurement.

Goal

Measure the actual per-turn latency cost on a real 7B-class local model and document the result.

Acceptance criteria

  • Bench harness for LocalAgentService::send_message that loads a real model (Gemma 3B or Ministral 8B — whatever is the current default for local-agent dev)
  • Three scenarios measured, each run N=10 times for variance:
    1. Conversational reply (model skips search_skills)
    2. Single skill turn (search_skills → matched tool → final text)
    3. Multi-skill turn (two search_skills calls, both with downstream tool invocations)
  • Wall-clock and per-phase token latency reported (prompt eval, generation, tool dispatch)
  • Results recorded in nodespace-docs/development/benchmarks/ or a similar persistent location, not just a PR comment
  • Decision: if latency for scenario 2 is > ~3s on a 7B model, propose a fast-path optimization (e.g., a heuristic skip for messages the schema list obviously can't satisfy — but only if measurement justifies it, per the original issue)

Non-goals

  • Optimizing inference engine internals
  • Adding a fast-path before measurement justifies one
  • Comparing against the deleted pre-LLM router (that path is gone; the measurement is of the new architecture's absolute cost)

Related

Activity

  1. malibio commented on May 30, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 132 files, 3836 tests passed

  2. self-assigned this
    on May 30, 2026
  3. added a commit that references this issue on May 30, 2026
    14111a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions