AI Engineer Interview Guide — Architecture

Auto-generated from architecture/workspace.dsl on every push to main. Built: 2026-05-11 19:03 UTC.

C4 Views

Components ApiBackend

graph LR linkStyle default fill:#ffffff subgraph diagram ["Components — API Backend"] style diagram fill:#ffffff,stroke:#ffffff 10("
Stihia Guardrails
[Software System]
Real-time AI threat
detection. Analyses user
messages for prompt
injection, toxic content,
sensitive data exposure, and
other threats before they
reach the LLM.
") click 10 https://api.stihia.ai "https://api.stihia.ai" style 10 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff 11("
NVIDIA NIM
[Software System]
Hosted LLM inference API
serving
nvidia/nemotron-mini-4b-instruct.
Responses are returned as a
Server-Sent Events stream.
") click 11 https://integrate.api.nvidia.com "https://integrate.api.nvidia.com" style 11 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff subgraph 2 ["AI Interview Guide"] style 2 fill:#ffffff,stroke:#0b4884,color:#0b4884 subgraph 4 ["API Backend"] style 4 fill:#ffffff,stroke:#2e6295,color:#2e6295 5("
SessionFunction
[Component: Azure Function — POST /api/session]
Accepts the NVIDIA NIM API
key from the browser, stores
it in the memory cache keyed
by a generated sessionId
(30-min sliding expiry), and
returns the sessionId.
") style 5 fill:#85bbf0,stroke:#5d82a8,color:#000000 6("
ChatFunction
[Component: Azure Function — POST /api/chat]
Resolves the caller's NVIDIA
API key from cache, invokes
the guardrail check, builds
the system prompt
server-side, calls NVIDIA
NIM, and forwards the SSE
stream to the browser.
") style 6 fill:#85bbf0,stroke:#5d82a8,color:#000000 7("
StihiaService
[Component: C# Singleton — HttpClient]
Calls Stihia /v1/sense with
the latest user message.
Returns allowed/blocked with
severity. Fails open on
outage. Skipped when
DISABLE_GUARDRAILS=true.
") style 7 fill:#85bbf0,stroke:#5d82a8,color:#000000 8("
TopicData
[Component: C# Static Class]
Static registry of all 8
interview topics and their
concepts, sample questions,
and server-side system prompt
builder. Clients send only a
numeric topicId.
") style 8 fill:#85bbf0,stroke:#5d82a8,color:#000000 9[("
Session Cache
[Component: IMemoryCache (.NET)]
In-process memory cache
mapping sessionId → NVIDIA
NIM API key with a 30-minute
sliding expiration. API key
never leaves the backend
after the initial session
call.
")] style 9 fill:#85bbf0,stroke:#5d82a8,color:#000000 end 3["
Frontend SPA
[Container: React 18 + Vite / Azure Static Web Apps]
Single-page application
serving topic study material
and the AI chat practice
interface. Manages session
state and streams AI
responses token by token.
"] style 3 fill:#438dd5,stroke:#2e6295,color:#ffffff end 3-. "
POST /api/session — submits
NVIDIA API key once [HTTPS]
" .->5 3-. "
POST /api/chat — sends
sessionId + topicId +
messages [HTTPS + SSE]
" .->6 5-. "
Stores apiKey → sessionId
mapping
" .->9 6-. "
Resolves NVIDIA API key by
sessionId
" .->9 6-. "
Checks last user message
before calling NIM
" .->7 6-. "
Builds system prompt for
topicId
" .->8 6-. "
POST /v1/chat/completions
[HTTPS + SSE]
" .->11 7-. "
POST /v1/sense [HTTPS]
" .->10 end

Containers

graph LR linkStyle default fill:#ffffff subgraph diagram ["Containers — AI Engineer Interview Guide"] style diagram fill:#ffffff,stroke:#ffffff 1["
Candidate
[Person]
An engineer preparing for AI
engineering job interviews.
"] style 1 fill:#08427b,stroke:#052e56,color:#ffffff 10("
Stihia Guardrails
[Software System]
Real-time AI threat
detection. Analyses user
messages for prompt
injection, toxic content,
sensitive data exposure, and
other threats before they
reach the LLM.
") click 10 https://api.stihia.ai "https://api.stihia.ai" style 10 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff 11("
NVIDIA NIM
[Software System]
Hosted LLM inference API
serving
nvidia/nemotron-mini-4b-instruct.
Responses are returned as a
Server-Sent Events stream.
") click 11 https://integrate.api.nvidia.com "https://integrate.api.nvidia.com" style 11 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff subgraph 2 ["AI Interview Guide"] style 2 fill:#ffffff,stroke:#0b4884,color:#0b4884 3["
Frontend SPA
[Container: React 18 + Vite / Azure Static Web Apps]
Single-page application
serving topic study material
and the AI chat practice
interface. Manages session
state and streams AI
responses token by token.
"] style 3 fill:#438dd5,stroke:#2e6295,color:#ffffff 4["
API Backend
[Container: .NET 8 Isolated Worker / Azure Functions]
Handles session management,
guardrail enforcement,
server-side prompt
construction, and LLM
proxying with SSE streaming.
"] style 4 fill:#438dd5,stroke:#2e6295,color:#ffffff end 1-. "
Opens in browser, enters NIM
API key, chats with AI
interviewer
" .->3 3-. "
POST /api/session · POST
/api/chat [HTTPS / SSE]
" .->4 4-. "
POST /v1/sense — per-message
guardrail check [HTTPS]
" .->10 4-. "
POST /v1/chat/completions —
LLM inference [HTTPS + SSE]
" .->11 end

SystemContext

graph LR linkStyle default fill:#ffffff subgraph diagram ["System Context — AI Engineer Interview Guide"] style diagram fill:#ffffff,stroke:#ffffff 1["
Candidate
[Person]
An engineer preparing for AI
engineering job interviews.
"] style 1 fill:#08427b,stroke:#052e56,color:#ffffff 10("
Stihia Guardrails
[Software System]
Real-time AI threat
detection. Analyses user
messages for prompt
injection, toxic content,
sensitive data exposure, and
other threats before they
reach the LLM.
") click 10 https://api.stihia.ai "https://api.stihia.ai" style 10 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff 11("
NVIDIA NIM
[Software System]
Hosted LLM inference API
serving
nvidia/nemotron-mini-4b-instruct.
Responses are returned as a
Server-Sent Events stream.
") click 11 https://integrate.api.nvidia.com "https://integrate.api.nvidia.com" style 11 fill:#6b6b6b,stroke:#4a4a4a,color:#ffffff 2("
AI Interview Guide
[Software System]
Interactive study and
AI-powered interview practice
tool covering 8 core AI
engineering topics.
") style 2 fill:#1168bd,stroke:#0b4884,color:#ffffff 1-. "
Studies AI engineering topics
and practises interview
questions
" .->2 2-. "
Checks every user message for
threats [HTTPS]
" .->10 2-. "
Streams LLM inference
responses [HTTPS + SSE]
" .->11 end

Architecture Decision Records