[ type ]
individual internship
[ platform ]
automation tool
[ timeline ] may — aug 2025
[ stack ]
node.js puppeteer openai api fuse.js sheetjs

[ guardian malaysia ]

965k searches returning the wrong thing. built the pipeline that found out why.

[ problem ]

guardian's e-commerce search had no systematic way to know when a search term was failing across a 965k dataset. manual review wasn't scalable — there was no visibility into bad queries, malformed inputs, or injection attempts at that volume.

965k search terms no visibility ? wrong results / no results returned silently no visibility at 965k scale
[ solution ]

a layered classification pipeline — rule engine first to handle obvious cases cheaply, ai fallback via gpt-4.1-mini for anything ambiguous. outputs to excel with cause label and confidence score per term, making the results immediately actionable.

INPUT search term CLASSIFY rule engine classified → fast path ambiguous AI FALLBACK gpt-4.1-mini OUTPUT excel report cause label confidence score
[ decisions ]

rule logic handles obvious cases to cut api cost. gpt-4.1-mini is only called when the engine can't classify confidently — this kept costs predictable and the pipeline fast. fuse.js handles fuzzy matching for near-miss terms before escalating to ai.

[ impact ]

manual review cut to near zero. 203 sql injection attempts surfaced as a byproduct of building the classifier — a result that wasn't the original brief but became a key deliverable. the pipeline now runs end-to-end without human intervention.

965k

search terms classified

203

SQL injection terms identified

5

classification categories — fully automated

[ excel output ]
[ pipeline log ]
[ classification sample ]
[ pipeline overview ]
← back to project list