Product price prediction with frontier LLM fine-tuning
Predicts product prices from descriptions, comparing classic ML baselines, frontier LLMs and fine-tuned GPT-4o mini.
What it does
Amazon product data is scrubbed and curated into a balanced price dataset and uploaded to the Hugging Face Hub. A tester class scores every predictor by absolute price error, starting with random, linear regression, bag-of-words, SVR and Random Forest baselines and then GPT-4o mini and Claude prompts. GPT-4o mini is then fine-tuned through the OpenAI API from JSONL files, with the run tracked in Weights & Biases.
What was built
- 01
Amazon product data is cleaned and balanced across price ranges, then pushed to the Hugging Face Hub.
- 02
Tester class computes the absolute error of each prediction for every model.
- 03
Baselines: random guesses, linear regression on engineered features, CountVectorizer bag-of-words, SVR and Random Forest.
- 04
GPT-4o mini, GPT-4 and Claude are prompted for prices and scored with the same tester.
- 05
JSONL training files launch an OpenAI fine-tuning job; training and validation loss are tracked in Weights & Biases.
The pipeline, layer by layer
Five layers, one pipeline.
L1Data
- Amazon product data
- Curation and balancing
- HF Hub dataset
L2Baselines
- Feature engineering
- Linear, SVR, Random Forest
L3Frontier
- GPT-4o mini and Claude
L4Fine-tuning
- OpenAI fine-tuning job
- W&B tracking
L5Evaluation
- Price error tester