Building a Unified GenAI Platform for Hundreds of Production Use Cases
karrot · Tech · 2025 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Marketplace platform AI infrastructure
Karrot needed a unified GenAI platform after independent team adoption created API-key sprawl, fragmented cost visibility, experimentation bottlenecks, and inconsistent reliability for production AI services.
Constraints:
- Teams needed access to OpenAI, Anthropic, Google, and self-hosted models without per-team credential sprawl.
- Non-engineering teams needed to experiment, evaluate, deploy, and roll back prompts without code changes.
- Production GenAI features needed retries, regional fallback, model fallback, circuit breakers, observability, and security.
- Internal agents needed discoverable MCP tools and traceable multi-step execution.
Architecture
Karrot built three connected platforms: LLM Router centralizes provider access, credentials, model abstraction, rate limits, and cost attribution; Prompt Studio lets teams create, test, evaluate, deploy, version, and operate prompts/agents; and KarrotChat exposes Prompt Studio agents and models to employees, including DANA, a BigQuery-backed data analyst agent.
Diagram confidence: explicit (topology described by the source).
flowchart LR product-services[Product Services] --> llm-router[LLM Router] llm-router --> model-providers[Model Providers] llm-router --> cost-management[Cost Management] prompt-studio[Prompt Studio] --> model-providers prompt-studio --> prompt-studio-api[Prompt Studio API] prompt-studio-api --> product-services prompt-studio --> mcp-hub[MCP Hub] mcp-hub --> agent-builder[Agent Builder] prompt-studio --> agent-builder agent-builder --> karrotchat[KarrotChat] karrotchat --> dana[DANA] dana --> bigquery[BigQuery]
Components
| Component | Role | Interacts with |
|---|---|---|
Product Services |
User-facing and internal services that consume LLM APIs for writing, images, try-on, analytics, and other features. | LLM Router, Prompt Studio API |
LLM Router |
Central API gateway for provider abstraction, service IDs, credentials, rate limits, quotas, and cost attribution. | Product Services, Model Providers, Cost Management |
Model Providers |
OpenAI, Anthropic, Google, self-hosted vLLM, image, and video models behind a normalized interface. | LLM Router, Prompt Studio |
Cost Management |
Infrastructure cost platform receiving per-service model usage attribution. | LLM Router |
Prompt Studio |
No-code prompt/model testing, evaluation, deployment, versioning, fallback, and agent-building platform. | Model Providers, Prompt Studio API, MCP Hub, Agent Builder |
Prompt Studio API |
Stable integration point that lets UI-selected prompt versions serve production traffic. | Prompt Studio, Product Services |
MCP Hub |
Registry for internal MCP tools such as data querying and document fetching. | Prompt Studio, Agent Builder |
Agent Builder |
No-code agent creator that combines instructions, models, and MCP tools and captures traces. | Prompt Studio, MCP Hub, KarrotChat |
KarrotChat |
Internal agent platform where teams discover, run, and share agents and conversations. | Agent Builder, DANA |
DANA |
Data analyst agent combining BigQuery MCP, data-model documentation, and prompts. | KarrotChat, BigQuery |
BigQuery |
Analytical data warehouse queried by DANA through MCP tooling. | DANA |
Data flow
Product services call LLM Router through a standard OpenAI SDK interface using service IDs, Prompt Studio stores and evaluates prompts and agents, MCP Hub supplies internal tools, Agent Builder orchestrates tool loops with traces, and KarrotChat lets users invoke agents such as DANA over BigQuery-backed data documentation.
4 supporting quotes
Why this architecture
Karrot split the platform into gateway, prompt/agent development, and consumption layers because provider abstraction, experimentation, reliability, and organizational knowledge sharing became distinct scaling problems once GenAI moved from experiments to hundreds of production use cases.
3 supporting quotes
Models used: OpenAI models · Anthropic models · Google models · vLLM self-hosted models · claude-4.5-sonnet · gpt-5.2 · gemini-2.5-flash · GPT-5 · GPT-Image · Sora · NanoBanana
Scale
- Karrot scaled to hundreds of GenAI use cases across products and data pipelines.“A year and a half later, the landscape has transformed dramatically. AI models have advanced beyond what we could have imagined, and Karrot has scaled to hundreds of GenAI use cases across products and data pipelines.”article, stated
- Prompt Studio evaluates prompts on hundreds to thousands of examples.“upload test sets — hundreds to thousands of examples — generate results in batch, and measure performance quantitatively.”article, stated
- The platform handles hundreds of millions of requests.“The platform now handles hundreds of millions of requests — stability and security have never been more critical.”article, stated
- Karrot's GenAI journey moved from early 2024 experimentation to late-2025 platform scale.“When we first shared Using LLMs at Karrot in early 2024, we were just beginning our journey with large language models.”article, stated
Alternatives considered (roads not taken)
Per-team provider accounts and API keys
Rejected because: Credential sprawl created provisioning, security, rate-limit, and cost-visibility problems.
Provider-specific client code
Rejected because: Different provider formats would force code changes whenever a model changed.
Engineer-dependent prompt iteration
Rejected because: Every prompt experiment required code and engineering support, slowing idea validation.
Feature-by-feature reliability handling
Rejected because: Handling retries and fallback independently would be costly and inconsistent.
Patterns
model-routing (platform)
LLM Router normalizes access to OpenAI, Anthropic, Google, and self-hosted models behind the OpenAI SDK interface.
cost-aware-routing (operations)
Every request is attributed to its originating service and fed into infrastructure cost management.
fallback-degradation (resilience)
Prompt Studio handles retries, regional fallback, model fallback, and circuit breakers for AI services.
eval-driven-development (quality)
Prompt Studio batch-evaluates prompt versions over uploaded test sets before production deployment.
tool-use-orchestration (agents)
Agent Builder combines MCP tools, instructions, models, orchestration loops, and traces without code.
observability-tracing (agents)
Agent executions are captured as traces for step-by-step debugging.
Tradeoffs
Provider abstraction
Chose OpenAI-compatible interface for all models over Provider-specific client integrations.
Rationale: Teams can switch models by name and adopt new models without code changes.
Prompt ownership
Chose No-code Prompt Studio with UI-controlled production versions over Engineer-owned prompt deployments.
Rationale: Prompt improvements can ship directly from the UI after the one-time API integration.
Reliability location
Chose Central Prompt Studio resilience layers over Each feature implementing its own retry/fallback behavior.
Rationale: Centralization makes fallback behavior consistent and reduces per-feature effort.
Analytics democratization
Chose DANA as an agent over BigQuery and documented schema knowledge over Requiring SQL and schema expertise for every analysis question.
Rationale: Team members can query data through natural language while the agent chooses tables, joins, and aggregations.
Gotchas (what bit them)
Credential sprawl made GenAI adoption hard to govern.
Root cause: Teams independently created provider accounts and API keys.
Resolution: Centralize provider credentials in LLM Router and let services authenticate with service IDs.
Per-account rate limits caused uneven availability.
Root cause: Independent accounts meant some teams exhausted quotas while others had spare capacity.
Resolution: Centralize rate limit monitoring and quota adjustment in the infrastructure team through the gateway.
Prompt iterations bottlenecked on engineering support.
Root cause: Early feature validation required code changes for every prompt/model experiment.
Resolution: Provide a no-code Prompt Studio UI with model selection, evaluation, deployment, versioning, and rollback.
Single-model dependencies can take critical AI features down during provider outages.
Root cause: Rate limits, latency spikes, and cloud API disruptions affect external AI services.
Resolution: Layer retries, region fallback, model fallback, and circuit breakers centrally.
Evaluation
Karrot evaluates prompts in Prompt Studio by uploading test sets, generating outputs in batch, and measuring performance quantitatively; Agent Builder adds traces for debugging tool decisions and responses.
Metrics: Prompt performance across varied scenarios · Batch evaluation results · Provider rate-limit/error behavior · Fallback/circuit-breaker health · Per-service model usage and cost · Agent trace steps and tool responses
3 supporting quotes
Outcomes
- Karrot scaled to hundreds of GenAI use cases across products and data pipelines.
- Teams can access supported models through LLM Router without separate credentials or code changes for provider switches.
- Non-engineering roles can build, evaluate, deploy, and roll back prompt-driven AI features.
- DANA became part of the team's daily workflow and spreads data-analysis capability beyond schema specialists.
Karrot reports the platform handles hundreds of millions of requests and that DANA is used in daily workflows; the article is a company-authored platform writeup.