Course project · TECHIN 513, University of Washington

RevAI

Is this used car fairly priced? Wayne and I built a Chrome extension that reads a CarGurus listing, asks a model we trained, and puts a suggested price on the page. The model scored badly. Finding out why taught me more than a good score would have.

My role
Co-builder, across data, modeling and the extension
Timeline
Four weeks, finished Mar 2025
Team
Wei-En Wayne Tsai and me, working side by side
Built with
Python, scikit-learn, Flask, Chrome extension (Manifest V3)
A CarGurus listing for a 2016 Honda Accord LX priced at $14,600, marked Good Deal and $409 below market. Red annotations connect the listing's Features panel to a box on the page reading RevAI Suggested Price: $17309.6.
From our live demo slide. The red annotations are ours. Dealer contact details are blurred.

Problem

A listing price is hard to judge from the listing alone, right when a buyer needs to decide.

Bet

A second, independent number, placed on the listing itself, is more useful than a separate valuation site.

Built

A cleaning and training pipeline, three compared models, a local API, and the extension.

Lesson

Three cars out of 802 caused 96% of the squared error. Read the errors before you trust the score.

OverviewBy the numbers

Four weeks, from a CSV to a price on a live listing.

The first four numbers come from our project notebook. The last comes from re-running that notebook later, with the same code, data and random seed, to look at what the headline score was hiding.

Measured in the projectRe-run same code, checked later
4,009used-car listings in the datasetMeasured
3regression models trained and comparedMeasured
0.11R² on the test set for the best modelMeasured
$19Kaverage miss (MAE) for the best modelMeasured
$5.7Kmedian miss, on a market with a $31,000 median priceRe-run
  1. Week 1Understand the dataExploration, cleaning and filtering
  2. Week 2Find a modelThree models trained and evaluated
  3. Week 3Build the extensionRead listings, begin connecting the model
  4. Week 4Put it togetherFinish the integration, demo it live
The product

A second opinion, where the decision happens.

Buyers already get a dealer's price and, on CarGurus, the site's own deal rating. We wanted an independent estimate beside them, without asking anyone to leave the page and retype a car's details. Wayne and I built each stage together.

  1. 1. Open a listingThe extension wakes up on CarGurus vehicle pages, including in-page navigation.
  2. 2. Read the carA content script pulls make, model, year, mileage and other specs from the page.
  3. 3. Ask the modelIt posts them as JSON to a Flask endpoint, /predict, running on our machine.
  4. 4. Run the pipelineThe saved preprocessor encodes the car, and the Random Forest returns a price.
  5. 5. Show the answerA suggested price appears in a box on the listing page.
Data

Messy text in, more columns than cars out.

We used a public Kaggle dataset of 4,009 listings: brand, model, year, mileage, fuel, engine, transmission, colors, accident history, title status and price. Most of it was text that needed cleaning before any model could read it.

  • Mileage“73,049 mi.” became 73049
  • Price“$30,510” became 30510
  • Fuel type, 170 missingFilled with the most common value
  • Accident history, 113 missingMarked “Unknown”
  • Clean title, 596 missingMarked “Unknown”
  • Numbers and categoriesScaled, and one-hot encoded
  • Split80% to train, 20% to test

The catch

3,208 columns

for 3,207 training cars. The data holds 1,898 distinct models and 1,146 distinct engine strings, and one-hot encoding gives each its own column. Many only ever describe one or two cars, which gives a model plenty of ways to memorize instead of generalize. I can see that now. At the time, we moved on to modeling.

Results

The best model explained 11% of the variance.

We trained a linear baseline and two tree ensembles on the same split. Random Forest won, narrowly, so it went into the extension. We reported the weak score as it was, and listed it as a limitation.

Test-set results for the three models
ModelAverage miss (MAE)RMSER²
Random Forest Used in the extension$18,999.89$134,823.660.11
Gradient boosting$22,564.81$135,548.230.10
Linear regression Baseline$19,713.61$137,995.020.07
Looking backRe-run

Three cars were doing most of the damage.

An RMSE of $134,823 against a $19,000 average miss is a clue that a few huge errors dominate. Our own scatter plot showed them, and I did not follow up during the project. So I re-ran the notebook later, and the metrics reproduced to the cent. Then I asked which cars the error came from.

Listed price against predicted price

Test carThe three carsPerfect prediction
All 802 test cars
$0$0$1M$1M$2M$2M$3M$3MPredictedListed pricePorsche Carrera GT$1.6M, predicted $139KBugatti Veyron$1.95M, predicted $141K2005 Maserati Quattroporte$2.95M, predicted $23K
Zoomed in: the cars under $250K
$0$0$50K$50K$100K$100K$150K$150K$200K$200K$250K$250KPredictedListed price

Hover or tap a dot to see the car. The same predictions appear in both charts; the second shows 790 of the 802 test cars, those with a listed and predicted price under $250K.

The same predictions scored with and without the three cars
Same predictionsAll 802Without the 3
R²0.110.70
Average miss (MAE)$18,999$11,310
RMSE$134,823$26,902
Median miss$5,710$5,669
  • 96% of the squared error came from those 3 cars. R² punishes large misses hard, so three cars decided the score for 802.
  • One is almost certainly a bad record. The dataset lists a 2005 Maserati Quattroporte with 32,000 miles at $2,954,083. Our model said $22,983, which looks far more plausible. The biggest “error” in the test set was probably the data's.
  • This is a better diagnosis, not a better model. Nothing was retrained. Removing rows after the fact only shows where the problem lives. A typical miss of about $5,700 is still too wide to call a listing fair or overpriced with confidence.

What the model paid attention to

Other featuresLuxury brand or model

Mileage leads, but six luxury signals in the top ten add up to 36%, more than mileage's 30.5%. Model year, which any buyer would expect to matter, sits at 3.4%. Chasing a few very expensive cars pulled the model's attention away from the ordinary cars people actually shop for.

Live demo

On a real listing, the gaps became product problems.

Connecting a model to a live page exposes things a test set never will. In our demo, the Honda Accord above is listed at $14,600, and CarGurus rates it $409 below market. RevAI suggested $17,310, about $2,300 over the market figure that implies. That is one listing, not a trend, but it fits what we found next.

// Request captured in DevTools
// during the demo session: a 2020 Mazda3
brand:         "Mazda"
model:         "MAZDA3"
model_year:    2020
milage:        32292
fuel_type:     "Gasoline"
transmission:  "Automatic"
ext_col:       "Jet Black Mica"
int_col:       "Black"
engine:        "Unknown"
accident:      "None reported"
clean_title:   "Yes"
listing_price: 0
Fields in orange are the ones discussed here. They are transcribed from our demo slide.
  • Missing data quietly became good news. The extension sent “None reported” when it could not read accident history, and always sent a clean title. So the model priced an unknown car as a best-case car, which pushes estimates up.
  • The page itself was a dependency. In this capture the listing price came through as 0, and engine as “Unknown”. Reading specific page elements means a site's markup can break the product without warning.
  • The data had a date on it. The dataset was collected during the post-pandemic price spike, which built high prices into the model's idea of fair.
  • Unusual cars looked like luxury cars. Newer or less common cars were sometimes priced as if they were luxury vehicles. As a stopgap, we steered users to CarGurus search filters for older cars, closer to what the model had seen.
DesignScope

What we built, and what stayed on paper.

We designed a fuller panel than the box in our demo: listed price, predicted price, a verdict and the deviation between them, plus settings. The design shows sample values, not model output. The panel is in our code, the settings are not.

Design mock titled RevAI Price Analysis. A popup shows a BMW X5 2023 with a Fair Price tag, listed at $45,000, predicted at $43,500, with a +3.4% deviation and Save Listing and View Details buttons. A settings panel below offers a floating price badge toggle, a model selector and a 15% price alert threshold.
Design mock with sample values.

Built

  • Cleaning, training and evaluation in one notebook
  • Saved preprocessor and Random Forest model
  • Chrome extension that reads CarGurus listings
  • Page-change detection, loading and error states
  • Suggested price on a live listing, through a local Flask API
Reflection

What I took from this one.

Read the errors before the score.

One number said the model was nearly useless. Looking at individual misses told a different story, and pointed to a specific fix.

Look at your worst records.

Ten minutes sorting by price would have flagged the $2.95M Quattroporte in week one. Data checks are cheap compared with what they save.

Defaults are product decisions.

“None reported” felt like a harmless fallback in code. To a buyer, it quietly inflates the price they see. An unknown should stay unknown.

A demo is a test.

Putting the model on a live page surfaced problems that its metrics could not: broken fields, stale market data, and what a verdict needs to be trusted.

If we took it further