Kentucky auto insurance book of business
Insurance United States
Checks an insurer’s weekly book of business files before they’re sent to the Kentucky Insurance Verification System, then lists and counts the policies in them: every file’s name, trailer row and record count, every row’s length, fields and VIN check digit, and the rows of a file against each other.
From the KentuckyIVS Kentucky Automobile Insurers Reporting Guide, version 1.2, September 2026, and the VIN rules in 49 CFR 565.15.
- 37validation rules
- 17pipeline stages
- 27fields and file details
- 3 minto build and check
See it in Quantemplate
The pipeline

The validations

Policies

What it checks
37 rules 24 Fail 13 Warning
- The fileThe file name, the date in it, a production rather than a test file, and one trailer row at the end 3 Fail, 1 Warning 4
- Trailer rowThe record count as a whole number and equal to the detail rows, and the process date valid and the same as the date in the file name 3 Fail, 1 Warning 4
- Every row300 characters, a carriage return and line feed at the end, and filler of spaces 3 Fail 3
- Policy and datesThe policy type, the NAIC number and the one in the file name, the policy number, and the effective date valid and not after the file was made 5 Fail, 1 Warning 6
- VINA VIN on every vehicle-specific row and none on the others, 17 letters and digits without I, O or Q, and the check digit 2 Fail, 3 Warning 5
- CustomerThe last name or organisation, a first name or a sign it’s an organisation, the FEIN, address, city, state and ZIP code, and the commercial and comprehensive indicators 8 Fail, 2 Warning 10
- Rows against each otherEach customer, vehicle and policy once, one effective date for a vehicle on a policy, each vehicle on one policy, and one policy type and commercial indicator for each policy 0 Fail, 5 Warning 5
A rule set to Fail marks its rows as failed, and any failure blocks Auto Export if you set it up. Warnings are only reported. Validation never removes a row. Every rule and its formula is listed in VALIDATIONS.md in the download.
How the pipeline works
- Stages 1–2 Prepare and stack the book of business Detect headers, tidy every column (trim, collapse spaces and upper-case) and stack the uploads
- Stage 3 Row keys Work out each date’s year, month and day, mark the trailer rows, key each row by its file, policy, vehicle and customer, and work out the VIN’s length and check digit
- Stages 4–8 Files, duplicates, vehicles and policies Each file’s detail rows, trailer rows and last row, each customer, vehicle and policy’s rows, each vehicle’s effective dates and policies, and each policy’s types
- Stages 9–13 Joins Join all five to each row
- Stages 14–15 Check book of business Turn blank counts into 0, mark the row that carries each file’s own checks, label the policy type and line, and run the rules
- Stages 16–17 Policies and summary One row for each policy with its rows, vehicles and effective dates, and the policies, vehicles and rows counted by NAIC number, policy type and line
What’s in the download
- The 37 rules as JSON, and a table of every rule with its formula and why
- A Python script that turns the fixed-width book of business files into one CSV file for the pipeline
- Good data for a fictional Kentucky insurance group’s personal and commercial auto files, from a Louisville couple with two vehicles to an excavating company’s three trucks and a courier’s fleet policy, and test files with a file built to fail each rule
- The number of rows each rule should flag on the test files, and the policies and summary the good data should give
- A template file the Quantemplate build skill reads to build the pipeline and check the results, and a snapshot of the finished pipeline
The guide isn’t included. Download the Kentucky Automobile Insurers Reporting Guide from the Kentucky Transportation Cabinet.
Build it
- Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
- With Claude in Chrome signed in to Quantemplate, ask Claude Code:
Build the Kentucky auto insurance book of business pipeline from the ky-insurance-bob folder.
- Claude creates the datasets and stages, runs the test data and checks every rule’s result. This takes around 3 minutes.
The agent builds through the Quantemplate app’s own API in your browser. That API isn’t published, so if a release changes it, the build stops and tells you what went wrong. Review what the agent builds before you rely on it.
Using your book of business
- Make the week’s book of business files as you would for KentuckyIVS, one for each NAIC number, and keep the plain-text files from before they’re encrypted.
- Turn them into one CSV file with the converter in the download:
python3 kyivs_bob_to_csv.py ky-bob.csv 12345_20261204_P.txt, listing every file. It needs Python 3 and nothing else. - Choose the CSV file in stage 1, Prepare book of business, in place of the test file. Or give it the test file’s name,
ky-bob-test-file.csv: an upload with the same name replaces it, and the stage keeps using it. - There’s no date to set: the pipeline takes each file’s date from its name.
- Correct anything a Fail rule flags, and check the warnings. Then encrypt the files and send them to KentuckyIVS.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- Registrations aren’t checked. KentuckyIVS matches each VIN against Kentucky’s registrations, which the pipeline can’t see, so it only checks a VIN’s form and check digit. That catches most typing errors.
- It can’t tell whether the book is complete. The file has no vehicle type, so it can’t see whether every active policy is there, or a vehicle that doesn’t need reporting has been left in.
- Values too long for their field are cut off when the file is made, and the converter can’t tell. Check long names and addresses in your extract.
- ZIP codes and FEINs are read as numbers, so a leading 0 is dropped and a 4-digit ZIP code passes.
- Web services aren’t covered. Insurers with 1,000 or more vehicles in Kentucky also host a verification web service that KentuckyIVS queries. The pipeline doesn’t check it, or the PGP encryption and SFTP transfer.
- It’s for Kentucky only. Other states that follow the IICMVA model have their own book of business files, with different layouts.
- The test data is fictional.
- The build doesn’t set up Auto Run, Auto Export or feeds.
- The agent works through the app in your browser, so changes someone makes in the app whilst it’s working can trip it up.