Skip to main content

Parse Azure Data Factory project files and evaluate them using AI models.

Project description

ADFMentor

A Python package that evaluates student Azure Data Factory (ADF) submissions using Google Gemini AI.

Features

  • 🤖 AI-Powered Evaluation — Gemini analyzes ADF JSON files and scores them against lecture tasks
  • 🎯 Auto Task Identification — AI identifies which lecture task each submitted file belongs to
  • 📦 ZIP Support — Automatically extracts .zip submissions
  • 📄 Single JSON — Also accepts individual .json files
  • 📊 Per-Task Scoring — Returns overall score + per-task breakdown with feedback

Installation

pip install ADFMentor

Or from source:

git clone https://github.com/yourusername/ADFMentor.git
cd ADFMentor
pip install -e .

Quick Start

from ADFmentor import ADFMentor

mentor = ADFMentor(api_key="your-gemini-api-key")

questions = """
Part 1 — Create a pipeline named API_Customers_To_SQL that copies CSV data from HTTP API to Azure SQL.
Part 2 — Create a dynamic pipeline that processes multiple CSV files from an API folder.
"""

prompt = """Evaluate the ADF pipeline for correctness, best practices, and requirements alignment.
Provide a score out of 100 and concise feedback."""

result = mentor.evaluate(
    answer_path="submission.json",   # or "submission.zip"
    questions=questions,
    prompt=prompt,
)

print(f"Score: {result['score']}/100")
print(f"Feedback: {result['feedback']}")

for task in result.get("task_mapping", []):
    print(f"\n  File: {task['file']}")
    print(f"  Task: {task['identified_task']}")
    print(f"  Score: {task['score']}/100")
    print(f"  Feedback: {task['feedback']}")

Response Format

{
  "score": 85,
  "feedback": "Overall summary...",
  "task_mapping": [
    {
      "file": "taskA.json",
      "identified_task": "Part 1 — Static API CSV Pipeline",
      "score": 90,
      "feedback": "Pipeline correctly implements..."
    },
    {
      "file": "taskB.json",
      "identified_task": "Part 2 — Dynamic Pipeline",
      "score": 80,
      "feedback": "Good structure but missing..."
    }
  ]
}

Package Structure

ADFmentor/
├── __init__.py        # Package entry point
├── core.py            # ADFMentor class with evaluate() method
├── utils.py           # File handling, ZIP extraction, JSON reading
└── models/
    ├── __init__.py
    ├── model.py       # Abstract base model
    └── gemini.py      # Google Gemini implementation

API Reference

ADFMentor(api_key, model_name="gemini-2.0-flash-exp")

Initialize the mentor with your Gemini API key.

mentor.evaluate(answer_path, questions, prompt) -> dict

Parameter Type Description
answer_path str Path to a .json file or .zip archive
questions str Full lecture task descriptions (all tasks)
prompt str Evaluation criteria for the AI

Returns a dict with score, feedback, and task_mapping.

Configuration

Create a .env file:

API_KEY=your_gemini_api_key_here
from dotenv import load_dotenv
import os

load_dotenv()
mentor = ADFMentor(api_key=os.getenv("API_KEY"))

Requirements

License

MIT License — see LICENSE file for details.

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

adfmentor-0.4.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

adfmentor-0.4.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file adfmentor-0.4.0.tar.gz.

File metadata

  • Download URL: adfmentor-0.4.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for adfmentor-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3a46d41769f01346c236d371a4816ec44f11e4045c7572f55078482159b20cd6
MD5 4682eb0ce07cbddf460069681bc9becb
BLAKE2b-256 1223899e4ef236da0809fd19053ce3ac732c4028cb98e649b99d4748d60a618f

See more details on using hashes here.

File details

Details for the file adfmentor-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: adfmentor-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for adfmentor-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc90ef9d2b809af06457c7973153c5aa858795eac8697e9a06dd57620e862860
MD5 ae6812f01e975a566c40f5ec1c091ef1
BLAKE2b-256 056ffab6befa5e61892b3324757daf118c8781941c4a50dd8da845e8dfbe4e0c

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