Internal Wiki and News Chatbot: Cited Answers, Evaluation and Post-Training

Quick Overview

A system design question for an internal company chatbot that answers from an existing wiki retriever and a news search API, with labeled claims, per-turn citations and an explicit abstain path. It covers the request workflow, answer evaluation, and a post-training recipe for open models aimed at hallucination, citation, format and cost gaps.

Internal Wiki and News Chatbot: Cited Answers, Evaluation and Post-Training

Company: Fireworks

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Technical Screen

Design an internal chatbot for one company. Employees ask questions about the company wiki, the latest news, or both. Two evidence sources exist and are given: - **Wiki retriever:** already built. For each question it returns wiki chunks, and each chunk carries the `page_id` of its page. Do not redesign it. - **News API:** one function call that you use as is, `search(keywords, start_time) -> articles`. Each article has `id`, `headline`, `time`, `publisher`, `url` and `body`. Call it when the question needs news. You do not design a news search system, and you do not crawl the web. Scale: - One company with 1,000 employees. - 15,000 questions per week, with a peak of 20 concurrent generations. - Conversations average 5 turns. - English only. Answer contract: - Label each claim INTERNAL, NEWS or Both. - A wiki claim cites a `page_id` from the chunks returned for this turn. - A news claim cites an article `id` returned by the API for this turn, and the reply shows an "as of" time. - If the needed evidence is not in the chunks or the API result, the reply says "I don't know." What exists today: a frontier model, one large system prompt, the retriever and the news API. Assets: - A frontier chat API, with no access to the model weights. - Open-source models served on Fireworks. - Fine-tuning of open models through Fireworks fine-tuning products. Known gaps in the current system: hallucination, source choice, format, inaccurate citations and cost. Design three things, without redesigning the retriever: the overall workflow and how it improves answer accuracy, the evaluation of the answers, and a post-training recipe that closes the known gaps. ### Clarifying Questions - Does "for this turn" mean evidence fetched in the current turn only, so a follow-up that relies on an article from an earlier turn must call the API again? - Is the "as of" time the moment the news API was called, or the publish time of the newest cited article? - May one reply combine supported claims with "I don't know" for the parts that lack evidence? - What reply latency do employees expect, and is streaming acceptable? - Are some wiki pages restricted to some employees, and does the retriever already enforce that? - Is any labeled data available today, such as logged conversations, user feedback or reviewed answers? ### Part 1: Overall workflow and answer accuracy Design the per-turn workflow from the employee's message to the final labeled, cited reply. Explain how each step addresses the known gaps, which model runs each step, and what the design costs at the stated scale. ```hint Split the decisions List the separate decisions the one large prompt makes today, from choosing a source to writing citations, and ask which of them code could make or check instead of the model. ``` #### What This Part Should Cover - Source choice and query construction for both sources, including the news time window. - Generation that produces labeled claims tied to this turn's evidence. - Checks after generation that catch bad citations and unsupported claims, and the "I don't know" path. - Model placement, latency and cost at 15,000 questions a week and 20 concurrent generations. ### Part 2: Evaluation of the answers How would you evaluate the chatbot's answers, both before release and in production? ```hint Separate what code can check Some parts of the answer contract can be verified exactly from the reply and the evidence retrieved for the turn. Others need a judgment. Treat the two kinds differently. ``` #### What This Part Should Cover - A test set covering wiki-only, news-only, both and unanswerable questions, including multi-turn conversations. - Metrics for each known gap, with deterministic checks wherever possible. - How judge-based scores are validated against human labels. - Handling news that changes over time, and monitoring in production. ### Part 3: Post-training recipe Describe a post-training recipe that closes the known gaps. Say which model you train, where the training data comes from, which training stages you run, and how you decide the trained model is ready to replace the current setup. ```hint Start from the failures Map each known gap to the training examples that would teach a model to avoid it, including examples whose correct reply is "I don't know." ``` #### What This Part Should Cover - The choice of model to train, given that the frontier model's weights are not available. - Training data sources, and how targets are produced and filtered. - Training stages tied to the specific gaps. - Release criteria and rollback, measured with the evaluation from Part 2. ### What a Strong Answer Covers - Use of the existing retriever and news API as given, with no retriever redesign and no crawling. - An explicit mechanism for every rule in the answer contract. - Each known gap (hallucination, source choice, format, inaccurate citations, cost) traced through the workflow, the evaluation and the training. - Capacity and cost reasoning grounded in the stated scale. ### Follow-up Questions - The wiki and today's news disagree about the same fact. How should the reply label and present the two claims? - The fine-tuned model beats the frontier pipeline on citation accuracy but scores lower on answer completeness. What would you ship, and how would you decide? - How do you keep a slow or failing news API from delaying the wiki-only parts of an answer? - Months after launch, employees start asking about topics the training data never covered. How do you detect this and refresh the model?

Overview: A system design question for an internal company chatbot that answers from an existing wiki retriever and a news search API, with labeled claims, per-turn citations and an explicit abstain path. It covers the request workflow, answer evaluation, and a post-training recipe for open models aimed at hallucination, citation, format and cost gaps.

Read the full Fireworks Machine Learning Engineer interview experience this question came from

Fireworks logo
Fireworks
Nov 9, 2026
mediumMachine Learning EngineerTechnical ScreenML System Design
1
0

Design an internal chatbot for one company. Employees ask questions about the company wiki, the latest news, or both.

Two evidence sources exist and are given:

  • Wiki retriever: already built. For each question it returns wiki chunks, and each chunk carries the page_id of its page. Do not redesign it.
  • News API: one function call that you use as is, search(keywords, start_time) -> articles . Each article has id , headline , time , publisher , url and body . Call it when the question needs news. You do not design a news search system, and you do not crawl the web.

Scale:

  • One company with 1,000 employees.
  • 15,000 questions per week, with a peak of 20 concurrent generations.
  • Conversations average 5 turns.
  • English only.

Answer contract:

  • Label each claim INTERNAL, NEWS or Both.
  • A wiki claim cites a page_id from the chunks returned for this turn.
  • A news claim cites an article id returned by the API for this turn, and the reply shows an "as of" time.
  • If the needed evidence is not in the chunks or the API result, the reply says "I don't know."

What exists today: a frontier model, one large system prompt, the retriever and the news API.

Assets:

  • A frontier chat API, with no access to the model weights.
  • Open-source models served on Fireworks.
  • Fine-tuning of open models through Fireworks fine-tuning products.

Known gaps in the current system: hallucination, source choice, format, inaccurate citations and cost.

Design three things, without redesigning the retriever: the overall workflow and how it improves answer accuracy, the evaluation of the answers, and a post-training recipe that closes the known gaps.

Clarifying Questions Guidance

  • Does "for this turn" mean evidence fetched in the current turn only, so a follow-up that relies on an article from an earlier turn must call the API again?
  • Is the "as of" time the moment the news API was called, or the publish time of the newest cited article?
  • May one reply combine supported claims with "I don't know" for the parts that lack evidence?
  • What reply latency do employees expect, and is streaming acceptable?
  • Are some wiki pages restricted to some employees, and does the retriever already enforce that?
  • Is any labeled data available today, such as logged conversations, user feedback or reviewed answers?

Part 1: Overall workflow and answer accuracy

Design the per-turn workflow from the employee's message to the final labeled, cited reply. Explain how each step addresses the known gaps, which model runs each step, and what the design costs at the stated scale.

What This Part Should Cover Guidance

  • Source choice and query construction for both sources, including the news time window.
  • Generation that produces labeled claims tied to this turn's evidence.
  • Checks after generation that catch bad citations and unsupported claims, and the "I don't know" path.
  • Model placement, latency and cost at 15,000 questions a week and 20 concurrent generations.

Part 2: Evaluation of the answers

How would you evaluate the chatbot's answers, both before release and in production?

What This Part Should Cover Guidance

  • A test set covering wiki-only, news-only, both and unanswerable questions, including multi-turn conversations.
  • Metrics for each known gap, with deterministic checks wherever possible.
  • How judge-based scores are validated against human labels.
  • Handling news that changes over time, and monitoring in production.

Part 3: Post-training recipe

Describe a post-training recipe that closes the known gaps. Say which model you train, where the training data comes from, which training stages you run, and how you decide the trained model is ready to replace the current setup.

What This Part Should Cover Guidance

  • The choice of model to train, given that the frontier model's weights are not available.
  • Training data sources, and how targets are produced and filtered.
  • Training stages tied to the specific gaps.
  • Release criteria and rollback, measured with the evaluation from Part 2.

What a Strong Answer Covers Guidance

  • Use of the existing retriever and news API as given, with no retriever redesign and no crawling.
  • An explicit mechanism for every rule in the answer contract.
  • Each known gap (hallucination, source choice, format, inaccurate citations, cost) traced through the workflow, the evaluation and the training.
  • Capacity and cost reasoning grounded in the stated scale.

Follow-up Questions Guidance

  • The wiki and today's news disagree about the same fact. How should the reply label and present the two claims?
  • The fine-tuned model beats the frontier pipeline on citation accuracy but scores lower on answer completeness. What would you ship, and how would you decide?
  • How do you keep a slow or failing news API from delaying the wiki-only parts of an answer?
  • Months after launch, employees start asking about topics the training data never covered. How do you detect this and refresh the model?