Skip to content

This project focuses on developing an AI agent using a Large Language Model (LLM) — specifically LLaMA-2 — to assist in predictive analytics.

Notifications You must be signed in to change notification settings

lasyakonduru/Building-an-AI-Agent-for-Predictive-Analytics-with-LLMs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🤖 AI Agent for Predictive Analytics using LLaMA-2

📌 Project Overview

This project demonstrates how to build an AI-powered agent using a Large Language Model (LLM), specifically LLaMA-2, to assist in predictive analytics tasks. The AI agent is capable of:

  • Analyzing structured datasets
  • Extracting key insights and feature importance
  • Performing basic statistical operations
  • Recommending appropriate ML models for classification

The goal is to enhance data-driven decision-making by combining traditional analytics with the reasoning power of LLMs.


🚀 Features

  • 🧠 LLM Integration: Uses llama-cpp-python to load and interact with a quantized LLaMA-2 model.
  • 📊 Dataset Analysis: Computes mean, max, min values and identifies variable correlations.
  • 🔍 Feature Importance: Highlights the most relevant predictors for classification.
  • 🧪 Model Suggestions: Recommends ML models like Logistic Regression, Random Forest, SVM based on dataset characteristics.
  • 🧾 Human-AI Evaluation: Includes reflection on the AI agent's performance and ethical use.

🛠️ Technologies & Libraries

  • Python 3.10+
  • Pandas – for data manipulation
  • llama-cpp-python – to run the LLaMA-2 model locally
  • Hugging Face Hub – to download the LLaMA-2 GGUF model
  • Google Colab – cloud-based environment for execution

📂 Dataset Used

A synthetic dataset with 20 entries including the following columns:

  • Salary (USD/Year)
  • Occupation
  • Gender
  • Age
  • Marital Status
  • Credit Lines
  • Propensity to Pay (target variable)

📈 Model Workflow

  1. Data Ingestion: Load and inspect the dataset
  2. LLM Setup: Configure and load LLaMA-2 using llama-cpp-python
  3. Prompt Engineering: Craft user prompts to analyze the dataset
  4. LLM Response: Interpret model responses for tasks such as:
    • Statistical summaries
    • Correlation detection
    • Important variable identification
    • ML model recommendations
  5. Reflection & Evaluation: Assess AI output for accuracy, ethical relevance, and contextual fit

🔐 Ethical Considerations

While LLMs can generate fast insights, not all suggested features (e.g., gender or marital status) may be ethically appropriate for predictive modeling. Human oversight is essential to:

  • Validate AI outputs
  • Ensure fairness and data responsibility

📚 Learning Outcomes

  • Hands-on experience integrating LLMs into analytics workflows
  • Enhanced understanding of AI-assisted data exploration
  • Practice with prompt design, model evaluation, and feature interpretation

🧠 Future Enhancements

  • Expand support to regression and clustering tasks
  • Integrate with Streamlit for interactive dashboards
  • Fine-tune LLaMA-2 for analytics-specific tasks

👩‍💻 Author

Lasya Priya Konduru
LinkedIn | GitHub | Portfolio


📄 License

This project is for educational purposes only and follows the licensing terms of the used models and libraries.

About

This project focuses on developing an AI agent using a Large Language Model (LLM) — specifically LLaMA-2 — to assist in predictive analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published