Anthropic's Claude chatbot can now write and run JavaScript code.
Today, Anthropic announced a new analytical tool that helps Claude return what the company describes as “mathematically accurate and reproducible answers.” When this tool is enabled (currently in preview), Claude can perform calculations, analyze data from files such as spreadsheets and PDFs, and render the results as interactive visualizations.
“Think of analytics tools as built-in code sandboxes, where Claude can perform complex calculations, analyze data, and iterate on different ideas before sharing the answer,” Anthropic blogs. I wrote it in a post. “Rather than relying solely on abstract analysis, you can process data systematically, cleaning, exploring, and analyzing it step by step until you get the right results.”
Anthropic provides some examples where this might be useful. For example, a product manager can upload sales data and ask Claude to analyze performance by country. Meanwhile, engineers can provide Claude with monthly financial data and have him create dashboards that highlight key trends.
Claude has been able to attempt these tasks before. However, the answers were not always incredibly accurate, as there was a lack of a mechanism to mathematically verify the results.
Google provides an equivalent feature in its Gemini model called Code Execution. This allows the model to generate and run Python code and iteratively learn from the results. OpenAI's flagship models can similarly write and run code through a feature the company calls Advanced Data Analysis.
Anthropic's analytics tools are available to all Claude users on the web as of Thursday. To turn it on, log in to Claude.ai and click here.