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.
- 🧠 LLM Integration: Uses
llama-cpp-pythonto 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.
- 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
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)
- Data Ingestion: Load and inspect the dataset
- LLM Setup: Configure and load LLaMA-2 using
llama-cpp-python - Prompt Engineering: Craft user prompts to analyze the dataset
- LLM Response: Interpret model responses for tasks such as:
- Statistical summaries
- Correlation detection
- Important variable identification
- ML model recommendations
- Reflection & Evaluation: Assess AI output for accuracy, ethical relevance, and contextual fit
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
- Hands-on experience integrating LLMs into analytics workflows
- Enhanced understanding of AI-assisted data exploration
- Practice with prompt design, model evaluation, and feature interpretation
- Expand support to regression and clustering tasks
- Integrate with Streamlit for interactive dashboards
- Fine-tune LLaMA-2 for analytics-specific tasks
Lasya Priya Konduru
LinkedIn | GitHub | Portfolio
This project is for educational purposes only and follows the licensing terms of the used models and libraries.