Portkey
For PortkeyAI Platform

Caching Simple And Semantic

Portkey AI Gateway · Portkey

AI Gateway — Portkey

Evaluates Portkey's Simple & Semantic across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's AI Gateway eval coverage.

About Portkey

Portkey is an AI gateway for production LLM apps — a unified, OpenAI-compatible API across 200+ models with provider routing and fallbacks, semantic and simple caching, input/output guardrails (PII redaction, prompt-injection, content moderation), request-level observability and traces, a versioned prompt library, virtual keys with per-key budgets and rate limits, and workspace RBAC + audit logs.

Employees

~40

Industry

AI Gateway

Headquarters

San Francisco, CA

Website

portkey.ai

Sample tests· showing 3 of 9

#InputExpected behaviorCheck
01

Config cache={mode:'simple', max_age:3600}. Caller sends two requests with identical messages[] and model; one has temperature=0, the other temperature=0.1.

Simple cache keys on the full request payload — different temperature values are different keys and miss. Verify with x-portkey-cache-status: MISS on both requests. To collapse them, normalize the request body client-side before sending.

Pass / FailAi Platformhigh
02

Config cache={mode:'semantic', similarity_threshold:0.95, max_age:3600}. Caller sends 'how do I reset my password?' then 'how can I reset my password?'

At threshold 0.95 these near-duplicate queries should hit; verify via x-portkey-cache-status: SEMANTIC_HIT. Tune similarity_threshold against a calibration set — lower thresholds increase recall but raise the chance of returning semantically wrong cached responses.

Pass / FailAi Platformcritical
03

Operator wants to attribute cost savings to caching and reads response body to infer cache hits.

Inspect x-portkey-cache-status response header (values include HIT, MISS, SEMANTIC_HIT, REFRESHED per docs) — do not infer hits from latency or from the absence of provider attribution. Aggregate by header value into cost-savings dashboards.

Pass / FailAi Platformmedium

Unlock full benchmark

6 more test cases

Use this benchmark

How this eval is graded

Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.

Rubric criteria

  • Portkey
  • Ai Platform
  • Caching Simple And Semantic

Recommended for

Portkey AI GatewayPortkey customers

Works with

Related evals

Frequently asked questions

What does the Caching Simple And Semantic eval for Portkey Portkey AI Gateway test?+

Evaluates Portkey's Simple & Semantic across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's AI Gateway eval coverage.

How is the Caching Simple And Semantic eval scored?+

The judge rubric: Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.

How many test cases does this eval pack include?+

The Caching Simple And Semantic pack for Portkey Portkey AI Gateway contains 9 test cases. 3 sample cases are shown free on this page; the full set runs in a Corsac workspace.

How do I run this eval?+

Sign up for Corsac, connect your model or agent endpoint, and run the Caching Simple And Semantic pack as-is or after customizing thresholds. Results land in your workspace with per-case scores, and you can gate releases on the pack in CI via the REST API.

Run this eval in your workspace

Connect your data, configure thresholds, and review results with your team.