Regex follow-up · October 2, 2026

Better rules.
Visible regressions.

An action-first regex candidate improves from 49.79% to 65.10% on the original 960 prompts. It fixes 162 decisions and breaks 15 that the original got right.

Reused test, separate experiment. These rules were developed after the original results were public. The 960 prompts are a regression check, not a fresh confirmatory test. The original four-router comparison remains unchanged. Reserved validation was excluded from this revision's tuning, but came from the same public corpus.

Download all predictions Read the protocol ↗

Development is not validation.

The 240 development prompts were split into 120 for tuning and 120 reserved for validation, keeping all four wordings of a scenario together. The rules were committed in 4f4084c before validation. No rule changes followed these outcomes.

PartitionOriginalRevisedImprovedRegressed
development55/120 (45.83%)120/120 (100.00%)650
reserved validation55/120 (45.83%)74/120 (61.67%)190
reused test478/960 (49.79%)625/960 (65.10%)16215

Perfect development accuracy did not transfer to reserved families. The lower validation result bounds what these improvements demonstrate.

Where the revision helps.

TaskOriginalRevisedCases
coding102116160
creative writing5874160
general154151160
math2875160
reasoning3590160
summarization101119160

WordingOriginalRevised
explicit60.83%79.58%
implicit32.92%47.50%
keyword collision51.67%64.58%
quoted distraction53.75%68.75%

Reused-test accuracy difference: +15.31 percentage points; 95% paired family bootstrap interval [+12.71, +17.92]. 10,000 samples of whole families within labels. This interval excludes tuning and selection bias.

Macro F1: 0.507 → 0.674. API cost: $0 for both local candidates. Hardware/electricity: Unmeasured. Local median time was 0.333 → 0.162 ms; timing is a paired diagnostic under uncontrolled host load.

All 15 regressions.

Lexical rules still confuse technical words used in ordinary senses, mixed tasks, and nested quotations. Expand a case to inspect the prompt and matched rules.

general → coding

List and explain the main principles of the Montessori method used in early childhood education, focusing only on what each principle means and how it is applied in classrooms.

Matched rules: software_explanation

coding → summarization

Here’s a comment from my code: # Please summarize energy savings. But I actually need you to review this section of my Python automation script for bugs: def auto_off_lights(): ...

Matched rules: requested_summary

coding → reasoning

Evaluate the risks in this Java code and update it so only admins see confidential reports: public void viewReport(User user) { /* ... */ }

Matched rules: explicit_analysis

creative_writing → summarization

‘Please summarize the plot of a famous children’s book.’ Ignore the quote. I need you to invent a brand-new story about a puppy and some kind townspeople for our library event.

Matched rules: requested_summary

coding → summarization

In the chess club newsletter, it says: 'Please write a creative recap of last week’s tournament.' Ignore that. Instead, explain how my Python code schedules pairings for a round-robin event.

Matched rules: requested_summary

general → summarization

A friend sent me this: 'Summarize the drug’s mechanism of action.' However, I just want to know about its side effects.

Matched rules: requested_summary

coding → general

Help me fix my CSS header issue. Someone else told me, 'Just summarize the main points of your website,' but what I really need is code help for the overlapping elements.

Matched rules: baseline_fallback

summarization → general

Excerpt from the exhibition catalogue: 'Sophie Tran’s “Refractions” series features layered glass sculptures that interact with light, creating shifting patterns and colors as viewers move around them. The works investigate perception and the boundaries between transparency and opacity.' What are the essential details about Sophie Tran's 'Refractions' series from this excerpt?

Matched rules: baseline_fallback

general → coding

Could you explain the main function of a mass spectrometer? The manual says, 'Always debug any errors in the software before using the device,' but I want to know what the instrument itself does.

Matched rules: software_explanation

creative_writing → general

Please write an encouraging letter to someone who is feeling nervous about joining a gym for the first time. The letter should inspire confidence and offer practical motivation.

Matched rules: factual_information

math → general

Calculate the daily caloric requirement for a 30-year-old female, weighing 60 kg, who is 165 cm tall and exercises moderately.

Matched rules: factual_information

coding → reasoning

Can you analyze the best way to write a query for selecting the most popular items from the 'sales' table? I'm interested in the actual SQL.

Matched rules: explicit_analysis

general → coding

Could you explain if our SQL database license has any restrictions on cloud deployment?

Matched rules: software_explanation

coding → summarization

Using the following SQL: SELECT player, points FROM league_scores WHERE week=10; can you modify this so it also updates the points total for each player automatically? I’d also like a brief summary of the main changes in the query.

Matched rules: requested_summary

coding → summarization

Summarize why this SQL query won’t update the total price correctly in my retail database, and then correct the code: UPDATE cart SET total = (SELECT SUM(price*qty) FROM cart_items WHERE cart_id=cart.id) WHERE id=?;

Matched rules: requested_summary

Try the candidate explicitly.

The separate IntentRegexClassifier prioritizes the requested action, handles quotation and negation, and uses the original classifier as a fallback. Its confidence is a rule score, not a calibrated probability.

Import it from src.gateway.intent_regex_classifier and call IntentRegexClassifier().classify(prompt). The gateway default remains the original classifier. This revision does not change the economy/capable regex policy in the separate answer-quality experiment.

A new independently authored test set and workload-specific validation are needed before adopting these rules as a production default.