System Design for FDEs
How to design AI deployments that run inside a customer's environment, with the trade-offs interviewers expect you to name.
Start by confirming what 'outside the network' includes, since it decides whether any hosted model API is allowed. Likely answer: a self-hosted or private-cloud model, an on-premise vector store, an ingestion pipeline that respects document-level permissions, and an audit log of every query. Cover access control first, because retrieval must never return a document the asking user cannot already open. Close with how you would evaluate answer quality on the bank's own documents.
Use incremental syncs with a high-water mark such as last-modified time instead of full reloads. Make each run idempotent so a retry never creates duplicates, store raw data before transforming it, and log row counts at every stage. Add alerting for failed runs and for sudden drops in volume, because a silent empty sync is the most common production failure.
Isolate at every layer: tenant identifiers enforced in the database, separate vector namespaces or indexes per tenant, and per-tenant encryption keys where contracts require it. Never rely on prompt instructions to keep data apart. Test isolation explicitly by writing automated checks that query as tenant A and assert nothing from tenant B ever returns.
Treat identity resolution as its own project. Profile each source, choose the most reliable keys such as email or tax ID, and build deterministic matches first, then fuzzy matching with a human review queue for uncertain pairs. Keep a mapping table with the confidence and source of each match, so results can be corrected without rebuilding everything.
Hosted APIs give better quality and less operational work, but they require the customer to accept data leaving their boundary. Self-hosting gives control and compliance at the cost of GPU capacity, upgrades and usually lower quality. Decide from the customer's data policy first, then from latency, cost and the accuracy you measure on their own test set.
Break spend down by feature, prompt and customer to find the largest source. Typical fixes are shorter prompts, caching repeated calls, routing simple requests to a smaller model, limiting retrieved context, and setting per-user rate limits. Re-run your evaluation set after each change so cost savings do not quietly reduce quality.
When the logic is stable, the inputs are structured and errors are expensive. Rules are cheaper, faster and easier to explain. A good approach is rules first for the clear cases and a model only for the ambiguous remainder, with the rules acting as a safety net.
Track four things: system health such as latency and error rate, cost per request, output quality through sampled human review or automated evaluators, and user signals such as thumbs-down or edits. Store prompts, retrieved context and outputs with a trace ID so any bad answer can be reproduced. Alert on changes in trends, not only on outages.
Roll out in stages: an internal pilot, then one department, then wider groups, with clear success criteria at each gate. Train users on what the tool can and cannot do, provide a visible feedback button, and agree on a rollback plan in advance. Name an owner on the customer side who will keep the system alive after you leave.
Minimise what you send: strip or mask identifiers before they reach the model whenever the task allows. Apply role-based access to logs, set retention limits and encrypt data at rest. Confirm the model provider's data-handling terms in writing and record which fields are considered sensitive in your design doc.
Everything must be packaged and shipped in: model weights, containers, dependencies and documentation, all verified by checksum. Plan updates as a controlled process because you cannot pull from the internet. Build in local logging and a diagnostics bundle the customer can export and send to you, since you cannot connect remotely to debug.
Let the agent propose an action with its reasoning and the data it used, then require approval above a value threshold or for unusual cases. Log every proposal, decision and reason. Start with approval on everything, then relax thresholds as measured accuracy supports it.