HomeProjectsLLM Shipper Profiles — Adaptive Decision-Rule Generation
May 2026Solo builderResearch
LLM Shipper Profiles — Adaptive Decision-Rule Generation
End-to-end system that generates literature-grounded crowd-shipper decision rules from traveller profiles, using RAG over a behavioural literature knowledge base + gpt-4o-mini. Direct implementation of the methodology named verbatim in the Aston PhD project description.
Highlights
- Built before submission to demonstrate the methodology rather than claim it
- Repurposes the November 2024 CV-JD Suitability Checker codebase — proves the architecture
Problem
The Aston PhD posting calls for 'use of Large Language Models (LLMs) to generate adaptive user profiles and decision rules' — a methodology with no public reference implementation. Existing crowd-shipping decision models rely on fixed-utility discrete choice, missing the heterogeneity LLMs can capture.
Approach
- Pydantic schemas for TravellerProfile, ParcelRequest, DecisionRule
- Curated knowledge base of 10 chunks from Punel & Stathopoulos (2017), Archetti et al. (2016), Le et al. (2019), Sampaio et al. (2020)
- RAG retriever (sentence-transformers cosine + sklearn TF-IDF fallback)
- LLM generator (gpt-4o-mini) producing literature-cited DecisionRule JSON with reasoning
- Dual-mode design: deterministic rule-based fallback when no API key, so reviewers can rerun offline
Stack
PythonOpenAI gpt-4o-minisentence-transformersscikit-learn (TF-IDF)PydanticJupyter
Outcome
- 13 files, 1449 lines, publicly available on GitHub
- Demo notebook: 5 walkthrough examples + aggregate threshold distribution
- Integration hook into Mini-Digital-Twin agent-based simulation layer
Tags