Sierra interview questions
AI startup · 2 questions reported
- junior 0
- mid 2
- senior 0
These are 2 technical questions candidates reported being asked in Sierra interviews for AI engineer, ML engineer and applied AI engineer roles, each with a model answer you can say out loud in a minute or two. They cover latency & throughput and context selection: 0 junior, 2 mid-level and 0 senior questions. Every question comes from a public interview write-up that names Sierra.Updated
Sierra latency, throughput and goodput questions
Model answer
Assume the provider will be slow, down or wrong. Set timeouts on time to first token, retry with backoff and jitter only on safe errors, and use a circuit breaker to fail over to another provider or smaller model. Validate each output against a schema and policy checks before showing it; on failure, retry once, then use a scripted reply or human handoff. Keep state server-side so failover resumes cleanly.
Sierra selecting, ordering and compressing context questions
Model answer
def load_history(fetch_page):
msgs, cursor = [], None
while True:
page = fetch_page(cursor)
msgs.extend(page["messages"])
cursor = page.get("next_cursor")
if not cursor:
return msgs
def compact(msgs, limit, count, summarize, keep=6):
if sum(count(m) for m in msgs) <= limit:
return msgs
while True:
cut = max(len(msgs) - keep, 0)
note = {"role": "system",
"content": summarize(msgs[:cut])}
out = [note] + msgs[cut:]
if sum(count(m) for m in out) <= limit:
return out
if keep == 0:
raise ValueError("summary exceeds limit")
keep //= 2
Follow the cursor until none comes back, retrying failed pages. Compact only when over the limit: summarise older turns into one note, keep the recent turns verbatim, and halve that window if it still doesn't fit. Count with the model's own tokenizer, and never separate a tool call from its result.
Scroll sideways to see the whole diagram
An illustrative long conversation. The most important sentence is the first one.
Text version
- An illustrative long conversation. The most important sentence is the first one.
- Dropping the oldest turns is simple and common. It assumes early turns matter least, which is wrong exactly here.
- Truncating to fit a smaller model's limit keeps one end and silently discards the other.
- A summary keeps more, but it is another model call, and what it leaves out is decided by a model you haven't checked.
- Each method throws something away. Decide what must survive, and test with cases that depend on it.
After AI Engineering Ch. 6, "Memory" and Ch. 10, "Step 3. Add Model Router and Gateway" > "Router". Example text is illustrative, not a model output.
Each question comes from a public interview write-up or video that names Sierra; the answers are ours. Not affiliated with Sierra.