Sign up to save tools and stay up to date with the latest in AI
bg
bg
1

GitHub - mljar/plotai: 🎨🤖 Create plots in Python and Matplotlib with LLM

Aug 25, 2023 - github.com
PlotAI is a Python package that simplifies the creation of plots in Matplotlib using Language Learning Models (LLMs). The user provides an input DataFrame and a prompt, and PlotAI constructs a prompt for the LLM, which includes the first five rows of the DataFrame and the user's prompt. The returned Python code is executed, and the plot is displayed. The PlotAI class has only one method, `make()`, and it works in Python scripts and notebooks.

However, PlotAI is still in an experimental stage and has several limitations. It uses OpenAI ChatGPT-3.5-turbo for completions and sends the first five rows of the DataFrame to OpenAI ChatGPT. If the data is sensitive, it should be removed or encoded before passing to PlotAI. Also, PlotAI executes Python code returned by LLM, which can be unsafe. Users are responsible for monitoring and managing their own token usage and the associated costs.

Key takeaways:

  • PlotAI is a Python library that simplifies the creation of plots in Matplotlib using Language Learning Models (LLM).
  • The user provides an input DataFrame and a prompt, and PlotAI constructs a prompt for LLM, which generates Python code that is then executed to display the plot.
  • PlotAI is currently in a very experimental form and has some limitations, including the use of OpenAI ChatGPT-3.5-turbo for completions and the potential risk of executing Python code returned by LLM.
  • Users are responsible for their own OpenAI API usage and the associated costs, and are advised to monitor their usage and set up necessary limits or alerts to prevent unexpected charges.
View Full Article

Comments (0)

Be the first to comment!