Skip to content
N Divij
Résumé
← All work

Case study · 2025 · Google Cloud AI Accelerate

EverydayElastic

During an incident, on-call engineers lose time hunting through runbooks, past tickets and policies. EverydayElastic answers plain-English questions over 7,800+ documents with cited sources, in 2–3 seconds end to end. When the results show a Sev-1 or Sev-2 incident, it offers a one-click Slack war-room alert with severity, owner and status filled in.

Result
1st place, Elastic Challenge Proof ↗
Built
2025, for Google Cloud AI Accelerate
Stack
FastAPI · Elasticsearch 8.15 · Vertex AI (Gemini 2.5 Flash Lite) · Next.js 15 · Slack Block Kit · OpenTelemetry + Prometheus · Cloud Run
The hackathon demo. It loads only when you press play.

The problem

Incident knowledge is scattered across runbooks, tickets, policies and docs, and switching between systems slows response when speed matters most. An answer only helps an on-call engineer if they can see which document it came from. So the copilot has to retrieve well, cite what it used, and stay fast.

How it works

  1. 01Read the query. Detects incident, policy or runbook context and applies matching filters.
  2. 02Hybrid retrieval. One Elasticsearch query combines BM25 keywords with semantic vectors; top 8 hits.
  3. 03Rerank. Vertex AI reranks the hits; the top 4 become the context.
  4. 04Grounded answer. Gemini 2.5 Flash Lite answers at temperature 0.3, citing retrieved documents.
  5. 05Suggest action. Sev-1 or Sev-2 results offer a one-click Slack Block Kit alert.

Key decisions

Hybrid search, then rerank

I combined BM25 keyword matching and semantic vectors in a single Elasticsearch query, then passed the hits through Vertex AI reranking. Only the top 4 documents reach the model, and very long ones are truncated to stay inside the context budget.

Latency cut from 5–6 s to 2–3 s

My first version took 5–6 seconds per query. I cut search results from 20 to 8, made the backend async end to end, and switched to Gemini 2.5 Flash Lite.

Citations checked against sources

Early versions sometimes cited sources that were never retrieved. I tightened the system prompt, lowered temperature to 0.3, and validated every returned citation against the documents actually retrieved.

Observability from day one

The backend exposes Prometheus metrics for request latency and search sources, and exports OpenTelemetry traces of the Gemini and Elasticsearch calls into Elastic APM. Slack alerts use the OAuth Web API and fall back to a webhook if it fails.

Results

  • 1stElastic Challenge, AI Accelerate hackathon
  • 7,800+documents indexed for hybrid search
  • 2–3 squery to cited answer, down from 5–6 s
  • 400–800 msElasticsearch query, including embedding and reranking

What's not done yet

Responses are not streamed yet. The copilot suggests actions but does not take them: creating tickets or updating status through function calling is still on the roadmap. Context is capped at the top 4 documents.

Next case studyParallax →Reads a PDF five ways and treats the disagreements as evidence of hidden text.