AI Adoption GuideGovernmentInspect
Risk-based inspection scheduler
ML prioritizes inspection targets by predicted non-compliance probability and violation severity, optimizing deployment of scarce field teams.
Government processPlanFundAuthorizeDeliverInspectEnforceReportClose
By Don, DoneThat’s AI coach · updated
The scheduled visit cites the factor and the window
A scheduled inspection is complete when the visit record names the site, the crew you assigned, the risk factor that justified the stop, and the statutory window that makes the stop due. If the model did not return a factor, leave the factor field empty. If the permit file or inspection code did not return a window, leave the due-date field empty. Do not invent a non-compliance percent to make the row look finished. The scheduler still assigns the crew.
The rank is only a sort order. A supervisor who opens the visit later should read a reason that matches the factor table, not a number with no cause attached. That is the same discipline used in risk scoring for high-impact cases: a score without a named factor is not a reason to send a team.
Load the factor table and the statutory window first
Open the factor table before you open the calendar. The table is the closed list of reasons a site is allowed to rise in the queue: a prior confirmed violation of a given class, an overdue follow-up after a notice, a license type the code treats as higher consequence, a complaint that already met the intake threshold. Load only factors your ordinance or inspection manual already recognizes. If a model emits a label that is not in that table, do not paste it onto the visit.
Load the statutory window in the same pass. The window is the interval the code already gives you: the annual food-facility cycle, the biennial housing inspection, the follow-up period after a stop-work order, the complaint response clock. The window is not a date the model guessed. If the source system has no window for that license, the field stays blank.
Do this load as a join on the site identifier. Bring license type, last completed inspection, open enforcement actions, the factor table, and the window into one working set before anyone sorts. Write the factor identifier and the window identifier onto each row so scheduling is a copy, not a rewrite. Your permitting suite and your analytics workbook, whether that is Accela, Tyler, Palantir, Microsoft, or another system in that class, may already hold pieces of the join. Retrieve the license and the clock from the system of record. Retrieve the rank from the workbook. None of them replaces the join.
If sensors or imagery later feed a factor, they still have to land in the table as a named reason. A computer vision site auditor or a sensor-based infrastructure anomaly detector can flag a condition. Until that flag is mapped to an allowed factor, it does not belong on the visit record.
Check the join for orphans before you rank. A site with a window and no factor can still be due work. A site with neither does not get an invented clock.
Schedule with cites, then assign the crew yourself
Sort the working set by predicted non-compliance probability and by the severity class your code already uses for that factor. Create the visit. Copy the factor text from the table onto the visit. Copy the window from the permit or code onto the visit. Then assign a crew from the actual roster: who is certified for that program, who is already in that district, who is not on leave, who is not already at a hearing.
The ranked list is not the roster. Treating the list as if it were staffed is a failure mode. A model does not know who holds the food-program credential, who is in court, or who already has a full day. You assign. If capacity is tight, assign the people you have and leave remaining visits unstaffed rather than pretending the rank filled the calendar. Questions about next week's complaint volume belong to a service demand forecaster, not to the ranker that ordered this week's sites.
When you cite, use the table wording, not a paraphrase you coined at the desk. "Repeat temperature-control findings in the last completed cycle" and "annual food-code inspection due this quarter" are cites. A rank integer is not. If either cite is missing, the corresponding field stays blank and the visit can still go out when the remaining cite, or a separate complaint or referral path, supports it.
Do not let the sort rewrite the window. A high rank does not pull a visit forward of a statutory clock you do not have, and a low rank does not cancel a window that is already open. Ranking changes order among sites that are eligible. It does not create eligibility.
A grocery, a school kitchen, and a food truck
Three food-facility rows in the same district for the same week. This is a walkthrough of the fields, not a measured program result.
The grocery has a factor in the table: confirmed temperature-control violations on the last completed inspection, which your manual treats as a high-severity class. It also has a window: the annual food-code inspection is due this quarter. You schedule the visit, write both cites onto the record, and assign a food-program inspector already routed through that corridor.
The school kitchen has a window: the annual inspection is due this month. The model returned a rank but no factor that exists in your table. You schedule the visit because the window makes it due. You leave the factor field empty. You do not type a non-compliance percent to explain the rank. You assign the school-program inspector from the roster.
The food truck has a high rank and neither cite. No allowed factor mapped. No statutory window in the license file for this cycle. You can keep it on a watch list. You do not invent a due date. You do not send a crew on the rank alone. If a complaint later meets intake, that complaint becomes the window or the factor, and then you schedule.
The scheduler's job in all three rows is the same. Write only what the table and the file supplied. Assign people from the roster. Refuse to decorate empty fields.
What breaks the calendar
A rank with no factor. If you copy the rank onto the visit and skip the factor field, the crew cannot tell what to look for, and a later review cannot tell why the stop happened. Leave the factor blank, or hold the row out of the risk-ranked batch until a mapped factor exists. Due work can still be scheduled from the window alone.
Treating the list as the roster. Auto-filling inspector names from rank order will double-book specialists and send the wrong credential. Confirm availability against leave, hearings, and program certifications before you lock the day.
Inventing a due date. A guessed date becomes a false statutory claim, and field staff treat it as a legal deadline. Leave the due-date field empty. If you still need a stop, record complaint, referral, or supervisor-directed in the fields those reasons already use.
Do not fill a blank with a made-up non-compliance percent. Empty stays empty. If a factor appears that your table does not list, send it back to whoever maintains the mapping instead of rewriting the label at the desk.
Keep platforms in their lane
Accela, Tyler, Palantir, and Microsoft are the class of systems an inspection shop already uses to hold licenses, cases, workbooks, and field assignments. Use them to retrieve the window, store the visit, and push the assignment. Do not treat any of them as the author of a factor that is not in your table. Do not treat a dashboard rank as a staffed route.
The quality test is narrow. A scheduled visit that cites the risk factor and the statutory window, with blanks left blank when either is missing, and a human-assigned crew. That is the record you can defend.
Is this worth automating for you?
Whether this pays back depends on how much time it takes your team today. Most teams estimate that from memory, and the estimate is usually wrong in one direction or the other.
DoneThat reconstructs where the time actually went, with no timers to forget, so you can measure the baseline before committing to a project and check the gain afterward.
Measure the baseline first