Tag: Agents

  • ML0170 Value vs Policy Iteration

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0148 Governed Portfolio-Rebalancing Agent

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0131 Coding-Agent Execution Sandbox

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0128 Durable Execution for Long-Running Agents

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0096 Prompt Injection Agent Defense

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0094 Incident Investigation Agent

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0090 Realtime Voice Agent

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0089 Generative AV Simulation

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0083 ML Platform Design

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0078 AV Behavior Prediction

    Design the behavior prediction module for an autonomous vehicle. Given the ego vehicle’s sensor history (multi-camera, LiDAR, radar) and HD map, predict trajectories for every surrounding agent (vehicles, cyclists, pedestrians) 3 to 8 seconds into the future.

    The planner consumes these predictions at a fixed 10Hz cadence with a hard 50ms compute budget on the vehicle’s chip. It needs uncertainty, not just a point estimate: per-step covariance or a small set of discrete modes (go straight, turn left, yield). A missed rare maneuver (sudden lane change, jaywalker) is far worse than a slightly off average trajectory.

    How would you design this system? Cover the scene representation (vectorized agents/lanes vs rasterized BEV), the prediction model architecture (how multimodality is expressed: anchors, diffusion, discrete modes), the uncertainty contract with the planner’s cost function, joint-vs-marginal prediction (agents interact), how you evaluate beyond average displacement error (miss rate on safety-critical maneuvers, calibration of the modes), and the on-vehicle latency budget split against the rest of the stack.

    Line-art intersection scene: the ego car approaches a crosswalk while an oncoming car, a crossing car, a cyclist, and a pedestrian at the curb each carry a question mark; side panels state the 10 Hz planner cadence, the 50 ms compute budget, the 3 to 8 s horizon, and that a missed jaywalker costs more than drift

    The Problem: four road users around one intersection each have several plausible futures (marked ?), and all of them must be forecast 3 to 8 s ahead for a planner that reads every 100 ms, inside a 50 ms compute slice.

    Answer

    The design is a vectorized, query-centric transformer: every tracked agent and lane segment becomes a token, local attention encodes the scene, and a decoder emits a handful of intention-anchored modes per agent. Each mode is a full 8 s trajectory with a per-step Gaussian covariance and a calibrated probability. Interaction is handled in two tiers, with marginal modes for every agent plus scene-level joint modes for the few groups whose futures actually conflict. The pivotal decisions are the planner contract (calibrated probabilities, honest covariance, a hard deadline with a stale-output fallback) and an evaluation regime gated on miss rate and calibration over safety-critical slices rather than average displacement error. Caching static map encodings and keeping attention local is what fits the nominal path into 40 ms of the 50 ms budget.

    (1) Vectorized Query-Centric Scene: agents and lane, crosswalk, and stop-line polylines become tokens in their own local frames, so static map tokens are encoded once per tile and reused every cycle.
    (2) Local Factorized Encoder: attention over time, agent-to-map, and agent-to-agent is restricted to each token’s 64 nearest neighbors, keeping cost linear in scene size.
    (3) Intention-Anchored Decoder: 64 learned endpoint anchors per agent type emit Gaussian trajectories, and endpoint NMS keeps 6 diverse modes instead of the 6 most probable near-duplicates.
    (4) Marginal Plus Joint: marginal modes for every agent, joint scene-level modes only for groups whose futures conflict, optionally conditioned on the planner’s candidate ego plans.
    (5) Calibrated Planner Contract: per-mode probability and per-step covariance with stated calibration guarantees, published every 100 ms with a deadline watchdog and physics fallback.
    (6) Rare-Maneuver Data Engine: mine and upweight cut-ins, jaywalks, and U-turns, and gate every release on miss rate for those slices.

    Behavior prediction pipeline: tracks and HD map become scene tokens, a local-attention encoder and an anchored mode decoder feed joint re-scoring, which publishes the planner contract to the 10 Hz planner; offline, fleet logs feed rare-maneuver mining and shadow-gated training that pushes new weights to the encoder

    Figure 1: The online path (scene tokens, local-attention encoder, anchored decoder, joint re-scoring) publishes the planner contract every 100 ms; offline, logged outcomes feed rare-maneuver mining and shadow-gated retraining.

    Clarify Before Designing:
    (1) Scene Density & Range: how many agents does the densest scene hold, and out to what range (80 m urban versus 200 m highway)?
    (2) Planner Interface: does the planner consume one unconditional prediction set, or query predictions conditioned on its own candidate plans, and does it want modes or an occupancy grid?
    (3) Compute Sharing: is the 50 ms on a dedicated accelerator partition or shared with perception, and does the chip run int8 transformers efficiently?
    (4) Input Quality: tracked boxes only or also BEV sensor features, and how often do tracks switch IDs or drop occluded pedestrians?
    (5) Safety Bar: which maneuver slices gate release at what miss rate, and how much over-caution (phantom braking) is acceptable in exchange?
    (6) Data Supply: how many hours of fleet logs exist, and how many rare maneuvers arrive per month?


    Login to view more content