Docs/Self-Learning Routing

Self-Learning Routing

RoutePlex learns from your usage patterns to improve model selection over time.

Self-Learning Routing observes how models perform for your specific requests and gradually adjusts routing decisions to favor models that consistently produce better results — for your account, your query types, and your preferences.

How It Works

Every successful request generates an automatic metadata entry that captures:

  • Which model was used and which provider served it
  • The detected query type (e.g. code_algorithm, analysis, creative)
  • Response quality signals — no content is stored
  • Latency, token counts, and cost

Over time, RoutePlex builds a per-account performance profile. When you send a new request with routeplex-ai, the router consults this profile and tilts selection toward models that have worked well for similar tasks on your account.

Privacy by Design

The learning system is content-free:

  • Your prompts and responses are never stored
  • Quality is inferred from response metadata (length, structure, token ratio)
  • Query type is detected from a one-way SHA-256 hash of your message
  • All data can be deleted at any time via the dashboard or API

Confidence Gating

Learning only influences routing once there is enough usage for the signal to be reliable:

  • Cold start — when a model hasn't been used enough on your account, routing uses global patterns
  • Warm-up — as usage accumulates, your per-account signal gradually takes over
  • Established — once there's enough history, personalization carries the most weight

This prevents the system from over-correcting on sparse data. Until confidence is reached, RoutePlex falls back to global patterns learned across all accounts.

Rating Your Requests

You can provide explicit feedback to accelerate learning. From the dashboard Insights tab or via the API:

bash
curl -X POST https://api.routeplex.com/api/v1/insights/feedback \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "req_7f8a9b2c3d4e5f6g",
    "score": 5,
    "is_helpful": true
  }'

Explicit user ratings are blended with the automatic quality signals and fed back into routing preferences. User feedback carries extra weight over heuristic signals, so a few ratings on a query type can shift selection quickly.

Viewing Insights

The Insights tab in your dashboard shows:

  • Model Performance — average quality, latency, and cost per model, broken down by query type
  • Enhancement Effectiveness — whether prompt enhancement improves quality for your workload
  • Routing Influence — what percentage of requests have been classified and influenced by learning
  • Recommendations — actionable suggestions like "use Claude Haiku for simple queries to save on cost"

Access the same data via API:

bash
# Full learning dashboard
GET /api/v1/insights/learning

# Per-model stats
GET /api/v1/insights/models

# Personalized recommendations
GET /api/v1/insights/recommendations

Deleting Your Learning Data

You retain full control. Delete all learning data for your account at any time:

bash
DELETE /api/v1/insights/data

This permanently removes all metadata entries for your account. Routing reverts to global defaults immediately.

Cold Start

New accounts start routing with global patterns — aggregated, anonymized signals from across the platform. As your own data accumulates, your per-account profile gradually takes over.

RoutePlex AI
Always online

Good morning!

Ask me anything about RoutePlex — APIs, SDKs, pricing, or setup.

Common questions

Powered by RoutePlex