The interview was divided into three main design areas: improving the chatbot's overall workflow and answer accuracy, building an evaluation framework, and developing a post-training strategy. The interesting part was that the retrieval systems already existed, so the discussion focused on grounding, source selection, reliability, and model improvement rather than building a retrieval engine from scratch.
Interview Details
ML System Design: Internal Knowledge and News Chatbot
I was asked to design an internal chatbot that employees could use to ask questions about company information and recent news. Depending on the question, the chatbot needed to retrieve information from the internal company wiki, an external news service, or both sources.
The company already had a working wiki retriever and a news API, so I wasn't expected to redesign either retrieval system. Instead, I needed to build on the existing infrastructure and address the limitations of the current LLM-based solution.
Existing System and Available Components
The existing chatbot was built around a frontier language model with a single large system prompt. It already had access to the internal wiki retriever and an external news API, but the company had identified several problems involving hallucinations, incorrect source selection, inconsistent output formatting, inaccurate citations, and inference costs.
The following components were available for the design:
Frontier Chat API: An existing frontier model accessible through an API, without access to its model weights.
Wiki Retriever: An existing internal knowledge retrieval system.
News API: A service for retrieving recent news articles.
Open-Source Models: Models available through Fireworks AI.
Fine-Tuning Infrastructure: Fireworks AI's fine-tuning products for adapting open-source models.
News Retrieval API
For questions involving recent news, I was given an existing API with the following interface:
search(keywords, start_time) -> articles
Each returned article contained these fields:
Article {
id
headline
time
publisher
url
body
}
Article {
id
headline
time
publisher
url
body
}
The interviewer specified that the chatbot should call this API whenever a question required news information. I was not supposed to design a separate search engine or web crawler.
Scale and Traffic Requirements
The interviewer provided
Unlock Full Details
Create a free account to unlock this interview experience report.