1
Feature Story
Can LLMs Replace Data Analysts? Building An LLM-Powered Analyst
Dec 11, 2023 · towardsdatascience.com
Key takeaways
- The article discusses how to empower Language Models (LLMs) with external tools using OpenAI functions, focusing on two use cases: extraction for structured output and routing for using external information.
- It explains how to define custom tools using Pydantic and how to convert these tools into OpenAI functions. The tools can then be used by the LLMs to perform tasks such as calculating the difference between two metrics or querying Wikipedia.
- The author demonstrates how to use these tools in practice by creating a chain that includes an OpenAI model, a prompt with a variable user message, and an output parser. The chain can then be invoked with a user request, and the LLM can use the tools to answer the request.
- The article concludes with an example of how an LLM can use multiple tools to answer a complex question, demonstrating the potential of LLMs in replacing data analysts. However, the author notes that the current prototype is basic and far from the capabilities of junior analysts.