Opend
← All company guides

Free interview prep

Get ready for
Sarvam AI.

Inference · evaluation · data systems

Sarvam AI · Opend practice case · Updated

Why does a fast model make some readers wait two seconds?

Design a streaming chat service with a target of one second to the first visible token. A burst of long documents arrives alongside short chat prompts. Average throughput looks healthy. Users sending short prompts report that the screen stays blank.

Short answerMeasure queue wait, prefill and decode separately. Tune admission and batching against first-token latency, inter-token gaps and completed requests under the same traffic mix.

One slow request, from arrival to first visible token
  • Wait · 1,400 ms

    The request sits behind already admitted work.

  • Prefill · 450 ms

    The model processes the prompt before producing output.

  • First output · 150 ms

    First decode and transport bring this example to 2,000 ms.

Define the clock the reader experiences

Record request arrival, admission, first visible content and final content. The first network event can contain metadata, so define which event ends the first-token clock. A stream can start promptly and still pause midway. Measure inter-token delays as well as completion time. Sarvam’s chat API supplies the product context for this exercise. The timing trace is illustrative and describes a hypothetical service.

Sarvam chat completions API ↗

Choose the lever that can meet the target

In the illustrated request, even eliminating all 450 ms of prefill leaves 1,550 ms. Start with admission and queueing. Try reserving a bounded share of capacity for short interactive traffic, with aging so longer requests still progress. Also compare chunked prefill settings. In vLLM the token budget changes the tradeoff between feeding new requests and continuing decode work. This is an example serving engine for the exercise.

vLLM optimization and chunked prefill ↗

Make the benchmark difficult to game

Replay the same arrival times, prompt lengths and output limits. Report p95 first-token time by length bucket alongside p95 inter-token gap, rejection rate and completed tokens per second. Include the long-document bucket in the acceptance criterion. A policy that drops every expensive request can make latency look excellent while completing less user work. Measure the percentiles on individual requests rather than adding component percentiles.

Illustrative first-token budget for this one request
ChangeTime savedNew first token
Halve prefill225 ms1,775 ms
Reduce wait to 300 ms1,100 ms900 ms
Double decode speed onlyAt most 75 ms hereAt least 1,925 ms
Try the follow-upYour shorter queue improves p95 but doubles rejected chats. Did the change succeed?

Count rejections against the service objective and evaluate how many offered requests complete within budget. Then compare the same offered load. If interactive traffic genuinely needs reserved capacity, specify who can use spare capacity and how quickly the reservation can be reclaimed.

Interview rounds & focus areas

Sarvam's careers page spans model, API and infrastructure work. Pick the track in your actual job description. These practice categories are not a verified company interview loop.

  1. PREP FOCUS 01

    Coding & problem solving

    Practice a small, testable solution. Explain data structures, complexity and edge cases aloud.

  2. PREP FOCUS 02

    LLD / HLD

    Explain inference latency, batching, queue capacity and evaluation quality without hiding failure modes behind model names.

  3. PREP FOCUS 03

    Practical systems & work discussion

    Walk through one project you shipped: the constraint, your decision, a failure, and the result you can substantiate.

More practice questions

Try each Opend practice question before opening its hints.

How would you reduce tail latency in a model-serving API?ML / system design · Open solution hints
  1. Measure queue delay separately from token generation and network time.
  2. Compare batch size, throughput and latency under realistic request lengths.
  3. Bound queues, apply backpressure and describe safe fallbacks when capacity is exhausted.
How would you evaluate a multilingual model change?ML / evaluation · Open solution hints
  1. Build language- and task-stratified test sets with clear label provenance.
  2. Track regressions by language, domain and input length; an aggregate score can hide harm.
  3. Define deployment gates and review ambiguous cases with appropriate language expertise.
What makes a training data pipeline reproducible?Practical systems · Open solution hints
  1. Version input manifests, transformations and output checksums.
  2. Make processing resumable and deterministic where possible. Record exclusions and deduplication rules.
  3. Keep a small golden dataset to catch changes before a large run.

Live open roles at Sarvam AI

Employer sources checked within seven days. This catalogue covers India and worldwide remote engineering openings; confirm location and availability on the employer’s site.

View live roles & check your fit →

Get a free personal fit check →