Skip to main content

XGEN Scale Gates

XGEN scale gates use real or replayed large API collection snapshots to verify that graph-tool-call behaves well at enterprise catalog size. BO dev data is a regression dataset, not a place for product-specific hard-coding.

Why This Gate Exists

Small toy OpenAPI specs do not expose the hardest problems:

  • hundreds or thousands of similar operation ids
  • Korean summaries mixed with English tool names
  • repeated request wrappers and response envelopes
  • generic paging/search/context fields
  • sibling APIs such as list/detail/count/update
  • graph visualizations that become unreadable if every edge is shown

The scale gate checks whether generic engine logic still works under those conditions.

Core Metrics

MetricTarget Direction
canonical_action_known_ratehigh
primary_resource_assigned_ratehigh
path_module_assigned_ratehigh
search_hit_at_8high
search_top_1high
selector_exact_ratehigh
avg_candidate_countlow enough for LLM context
max_candidate_countbounded
avg_schema_context_reductionhigh
uncaught_server_error_countzero

Project-specific thresholds should live with the fixture or Quality Lab suite. The library should only provide generic signals and deterministic behavior.

When To Run

Change TypeRecommended Gate
Docs-onlyWebsite build
Pure runner/event changeFocused runner tests
Retrieval scoring changeSaved snapshot replay
Semantic build changeSaved snapshot replay plus semantic summary gate
OpenAPI contract extraction changeSnapshot replay plus contract coverage gate
Plan synthesis changePlan Quality Lab cases
Public benchmark updateFull deterministic and LLM-backed run

Snapshot Workflow

make xgen-scale-snapshot

Store the output when comparing before/after behavior:

make xgen-scale-snapshot \
XGEN_SCALE_OUTPUT=benchmarks/results/xgen_scale_$(date +%Y%m%d).json

The snapshot should record the collection identity, source hash, library version, build options, and metric summary.

Live Sweep

Run live sweeps only when the code path touches ingest, search, semantic build, or plan synthesis in a way that snapshot replay cannot cover.

make xgen-scale-sweep

Live sweeps should not be required for every documentation, UI, or small adapter change.

Failure Triage

FailureLikely Cause
Action known rate dropsSemantic derivation or operationId parsing changed
Resource assignment dropsPath/tag/resource alias handling changed
Candidate count growsGraph expansion or BM25 field weighting widened too much
Hit@8 passes but selector exact dropsStrong-evidence selector margin or shape signal regressed
Plan hit dropsContract consumes/produces or user input slot extraction regressed
Execute fails only liveAuth readiness, downstream API, or adapter executor issue