Skip to main content

An AI-powered data analysis agent for intelligent data insights and visualization

Project description

dxel: AI-Powered Data Analysis Agent

dxel is an extensible Python package designed to automate and enhance data analysis workflows using Large Language Models (LLMs) and agent-based orchestration. It enables users to interact with their data, generate insights, and visualize results through natural language queries and intelligent agents.

Project Overview

Key Capabilities:

  • LLM-powered data analysis and summarization
  • Automated data exploration and visualization
  • Agent-based orchestration for complex workflows
  • Extensible architecture for custom agents and LLMs
  • Integration with multiple LLM providers (Gemini, Groq)

Typical Use Cases:

  • Rapid data exploration and summary generation
  • Automated report creation
  • Interactive data querying and visualization
  • Building custom data agents for business intelligence

How It Works:

  1. Users provide a dataset and a natural language query.
  2. dxel agents interpret the query, analyze the data, and return results or visualizations.
  3. LLMs (like Gemini) are used for reasoning, summarization, and generating code or explanations.

The package is modular, allowing you to add new agents, LLM integrations, or utilities as needed.

Note:

  1. The current version supports multiple LLM providers: Gemini and Groq.
  2. Set the appropriate API keys as environment variables: GOOGLE_API_KEY or GROQ_API_KEY.

Prerequisites

  • Python 3.11+
  • Install dxel:
    pip install dxel
    
  • Set your API key(s) as environment variables based on your chosen LLM provider:
    • For Gemini: GOOGLE_API_KEY
    • For Groq: GROQ_API_KEY

Demo Notebook: Step-by-Step Walkthrough

Using Gemini LLM

  1. Import Required Libraries and dxel Modules

    • Import standard Python libraries (os, sys, pandas, numpy, etc.)
    • Import dxel modules:
      from dxel.utils.llm.gemini import Gemini
      from dxel.datascience.agent import DataAnalystAgent
      
  2. Set Data Path and API Key

    • Define the path to your dataset:
      data_loc = 'notebook_io/data_agent/input/Titanic-Dataset.csv'
      
    • Load your Google Gemini API key from environment variables:
      api_key = os.getenv('GOOGLE_API_KEY')
      
  3. Initialize Gemini LLM and DataAnalystAgent

    • Create a Gemini LLM client:
      gemini_llm = Gemini(api_key=api_key)
      
    • Initialize the DataAnalystAgent with the LLM and data:
      data_analyst_agent = DataAnalystAgent(gemini_llm, data_loc)
      
  4. Run Data Analysis Queries

    • Get column information:

      data_analyst_agent.think('tell me all columns')
      
    • Get distribution of a column:

      o = data_analyst_agent.think('give me distribution of age column')
      

Using Groq LLM

Simply replace the Gemini initialization with Groq:

from dxel.utils.llm.groq import GroqLLM

api_key = os.getenv('GROQ_API_KEY')
groq = GroqLLM(api_key=api_key, model="llama-3.3-70b-versatile")
data_analyst_agent = DataAnalystAgent(groq, data_loc)

Then run the same analysis queries as with Gemini.

Features Demonstrated

  • Multi-LLM support (Gemini, Groq)
  • LLM-powered data analysis
  • Data summarization and column insights
  • Distribution queries and visualization

For more details, see the demo notebooks:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dxel-0.1.0b3.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dxel-0.1.0b3-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file dxel-0.1.0b3.tar.gz.

File metadata

  • Download URL: dxel-0.1.0b3.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dxel-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 4b6c346a88a18074ad0298f7dc6fd8bde2ae0c441987669b6b24361eece3cc24
MD5 3d1f7d3ed0e61094b3b1493d2661d2d2
BLAKE2b-256 4717d5e81386881e9cf8840c264b5770667a87f691c10e84adf840ed29de7eca

See more details on using hashes here.

File details

Details for the file dxel-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: dxel-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dxel-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 f0ea6713955912581ab1a5a7e0158c59644cc39c7337bfb62c10ab3953575bdc
MD5 4bdc0214fd50ca10f25556f47914ce58
BLAKE2b-256 777667564111b50ef063b2e983a48d2cb335520cc06fc2974d7d8285e6e7c301

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page