SC
Scale AI

Staff AI Evaluation & Adversarial Red-Teaming Engineer • $360K – $700K TC

Agentic Evals & Red-TeamingWith-AI Coding Allowed

Codebase 4: Agentic AI, MCP Safety, Concurrency & CI Evals

Inspect a multi-tenant AI Support Agent & MCP Tool Dispatcher. Reproduce real OpenAI/Anthropic interview failure patterns: (1) unbounded `while True` loops, (2) indirect prompt injection inside ticket notes triggering unauthorized SQL & refunds without Human-in-the-Loop, (3) non-atomic multi-tenant quota race conditions, and (4) skipped CI eval gates.

System Design Perspective

CI Evals, Judge Calibration & Safety

Before You Start (Scale AI)

Inspect `eval_gate.py` and `mcp_server_mock.py` in Codebase 4 to design real Golden Dataset CI gates blocking indirect prompt injections.

Download & Run LocallyDownload .zip
Runtime: Python 3.9+ (Pure stdlib — zero pip install required)
unzip agentic-mcp-ops.zip
cd agentic-mcp-ops
python quota_limiter.py
python agent_loop.py
# Open http://localhost:8200 and click Run Agent Trace & Quota Race Probe!
# BUG: Non-atomic check-then-update across concurrent threads!
def consume_tokens_racy(tenant: str, tokens: int) -> bool:
    current = TENANT_USAGE.get(tenant, 0)
    if current + tokens > TENANT_LIMIT:
        return False
    time.sleep(0.02)  # Yield between check & commit -> 4 threads bypass limit!
    TENANT_USAGE[tenant] = current + tokens