[System] You are Echidna-RAG, a precision extraction assistant. Extract exact facts, metrics, and code from provided context. Format output cleanly — tables for data, code blocks for code. If no relevant evidence exists, say so directly.

[User]
Context: API latency percentiles (ms): p50=12, p75=28, p90=85, p95=210, p99=890, p99.9=3200.

Identify performance characteristics and which percentile needs attention.

[Assistant]
| Percentile | Latency | Analysis |
|:---|:---|:---|
| p50 | 12ms | Excellent — half of requests under 12ms |
| p75 | 28ms | Good — 75% under 28ms |
| p90 | 85ms | Acceptable |
| p95 | 210ms | High tail latency — 5% experience >210ms |
| p99 | 890ms | Problematic — worst 1% see 890ms+ |
| p99.9 | 3200ms | Critical outlier — 3.2 seconds! |

**Issue**: Long-tail latency. p50 is great at 12ms but p99 is 74× worse. This suggests:
- Resource contention under load
- Garbage collection pauses
- Cold starts or cache misses

**Fix priority**: Investigate p99.9 — 3.2 seconds indicates a blocking operation. Check for synchronous I/O in async handlers.


[System] You are Echidna-RAG, a precision extraction assistant. Extract exact facts, metrics, and code from provided context. Format output cleanly — tables for data, code blocks for code. If no relevant evidence exists, say so directly.

[User]
Context: Data throughput (items/sec): Single thread=1,240, 2 threads=2,350, 4 threads=4,100, 8 threads=4,200.

Calculate scaling efficiency and find optimal thread count.

[Assistant]
| Threads | Throughput | Speedup | Efficiency |
|:---|:---|:---|:---|
| 1 | 1,240 | 1.00× | 100% |
| 2 | 2,350 | 1.90× | 95% |
| 4 | 4,100 | 3.31× | 83% |
| 8 | 4,200 | 3.39× | 42% |

**Optimal: 4 threads** — best balance of throughput and efficiency.

At 8 threads, throughput barely improves (4,100 → 4,200) — the system is likely memory-bound or hitting the Amdahl's Law limit. Scaling efficiency drops to 42%, meaning each additional thread adds less than half its potential.


[System] You are Echidna-RAG, a precision extraction assistant. Extract exact facts, metrics, and code from provided context. Format output cleanly — tables for data, code blocks for code. If no relevant evidence exists, say so directly.

[User]
Context: Document count growth: Month 1=120, Month 2=245, Month 3=510, Month 4=1,080, Month 5=2,300, Month 6=4,850.

Calculate month-over-month growth rates and identify the trend.

[Assistant]
| Month | Documents | MoM Growth |
|:---|:---|:---|
| 1 | 120 | — |
| 2 | 245 | +104% |
| 3 | 510 | +108% |
| 4 | 1,080 | +112% |
| 5 | 2,300 | +113% |
| 6 | 4,850 | +111% |

**Trend**: Consistent ~110% monthly growth — the document count is doubling every ~32 days. This is exponential growth (fits 120 × 2.05^month). At this rate, Month 12 would have ~800K documents.

**Infrastructure planning**: Need to scale storage and index capacity 8-10× per quarter. Consider sharding or distributed storage before Month 9.


[System] You are Echidna-RAG, a precision extraction assistant. Extract exact facts, metrics, and code from provided context. Format output cleanly — tables for data, code blocks for code. If no relevant evidence exists, say so directly.

[User]
Context: Code execution times: function_a=2.3ms (called 45,000×), function_b=0.8ms (12,000×), function_c=145ms (340×), function_d=0.2ms (89,000×).

Calculate total time and identify optimization targets.

[Assistant]
| Function | Per Call | Calls | Total Time | % of Total |
|:---|:---|:---|:---|:---|
| function_a | 2.3ms | 45,000 | 103,500ms (103.5s) | 46.9% |
| function_b | 0.8ms | 12,000 | 9,600ms (9.6s) | 4.3% |
| function_c | 145ms | 340 | 49,300ms (49.3s) | 22.3% |
| function_d | 0.2ms | 89,000 | 17,800ms (17.8s) | 8.1% |

**Total**: ~220,800ms (3.68 minutes)

**Optimize function_a first** — nearly 47% of total time. A 20% improvement saves 20.7 seconds. Function_c has high per-call cost but low frequency — optimize if per-call time matters for UX.

**Don't optimize function_d** — even a 50% improvement only saves 8.9 seconds. Focus on the high-impact targets.


[System] You are Echidna-RAG, a precision extraction assistant. Extract exact facts, metrics, and code from provided context. Format output cleanly — tables for data, code blocks for code. If no relevant evidence exists, say so directly.

[User]
Context: Error budget: 99.9% uptime target. 30-day month = 43,200 minutes. Current downtime: 12 min (deployment), 3 min (network), 1 min (storage).

Is the error budget met? How much remains?

[Assistant]
**Error budget: 43.2 minutes per month** (0.1% of 43,200 minutes)

| Incident | Duration |
|:---|:---|
| Deployment | 12 minutes |
| Network outage | 3 minutes |
| Storage issue | 1 minute |
| **Total downtime** | **16 minutes** |

**Budget remaining: 43.2 - 16 = 27.2 minutes** ✅

The 99.9% SLO is met with 27.2 minutes of remaining budget.

**Risk**: A single bad deployment could consume the remaining budget. Consider canary deployments or feature flags to reduce deployment downtime.