Skip to main content
GET
/
analytics
/
insights
/
comparison
Get cross-version analytics comparison insights
curl --request GET \
  --url https://api.galtea.ai/analytics/insights/comparison \
  --header 'Authorization: Bearer <token>'
{
  "productId": "prod_123",
  "versionIds": [
    "ver_122",
    "ver_123"
  ],
  "status": "flags_present",
  "flags": [
    {
      "type": "low_metric_score",
      "severity": "critical",
      "title": "Low score: Faithfulness",
      "description": "Faithfulness scored 42% on v3; 12 of 78 evaluations scored zero (15.4%).",
      "testType": "QUALITY",
      "versionId": "ver_123",
      "versionName": "v3",
      "metricId": "metric_123",
      "metricName": "Faithfulness",
      "specificationId": "spec_123",
      "currentValue": 42,
      "comparisonValue": 71,
      "unit": "%",
      "failureRate": 15.4,
      "evaluationCount": 78
    }
  ],
  "narrativeGeneratedByAi": true,
  "narrative": "Faithfulness regressed from v2 to v3 while latency on v3 is 1.6× the cheapest version."
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Query Parameters

productId
string
required

Product ID (required)

versionIds
string[]

Version IDs to compare. When omitted, all versions present in the analytics data are compared.

testIds
string[]

Filter by test IDs

metricIds
string[]

Filter by metric IDs

languages
string[]

Filter by language codes

from
string<date-time>

Start date for filtering

to
string<date-time>

End date for filtering

Response

Cross-version analytics comparison insights computed successfully

Cross-version analytics comparison insights: deterministic flags plus a fail-open LLM-generated narrative summary.

productId
string
required
Example:

"prod_123"

versionIds
string[]
required
Example:
["ver_122", "ver_123"]
status
enum<string>
required
Available options:
all_good,
flags_present
Example:

"flags_present"

flags
object[]
required
narrativeGeneratedByAi
boolean
required

True when the narrative was successfully produced by the LLM; false otherwise.

narrative
string | null

LLM-generated narrative summary, or null when generation was skipped or failed.

Example:

"Faithfulness regressed from v2 to v3 while latency on v3 is 1.6× the cheapest version."