# William Gervasio > AI engineer at Microsoft AI. Co-owns model behavior for Consumer Copilot (100M monthly users), architected the agent-execution layer of Copilot Tasks, and cut $2M+ a month in inference spend. Previously led Instacart’s receipt-matching platform across 86% of orders, saving $3M+ a month. Co-owner of AI model behavior and architect of agent-execution systems at Microsoft; lead engineer for Instacart’s receipt-matching platform. Delivering multimillion-dollar monthly impact at each company, affecting nearly every user on each platform. ## At a glance - One of seven owners of model behavior for Consumer Copilot, a consumer AI product with 100M monthly users. Approves evaluation strategies and mentors senior engineers on agentic features. - Architected the response layer of Copilot Tasks, Microsoft’s priority consumer agentic product: system instructions, tool results, context management, and caching. It reached 200k daily users in under a month with 40% week-over-week retention. - Redesigned agent context management, eliminating $2M+ a month in inference spend. - Built the chat-to-Tasks handoff that carried about 70% of Copilot Tasks usage, and one of the lead engineers behind the first unified Copilot app demo. - Led Instacart’s receipt-matching platform across 86% of all orders, saving $3M+ a month; took over after the project had been cancelled and raised recall from 40% to 90% at 98% precision. - Top graduating computer science student award in leadership at the University of British Columbia. ## Roles and expertise - Roles: AI Engineer, Software Engineer, Machine Learning Engineer, Applied AI Engineer - Expertise: Agentic AI, AI agents, LLM engineering, Context engineering, Prompt engineering, LLM evaluation, Tool use and connectors, Browser and computer-use agents, Inference cost optimization, Applied machine learning, Microsoft Copilot - Previously: Instacart, BC Cancer Research Centre, BlackBerry, Simba Technologies ## Profile - Current role: Member of Technical Staff, Microsoft AI - Location: San Francisco Bay Area - Education: B.Sc. Computer Science, University of British Columbia - Awards: Top graduating computer science student award in leadership, University of British Columbia; Martin Frauendorf Memorial Prize in Computer Science, University of British Columbia - Contact: will@gervasio.ca ## Links - [Case studies](https://gervasio.ca/): interactive walkthroughs of systems William built - [Résumé](https://gervasio.ca/resume.pdf): experience, education, and skills - [Projects](https://gervasio.ca/projects): independent software projects - [Writing](https://gervasio.ca/writing/): posts on engineering, hiring, and early careers - [LinkedIn](https://www.linkedin.com/in/wgervasio) - [GitHub](https://github.com/wgervasio) ## Experience ### Microsoft AI: Member of Technical Staff (2025–present) I owned the Copilot Tasks response layer, covering system instructions, tool results, context management, and caching, and co-owned its system prompts. Within that layer, my context-management redesign eliminated $2M+ in monthly inference spend for Tasks. I defined planning and tool-use behavior, built connector authorization, and specified skill and output requirements for container-side connectors. - Co-owned Consumer Copilot’s model features as one of seven owners. Serving 100M monthly active users. - Architected Copilot Tasks’ response layer. Redesigned context management to eliminate $2M+ in monthly inference spend. - Under 1 year to promotion at Microsoft - ~70% of Copilot Tasks usage entered through the chat handoff I built - 40% Copilot Tasks week-over-week retention - Copilot Tasks reached 200k daily active users in under a month. Youngest career hire on Microsoft AI’s core teams. Approved evaluation strategies and mentored senior engineers on agentic features. One of three owners of Copilot Tasks’ main system prompt, tools, and skills. Its response layer covered system instructions, tool results, context management, and caching. The task-execution agent was later folded into Copilot Cowork for consumers. One of the lead engineers behind the first unified Copilot app (https://www.geekwire.com/2026/microsoft-starts-merging-its-copilot-consumer-and-business-apps-in-advance-of-super-app-rollout/) demo. Built and maintained it to secure backing from Microsoft’s executive vice presidents. The full product involved thousands of engineers across Bing, Microsoft AI Copilot, and Microsoft 365 Copilot. #### Deep dive: Copilot task planning and execution A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#ai). 1. [Consumer Copilot] Start with an accessibility question: A user asks what an accessibility review should cover. Copilot shows visual examples of keyboard navigation, focus indicators, and form labels. I co-owned the core instructions for image answers and suggested follow-ups. 2. [Consumer Copilot] Turn the advice into work: The follow-up asks Copilot to apply those checks: read the project notes, update the checklist, and draft the team email. I built the chat-to-Tasks handoff for multi-step work like this. It accounted for about 70% of Tasks usage. 3. [Copilot Tasks · Response layer] Skills and available tools: The request needs connected-file access and writing capabilities. I integrated the shared skill system and defined selection before planning, loading the required tools and procedures before the model committed to a plan. 4. [Copilot Tasks · Response layer] System prompts and task planning: The loaded capabilities let the model plan file access, a checklist update, and an email draft. I defined the system-prompt rules behind planning and owned the instructions for every Copilot Tasks tool; the planning tool I integrated exposes progress during execution. 5. [Copilot Tasks · Response layer] Connector consent and authorization: The file-reading step needs permission to access the project notes. I defined structured consent-card schemas and built checks for Google Workspace, OneDrive, Outlook, and other services to obtain the access required for an operation. 6. [Copilot Tasks · Response layer] Container-side file access: With access granted, code runs in an isolated workspace called an agent container to read the project notes. I defined connector-skill requirements and output rules through implementation reviews, distinguishing routine lookup results from requests to create documents. 7. [Copilot Tasks · Response layer] Connected data and instruction boundaries: The returned notes supply the checklist content. I defined system-prompt rules requiring confirmation before following instructions embedded in files or web pages, so their contents cannot authorize new actions such as forwarding private data. 8. [Copilot Tasks · Response layer] Batched browser actions: The notes are applied through the browser because this portal has no editing connector. I changed the browser-tool implementation and action-selection behavior to reduce inference calls: the model chooses click, type, and click together in one browser call. 9. [Copilot Tasks · Response layer] Context size and cache reuse: Each model call carries recent task history, so large browser results increase processing time. I bounded that history with a sliding window and task notes, and separately fixed cache-breakpoint stability to reuse unchanged input. Cache hit rate rose from about 50% to 80%+. 10. [Copilot Tasks · Response layer] Loop detection and recovery: The retained working note carries the pending save verification into the next call. I defined recovery rules and corrected tool-result handling to stop repeated work without progress; the model checks the saved page rather than retrying the edit. 11. [Copilot Tasks · Response layer] Permission to send email: The verified checklist feeds the email draft. When mail sending is disabled, the consent-card contract I defined requires approval separate from file access, leaving the sending decision with the user. 12. [Copilot Tasks · Response layer] Returned draft and references: After the user declines sending, the result includes a saved checklist and an unsent draft. The result-handling contracts I defined preserve that distinction and the source references. 13. [Copilot Tasks · Response layer] Model-feature evaluation: I approved evaluation strategies for the full execution path, covering tool selection, permissions, recovery, and returned results. Case study: https://gervasio.ca/#ai Source: Copilot Tasks product announcement (https://www.microsoft.com/en-us/microsoft-copilot/blog/2026/02/26/copilot-tasks-from-answers-to-actions/) ### Instacart: Software Engineer II (2024–2025) I led development of Instacart’s receipt-matching system. It compares shopper receipts with customer orders to find missing items, unexpected purchases, and price differences. - Led receipt-reconciliation engineering and matching algorithms. The receipt-matching platform processed 86% of all Instacart orders and saved more than $3M per month. - Owned the APIs distributing receipt data across Instacart. Powered fraud detection, in-store pricing, and shopper-quality workstreams responsible for millions of dollars in monthly savings. - Under 1 year to promotion at Instacart - 98% precision when linking receipt items to ordered products - 90% recall in receipt-to-product matching The receipt project had been cancelled years earlier. The previous tech lead had brought matching recall to 40%. When they left as I joined, I took on technical leadership. Built evaluation systems and rebuilt training pipelines and matching algorithms while improving reliability and reducing latency in the live production system. #### Deep dive: Receipt reconciliation algorithm A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#instacart). 1. [Offline training · Receipt/product associations] Match the receipt to the order: A shopper’s receipt uses abbreviations instead of the product names in the customer’s order. Matching those lists reveals missing items and price differences. Text extraction first turns the receipt photo into names, sizes, and prices. 2. [Offline training · Receipt/product associations] Learn from previous purchases: Before matching new purchases, the system learns from historical receipt/order pairs. Each receipt item is initially paired with every product in its order because the correct product is not known yet. 3. [Offline training · Receipt/product associations] Association confidence: Across those historical pairs, the co-occurrence count records how often a product appears with the receipt text. Bread appears in one of four orders and is filtered out for weak association. 4. [Offline training · Receipt/product associations] Association and text similarity: Eggs survive that first filter by appearing in every order, but score poorly against the receipt abbreviation. The text-similarity filter rejects them despite their strong association. 5. [Offline training · Receipt/product associations] Candidates requiring review: Both milk products pass the association and text filters. Their similar names leave the abbreviated flavor unresolved, so both candidates go to review. 6. [Offline training · Receipt/product associations] LLM resolution of ambiguous pairs: The LLM resolves the remaining flavor ambiguity: VNL means vanilla, so original-flavor milk is rejected. The 32OZ size matches the vanilla product. 7. [Offline training · Receipt/product associations] Native PySpark rewrite: To run these comparisons at scale, I rewrote the algorithm with native PySpark operations instead of pandas and custom Python functions. Removing Python–Spark row conversion allowed Databricks to optimize the execution plan, making training and inference 20 times faster. 8. [Online matching · Receipt reconciliation] Matching a new receipt: The learned mappings are stored for use on new receipts. Online matching uses string similarity against each product’s expected receipt strings, or a direct receipt-string lookup in the feature store. Small spelling differences can still produce a match. 9. [Online matching · Receipt reconciliation] Unmatched items need an explanation: Matching both lists leaves yogurt without a receipt line and a drink without an ordered product. The shopper app asks whether the yogurt was missed, unavailable, or replaced; the unresolved differences also go to review. 10. [Online matching · Receipt reconciliation] Internal receipt review: Internal reviewers receive the same matches and exceptions through APIs I owned, with receipt and order evidence for investigating the missing yogurt and unexpected drink. 11. [Online matching · Receipt reconciliation] Product pricing and discrepancies: A confirmed product match also makes its receipt price usable for comparison. My data services supplied the same matches and prices to investigate discrepancies through fraud review or price updates. Case study: https://gervasio.ca/#instacart Source: The shopper product (https://shoppers.instacart.com/) ### BC Cancer Research Centre: Research Intern (2023–2024) I studied whether cancer-cell size and shape could help select cells for DNA sequencing. At Canada’s Michael Smith Genome Sciences Centre in BC Cancer Research Centre, I linked individual cell images to their genetic results and tested models for predicting sequencing yield and quality. The centre was founded in 1999 by Nobel laureate Michael Smith. - Studied whether cancer-cell size and shape could help select cells for DNA sequencing. Linked images of individual cells to their genetic results and tested models for predicting sequencing yield and quality. - Established training pipelines on high-performance computing clusters to tune segmentation and multi-object tracking models. Combined data augmentation, hyperparameter search, and benchmark comparisons to evaluate cell detection and tracking. I held a scholarship through the Multidisciplinary Research Program in Medicine for research at Canada’s Michael Smith Genome Sciences Centre within BC Cancer Research Centre. The Genome Sciences Centre was founded in 1999 by Nobel laureate Michael Smith. #### Deep dive: Cell detection and DNA matching A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#research). 1. [Cell-analysis workflow] Connect cell images to DNA results: The study asked whether cell images could help choose cells for DNA sequencing. That required linking camera footage to each cell’s later DNA results. I used Segment Anything and hand corrections to outline the cells. 2. [Cell-analysis workflow] Automatic cell detection: Corrected outlines provide training examples for Mask R-CNN, the model that finds and outlines cells. Varying image size, orientation, and lighting expanded the training data and improved detection. 3. [Cell-analysis workflow] Cell tracking between images: Using those detections, the tracker I built links nearby cell positions across consecutive images. I compared it with another tracking method using checked cell identities, including cases where overlapping cells made the matches uncertain. 4. [Cell-analysis workflow] Linking a cell to its collection well: At the nozzle exit, matching a cell’s last appearance to the dispenser’s log links its image history to a well, one small compartment in the collection tray. Uncertain matches remain flagged. 5. [Cell-analysis workflow] Joining image and DNA records: DNA sequencing happens later. Its results use the same well address, which joins a cell’s image measurements to the amount and quality of DNA data obtained from that well. 6. [Cell-analysis workflow] Analysis of the linked records: With image and DNA records joined, I tested whether cell size and shape could predict DNA-data quantity and quality using several models. The aim was to use images to help choose cells for sequencing. Case study: https://gervasio.ca/#research Source: Canada’s Michael Smith Genome Sciences Centre (https://www.bcgsc.ca/about-us/our-story) ### Simba Technologies: Junior Software Engineer (2022) Simba co-created the ODBC standard with Microsoft in 1992. I migrated its PostgreSQL and Redshift database drivers to ARM64 to support Apple Silicon, resolving native-library incompatibilities and adapting the C/C++ code and build process. - Migrated PostgreSQL and Redshift database drivers to ARM64 to support Apple Silicon. Resolved native-library incompatibilities and adapted the C/C++ code and build process. Received a full-time return offer. Simba’s customers include Microsoft, Amazon, and Snowflake. The company co-created the ODBC standard with Microsoft in 1992. #### Deep dive: ARM64 drivers and SQL parsing A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#drivers). 1. [Project 1 · ARM64 driver port] How an application reaches a database: A database driver translates an application’s requests into the protocol a database understands. Here, an Apple Silicon application sends a SQL query through ODBC, the common interface for calling that driver. 2. [Project 1 · ARM64 driver port] Routing the ODBC call: The Driver Manager routes that ODBC call to the database driver, which uses PostgreSQL’s client library to communicate with the server. 3. [Project 1 · ARM64 driver port] An incompatible native library: That path is blocked by incompatible machine code. The Apple Silicon application runs on ARM64, but a required library was built for Intel’s x86_64 architecture. It cannot load into the application’s process. 4. [Project 1 · ARM64 driver port] The ARM64 port: I removed that mismatch by porting the C/C++ driver and rebuilding its supporting libraries, including libpq, PostgreSQL’s client library. The port required API changes and checks for authentication, data types, error handling, and cleanup. 5. [Project 2 · SQL parser redesign] SQL parser redesign: Next, the driver interprets the SQL. In a separate project, I replaced regex matching with ANTLR, a parser generator that organizes the query into a grammar tree. Execution improved by 10% and memory use fell by 40%. 6. [Driver query lifecycle] The PostgreSQL query message: After parsing, the client library encodes the SQL as a PostgreSQL query message and sends it to the remote server for execution. 7. [Driver query lifecycle] Typed results returned to the application: The server groups the sales records and returns rows. The driver converts their types and places the values into the application’s result buffers. Case study: https://gervasio.ca/#drivers Source: Simba’s ODBC heritage and connectivity platform (https://www.insightsoftware.com/simba/) ### University of British Columbia: Senior Teaching Assistant (2020–2024) I led programming labs, mentored students, and graded work in CPSC 110 and CPSC 320. In CPSC 110, I taught data representation, function design, graphs, and search. In CPSC 320, I taught graph and greedy algorithms, correctness proofs, complexity analysis, and NP-completeness. - Led programming labs spanning data representation, graphs, and search. In CPSC 110, I taught students to turn data definitions into functions and use recursion and backtracking to solve problems. - Taught algorithm design and correctness proofs. CPSC 320 topics included graph algorithms, greedy strategies, complexity analysis, and NP-completeness. Earned an undergraduate award for exemplary service. Resolved 3,000+ student question threads and received over 50 ratings of 5/5 from students. CPSC 110 enrolled roughly 1,000 students per term. As a Senior Teaching Assistant, I managed the online MicroMasters course alongside the labs I ran. The wider edX MicroMasters program had over 188,000 registered learners. #### Deep dive: Backtracking and shortest paths A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#teaching). 1. [CPSC 110 · Program design] Route-finding lab: Students must return a route from S to T through a map with dead ends and loops. Each location contains a label and a list of exits. I taught students to derive the search functions from this data definition. 2. [CPSC 110 · Program design] Arbitrary-arity tree template: A template is a code outline based on the data. This definition supplies two: one handles a location, and the other searches its list of exits. Together they handle any number of branches in the search tree. 3. [CPSC 110 · Program design] Backtracking template: The branch through D cannot reach the target without returning to a visited location. Backtracking reports that failure to the earlier choice and tries B. 4. [CPSC 110 · Program design] Path accumulator: The next branch leads back to A. Carrying the path S → A → B between calls lets the function recognize A as a repeat and skip it. This accumulator also stores the route that will be returned at the target. 5. [CPSC 110 · Program design] The returned route: After skipping repeated locations, the search reaches T and returns S → A → B → C → T. I assessed whether the route used legal moves, reached the target, and handled dead ends and loops. 6. [CPSC 320 · Algorithms] From any route to the cheapest route: Finding any route was enough in CPSC 110. In CPSC 320, each connection has a cost and we need the smallest total. The route we just found costs 17; finding it first does not make it cheapest. 7. [CPSC 320 · Algorithms] Choose a strategy from the problem: I taught students to choose an approach from the problem’s structure. Stopping at the first route gives a cost of 17. Breadth-first search finds the fewest connections, but that route costs 15. Nonnegative costs make Dijkstra’s greedy strategy a candidate. 8. [CPSC 320 · Algorithms] Dijkstra: choose, then update: Dijkstra keeps the best total found for each location. It chooses the smallest unfinished total, then checks whether going through that location makes neighboring routes cheaper. Nonnegative connection costs mean a later detour cannot improve the total just finalized. 9. [CPSC 320 · Algorithms] Prove the greedy choice: For correctness proofs, I asked students to state an invariant and justify each step. Here, finalized totals are correct. Any alternative route to B first reaches an unfinished location. B has the smallest total; later nonnegative costs cannot produce a cheaper route to it. 10. [CPSC 320 · Algorithms] Changed input, same assumptions: Raising B–A from 2 to 9 makes the old route more expensive. The costs are still nonnegative, so the greedy argument still applies. Clear the stored totals and rerun the search; a different route now wins. 11. [CPSC 320 · Algorithms] Count the work and storage: I taught students to count work and storage in the implementation. Scanning every location for every choice means twice as many locations require four times as many minimum checks. Costs and previous locations need one record per location. Case study: https://gervasio.ca/#teaching Source: CPSC 110, computation and program design (https://www.cs.ubc.ca/course/cpsc-v-110) ### Cadets Canada: Cadet Warrant Officer I taught and assessed cadets during school-year training. At a regional military training base for cadets, I managed staff, led a company, coached cadets to plan and lead activities, and coordinated large sports events. - Led training and welfare for a company of about 100 cadets. Managed platoon sergeants and staff at a regional military training base for cadets; the company earned performance awards in 3 of 12 weeks. - Directed base-wide sports events for more than 1,000 cadets. Planned tournaments, refereed competitions, and coached cadets to lead, assess, and mentor others. Local units: Chief of Training at my local Sea Cadet corps in 2018, then highest-ranking cadet in my local Air Cadet squadron in 2019. Each unit had 100 cadets. Regional summer training: Vernon Cadet Training Centre is a regional military training base for cadets. Its award-based summer training under the Canadian Armed Forces brings together about 1,000 selected cadets from across Canada. Served as Flag Party Commander in 2018, leading the flag party at the ceremonial centre of the full parade. Served as Company Sergeant Major on parade in 2019, commanding more than 100 cadets. Among the top 13 candidates interviewed in 2019 to lead the entire base; recommended to lead it in 2020, before the pandemic. #### Deep dive: Cadet instruction and event planning A step-by-step technical walkthrough William wrote of this system (https://gervasio.ca/#cadets). 1. [School-year training] School-year instruction: The cadet program combines instruction, drill, fitness, and leadership practice. During the school year, I co-planned training for about 100 cadets, taught and assessed lessons, and supervised drill and dress for roughly 20. 2. [Regional base · Summer training] Summer staff management and care: Summer training at a regional military training base for cadets required day-to-day supervision. I managed platoon sergeants and staff responsible for meals, hydration, uniforms, barracks, learning needs, and care for unwell cadets. 3. [Regional base · Summer training] Company Sergeant Major on parade: As Company Sergeant Major, I coordinated those platoons and commanded more than 100 cadets through the march past in a roughly thousand-person parade. 4. [Regional base · Summer training] Sports instruction and coaching: Alongside parade duties, I taught cadets to play sports and to coach, lead, and plan activities. Lessons combined demonstration and supervised practice. 5. [Regional base · Summer training] Instructor development: Cadets then planned and led their own sessions under my coaching, from briefing the group to assessing the outcome. 6. [Regional base · Summer training] Large events and tournaments: Running a tournament meant fitting many activities together. For an event with more than a thousand cadets, I assigned staff responsibilities and coordinated teams, schedules, equipment, and activity spaces. Case study: https://gervasio.ca/#cadets Source: Vernon Cadet Training Centre (https://www.canada.ca/en/department-national-defence/services/cadets-junior-canadian-rangers/cadets/training-centres/vernon.html) ## Writing - [Trust and early career belief (Copilot offer)](https://www.linkedin.com/feed/update/urn:li:activity:7426686396548952064) (FEB 2026) - [Which students stood out for top AI roles](https://www.linkedin.com/feed/update/urn:li:activity:7403855908109340672) (JAN 2026) - [AI experts left me thinking AI was useless](https://www.linkedin.com/feed/update/urn:li:activity:7401304083015507968) (DEC 2025) - [Hiring post went so hard LinkedIn thought I was a bot](https://www.linkedin.com/feed/update/urn:li:activity:7399298492835352577) (DEC 2025) - [No, AI is not a substitute for entry-level hires](https://www.linkedin.com/feed/update/urn:li:activity:7391149604890710016) (NOV 2025) - [Everyone at my high school said I'd be a doctor](https://www.linkedin.com/feed/update/urn:li:activity:7386433313890189312) (NOV 2025) - [I got promoted in under a year, then immediately failed](https://www.linkedin.com/feed/update/urn:li:activity:7381091189522952193) (NOV 2025) - [I got into Microsoft AI by learning to rely on others](https://www.linkedin.com/feed/update/urn:li:activity:7376284221138653184) (OCT 2025) - [How I navigated the early career job market](https://www.linkedin.com/feed/update/urn:li:activity:7371703484427059200) (OCT 2025) - [Starting as Member of Technical Staff at Microsoft AI](https://www.linkedin.com/feed/update/urn:li:activity:7363217158144708609) (AUG 2025) - [Calling the end of my time at Instacart](https://www.linkedin.com/feed/update/urn:li:activity:7362266632477364225) (AUG 2025) - [Starting my career as a Software Engineer at Instacart](https://www.linkedin.com/feed/update/urn:li:activity:7213950135410573312) (MAR 2024) - [Martin Frauendorf Memorial Prize, UBC CS](https://www.linkedin.com/feed/update/urn:li:activity:7211760121410936832) (MAR 2024) - [Summer with PROOF Centre of Excellence (research spotlight)](https://www.linkedin.com/feed/update/urn:li:activity:6839315821819375616) (SUMMER 2021)