# RAG Latency Economic Impact

**Use case:** 

RAG Latency Economic Impact preset with baseline-aware commercial intelligence, confidence, economic impact and an explicit automation decision.

## Input

```json
{
  "rag_logs": [
    {
      "request_id": "r1",
      "stage": "embedding",
      "latency_ms": 80,
      "status": "ok"
    },
    {
      "request_id": "r1",
      "stage": "retrieval",
      "latency_ms": 240,
      "status": "ok"
    },
    {
      "request_id": "r1",
      "stage": "reranking",
      "latency_ms": 150,
      "status": "ok"
    },
    {
      "request_id": "r1",
      "stage": "generation",
      "latency_ms": 1100,
      "status": "ok"
    }
  ],
  "expected_stages": [
    "embedding",
    "retrieval",
    "reranking",
    "generation"
  ],
  "end_to_end_sla_ms": 2200,
  "stage_sla_ms": {
    "retrieval": 350,
    "generation": 1500
  },
  "previous_profile": {},
  "monthly_requests": 10000,
  "cost_per_request_second_usd": 0.0002,
  "warn_sla_breach_rate": 0.05,
  "block_sla_breach_rate": 0.25
}
```

## Output

```json
{
  "analysis_type": {
    "label": "Analysis type",
    "format": "string"
  },
  "confidence": {
    "label": "Confidence",
    "format": "string"
  },
  "input_rows": {
    "label": "Input rows",
    "format": "integer"
  },
  "valid_spans": {
    "label": "Valid spans",
    "format": "integer"
  },
  "malformed_rows": {
    "label": "Malformed rows",
    "format": "integer"
  },
  "distinct_requests": {
    "label": "Distinct requests",
    "format": "integer"
  },
  "request_id_coverage_pct": {
    "label": "Request id coverage pct",
    "format": "number"
  },
  "slowest_stage": {
    "label": "Slowest stage",
    "format": "string"
  },
  "stage_profiles": {
    "label": "Stage profiles",
    "format": "array"
  },
  "bottleneck_ranking": {
    "label": "Bottleneck ranking",
    "format": "array"
  },
  "end_to_end": {
    "label": "End to end",
    "format": "object"
  },
  "recommendations": {
    "label": "Recommendations",
    "format": "array"
  },
  "instrumentation_gaps": {
    "label": "Instrumentation gaps",
    "format": "array"
  },
  "method_note": {
    "label": "Method note",
    "format": "string"
  },
  "baseline_available": {
    "label": "Baseline available",
    "format": "boolean"
  },
  "end_to_end_delta_ms": {
    "label": "End to end latency delta ms",
    "format": "number"
  },
  "end_to_end_delta_pct": {
    "label": "End to end latency delta percent",
    "format": "number"
  },
  "projected_monthly_requests": {
    "label": "Projected monthly requests",
    "format": "integer"
  },
  "monthly_latency_seconds_delta": {
    "label": "Monthly latency seconds delta",
    "format": "number"
  },
  "estimated_monthly_cost_impact_usd": {
    "label": "Estimated monthly cost impact",
    "format": "number"
  },
  "estimated_monthly_savings_usd": {
    "label": "Estimated monthly savings",
    "format": "number"
  },
  "estimated_annual_savings_usd": {
    "label": "Estimated annual savings",
    "format": "number"
  },
  "confidence_score": {
    "label": "Confidence score",
    "format": "integer"
  },
  "release_decision": {
    "label": "Release decision",
    "format": "string"
  },
  "decision_reasons": {
    "label": "Decision reasons",
    "format": "array"
  }
}
```

## About this Actor

This example demonstrates how to use [RAG Pipeline Latency Profiler - SLO & Bottleneck Audit](https://apify.com/quanmatrix/rag-pipeline-latency-profiler.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/quanmatrix/rag-pipeline-latency-profiler.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
This Task's input is already configured above — use it as-is rather than inventing a new one.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/quanmatrix/rag-pipeline-latency-profiler.md

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).
