As Immigration and Customs Enforcement was racing to add 10,000 new officers to its force, an artificial intelligence error in how their applications were processed sent many new recruits into field offices without proper training, according to two law enforcement officials familiar with the error.

The AI tool used by ICE was tasked with looking for potential applicants with law enforcement experience to be placed into the agency’s “LEO program” — short for law enforcement officer — for new recruits who are already law enforcement officers. It requires four weeks of online training.

Applicants without law enforcement backgrounds are required to take an eight-week in-person course at ICE’s academy at the Federal Law Enforcement Training Center in Georgia, which includes courses in immigration law and handling a gun, as well as physical fitness tests.