Katkat

Build a Tool-Using Weather Assistant

VoleonMachine Learning Engineer · Technical Screen

Last updated

Design a grounded weather assistant with typed model tool calls, server-side credentials, validated live data, provenance, and safe failure behavior.

Build a Tool-Using Weather Assistant

Design an API-driven language-model workflow that answers a current-weather question for a city. The model may plan or select a tool, but live weather must come from an authorized data source and the final answer must remain grounded in that result.

Constraints & Assumptions

  • Do not ask the language model to invent current weather from pretrained knowledge.
  • API credentials stay server-side and are never placed in prompts or logs.
  • The system should expose uncertainty and source time rather than hidden internal reasoning.

Clarifying Questions to Ask

  • Which weather provider and fields are authorized?
  • How is a city disambiguated?
  • What should happen when the tool or model is unavailable?

Hints

Hint 1

Use structured tool calls: Let the model request a typed weather operation; validate the arguments and execute it outside the model.

Follow-up questions

  • How would you answer a forecast question rather than current conditions?
  • How would you prevent tool output from injecting new instructions?