KatInterview

Building a Voice Assistant Knowledge Pipeline for Festivals and Wildlife

System DesignModel answer
HardModel answerSystem Designdata-pipelineknowledge-graphentity-linking

Last updated

Design an end-to-end knowledge pipeline for a voice assistant answering holiday and animal questions, fix mis-routed queries, and build a framework for debugging failures.

You are designing the backend knowledge layer for a voice assistant used worldwide. It must answer factual questions in two areas, and you must also show how you would keep quality high over time.

Part 1: Holidays. Design an end-to-end data pipeline that lets the assistant answer questions about holidays and observances in any country. Cover:

  • data sources
  • ingestion
  • normalization
  • storage
  • the query layer

Explain how you would reconcile different calendar systems (Gregorian, lunar or lunisolar, and government-defined or observed-day rules) and how you would keep the content up to date.

Part 2: Animals. Extend the pipeline to answer animal questions. Explain:

  • which additional data elements, taxonomies, or ML models you need
  • how you would detect and fix queries that are wrongly routed to the animal domain, such as a request about a children's cartoon pig character that only looks like an animal question because of one word

Part 3: Debugging. Error logs show that the assistant fails on certain animal queries. Propose a framework to:

  • categorize the errors
  • trace root causes
  • prioritize fixes

State your assumptions about scale and latency, and be explicit about trade-offs.

Hints

Hint 1

Think about what you store for a holiday: a rule that produces dates, or only the dates themselves? Consider fixed dates, nth-weekday rules, moveable feasts, moon-sighting holidays, and weekend-shift rules.

Hint 2

For the mis-routing problem, ask what a classifier sees when only a partial span matches an animal. Think about scoring every entity type on the full span, and about what to do when the top score is low or the top two are close.

Hint 3

For debugging, assign each failure to the first pipeline stage where output diverges from the correct one (speech recognition, domain routing, entity linking, knowledge lookup, response generation). Then rank clusters by frequency times customer impact divided by fix effort.