Mock interview · System design · Free
AI Architect System Design Mock Interview
Practise the kind of question AI architect and senior AI engineer interviews are built around: design an enterprise assistant that answers questions and takes actions in a business system. Write your design, then reveal a reference architecture and score yourself out of 10 with a clear rubric.
1. Read the brief
Note the scale, the data and which actions change records.
2. Write your design
Give yourself about 45 minutes, as in a real interview.
3. Compare and score
Reveal the reference, then score each area from 0 to 2.
The brief
Design an enterprise HR assistant for a company with 100,000 employees. Employees chat with it to ask HR policy questions, check their leave balance and submit leave requests. Leave balances and requests live in Workday.
Functional requirements
- Answer HR policy questions (leave, benefits, travel, working hours) from the company's own policy documents, which differ by country.
- Show an employee their own leave balances from Workday.
- Submit a leave request to Workday on the employee's behalf, after the employee confirms the details.
- Work in the tools employees already use, such as the intranet and the company chat app, with single sign-on.
- Hand over to a human HR adviser when the assistant can't answer or the employee asks for one.
Constraints to design for
- 100,000 employees in several countries; usage peaks on Monday mornings and before public holidays.
- HR data is confidential: an employee must only ever see or change their own records.
- Every write to Workday must be traceable for HR and audit teams.
- Workday has API rate limits and occasional downtime.
Your design
Write your answer as you would talk it through in the interview: requirements and assumptions, components, how a leave request flows end to end, security, failure handling and how you would evaluate it. Aim for about 45 minutes.
0 words · Saved only in this browser. Your design is never sent anywhere.
Reference architecture
One strong answer, not the only one. Compare the parts and the reasoning with your design.
Channels
Employee
Intranet widget and company chat app
Identity
Single sign-on
Corporate identity provider with MFA. Passes a verified employee ID, country and groups.
Orchestration
Agent orchestrator
LLM with a fixed set of tools, conversation state and routing to HR handover
Guardrails
Input and output checks, PII redaction, prompt-injection filters
Knowledge and tools
Policy retrieval
Search over HR policies, filtered by country, employment type and version, with citations
Workday tool service
Get balance, validate and submit leave. Employee ID from the session, confirmation token, idempotency keys
Workday
System of record for balances and leave requests
Observability and audit (across every layer)
Traces and metrics
One trace ID per turn across chat, retrieval and tool calls; latency, cost and error dashboards
Audit log
Append-only record of every Workday write
Key decisions, explained
How access is authorised
- Employees sign in through the corporate identity provider (single sign-on with MFA). The orchestrator receives a verified identity: employee ID, country, employment type and groups.
- The Workday tool service takes the employee ID from that verified session, never from the model's output, so a prompt like "show Priya's balance" can't reach another person's record.
- Workday calls use credentials scoped as narrowly as Workday allows, and the tool service checks every request against the session's employee before calling it.
- Policy retrieval is filtered by the employee's country and employment type, so answers come from the policies that apply to them.
How leave submissions are confirmed
- The agent drafts the request and calls a validate step that checks dates, leave type and balance in Workday, then shows a structured summary: type, dates, hours and the balance afterwards.
- The employee confirms with a button, not by typing "yes". The server issues a short-lived confirmation token tied to that exact payload, and the submit tool accepts only a matching token.
- If anything changes after the summary is shown, a new confirmation is needed.
How duplicate requests are prevented
- Each confirmed request gets an idempotency key (the confirmation ID). The tool service stores the key with the outcome, so a retry or a double click returns the first result instead of submitting again.
- Before submitting, the service checks Workday for existing requests that overlap the same dates.
- The confirm button is disabled once pressed, and the conversation shows the submitted request's status.
How downstream failures are handled
- Every Workday call has a timeout. Reads are retried with exponential backoff and jitter; writes are retried only with the same idempotency key.
- If a submit times out and the outcome is unknown, the service looks the request up in Workday before telling the employee anything. The employee sees "submitted", "not submitted" or "we're checking", never a guess.
- A circuit breaker stops calls while Workday is failing. Policy answers keep working, and leave actions point to Workday self-service until it recovers.
- Rate limits are respected with a queue and per-user limits, and policy retrieval results can be cached because policies change rarely.
How write operations are audited
- Every write produces an append-only audit record: employee ID, action, payload hash, confirmation ID, idempotency key, Workday transaction ID, outcome, time, and the model and prompt versions used.
- Audit records are access-controlled and kept for the period HR policy requires. They store what was done, not the full chat, to keep personal data to a minimum.
- Each conversation turn has a trace ID that links the chat, the tool calls and the audit record for investigations.
How quality is evaluated
- A golden set of policy questions per country, with expected answers and source documents, runs on every prompt, model or index change. Releases are blocked if groundedness or accuracy drops.
- Tool calls are tested end to end against a Workday sandbox, including double submits, overlapping dates and timeouts.
- Red-team tests try prompt injection, such as instructions hidden in a document or requests to act for a colleague.
- In production, track answer ratings, escalations to HR, failed or duplicate submissions, p95 latency and cost per conversation.
Score your design out of 10
For each area, pick the description that best matches what you wrote. Be strict: an interviewer would be.
Your score: 0 / 10(5 area(s) left to score)