Case Study: Design an Ask-the-Web Agent
A full AI-engineering interview answer for a Perplexity-style search-and-synthesis agent: query rewriting, parallel fetch, dedupe and rerank, freshness, citation faithfulness, prompt-injection defense against untrusted pages, and a worked cost/latency budget
Model interview answer for designing a Perplexity-style 'ask the web' agent: query understanding and rewriting, routing by query type, a search API call, parallel fetch and readability extraction of source pages, dedupe and rerank of retrieved sources, a freshness/staleness gate, a cite-grounded streaming synthesis step, citation faithfulness evaluation, prompt-injection defense specific to untrusted web content, and a worked numeric cost/latency budget showing why the fetch step must be parallelized to hit a real end-to-end target.