v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Analytics
Analytics - Retrievers

Analyze For Tuning

Analyze retriever and generate tuning recommendations.

Performs comprehensive analysis and generates actionable recommendations:

  • Parameter tuning suggestions
  • Cache optimization opportunities
  • Performance improvement estimates

Recommendations Include:

  • Increase/decrease k value
  • Adjust reranking thresholds
  • Enable/optimize caching
  • Stage reordering suggestions

Use Cases:

  • Initial retriever configuration
  • Periodic performance optimization
  • A/B testing parameter changes
  • Cost optimization

Example:

curl -X POST "https://api.mixpeek.com/v1/analytics/retrievers/ret_abc123/analyze-tuning?days=7" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Namespace: your-namespace"
post/v1/analytics/retrievers/{retriever_id}/analyze-tuning

Path parameters

retriever_idstring required

Query parameters

daysinteger

Days of history to analyze

Days of history to analyze

Response

Successful Response

retriever_idstring required

Retriever identifier

current_performanceobject required

Current performance baseline

Example response

{
  "analysis_period": {
    "end": "2025-10-28T00:00:00Z",
    "start": "2025-10-21T00:00:00Z"
  },
  "current_performance": {
    "avg_latency_ms": 145.3,
    "avg_results": 10,
    "cache_hit_rate": 0.72,
    "p95_latency_ms": 287.5
  },
  "recommendations": [
    {
      "confidence": 0.85,
      "current_value": 10,
      "expected_impact": "Improve recall by ~15%, increase latency by ~8ms",
      "reasoning": "Query patterns show users often click beyond top 10 results",
      "recommendation_type": "increase_k",
      "recommended_value": 20
    }
  ],
  "retriever_id": "ret_abc123"
}