A city open-data chatbot must answer questions about large municipal datasets. How should Claude reach the data?
Select an answer to reveal the explanation.
Short Explanation
Giant CSVs don't belong in the chat backpack. Give Claude a lookup tool so it pulls the slice it needs instead of swallowing the whole open-data warehouse.
Full Explanation
City open-data chatbots that answer questions about large municipal datasets should reach those datasets through the Messages API with tools for lookup rather than stuffing entire CSV exports into context. Tool-mediated access works because Claude can request only the slices, filters, or aggregations needed for the resident question while the application layer enforces row limits, authentication, and query safety. That design keeps prompt size bounded, reduces truncation risk, and grounds answers in current warehouse or open-data API results instead of a stale dump pasted into chat. Pasting entire CSV exports into every user message fails by concept: multi-megabyte tables blow the context window, waste tokens, and still cannot guarantee completeness for citywide datasets. Disabling tools and relying on Claude memorizing last year's open-data dump fails by concept: model weights are not a live municipal data store and will drift from published datasets. Embedding raw multi-gigabyte files directly in the system prompt fails by concept: system prompts are not a substitute for data access layers and cannot hold warehouse-scale civic files. Exam caveat: tools must still return audited, policy-allowed fields—open data does not mean unrestricted PII—and tool schemas should document required parameters so Claude cannot invent illegal joins. Operational check: wire a Messages API tool that queries a sample municipal dataset with hard row caps, ask a question that needs only a subset of columns, confirm Claude invokes the tool instead of receiving a full CSV in context, and verify the answer cites returned rows without truncated bulk paste.