DOGE Developed Error-Prone AI Tool To ‘Munch’ Veterans Affairs Contracts

This story first appeared at ProPublica. ProPublica is a Pulitzer Prize-winning investigative newsroom. Sign up for The Big Story newsletter to receive stories like this one in your inbox.

As the Trump administration prepared to cancel contracts at the Department of Veteran Affairs this year, officials turned to a software engineer with no health care or government experience to guide them.

The engineer, working for the Department of Government Efficiency, quickly built an artificial intelligence tool to identify which services from private companies were not essential. He labeled those contracts “MUNCHABLE.”

The code, using outdated and inexpensive AI models, produced results with glaring mistakes. For instance, it hallucinated the size of contracts, frequently misreading them and inflating their value. It concluded more than a thousand were each worth $34 million, when in fact some were for as little as $35,000.

The DOGE AI tool flagged more than 2,000 contracts for “munching.” It’s unclear how many have been or are on track to be canceled — the Trump administration’s decisions on VA contracts have largely been a black box. The VA uses contractors for many reasons, including to support hospitals, research and other services aimed at caring for ailing veterans.

VA officials have said they’ve killed nearly 600 contracts overall. Congressional Democrats have been pressing VA leaders for specific details of what’s been canceled without success.

We identified at least two dozen on the DOGE list that have been canceled so far. Among the canceled contracts was one to maintain a gene sequencing device used to develop better cancer treatments. Another was for blood sample analysis in support of a VA research project. Another was to provide additional tools to measure and improve the care nurses provide.

ProPublica obtained the code and the contracts it flagged from a source and shared them with a half dozen AI and procurement experts. All said the script was flawed. Many criticized the concept of using AI to guide budgetary cuts at the VA, with one calling it “deeply problematic.”

Cary Coglianese, professor of law and of political science at the University of Pennsylvania who studies the governmental use and regulation of artificial intelligence, said he was troubled by the use of these general-purpose large language models, or LLMs. “I don’t think off-the-shelf LLMs have a great deal of reliability for something as complex and involved as this,” he said.

Sahil Lavingia, the programmer enlisted by DOGE, which was then run by Elon Musk, acknowledged flaws in the code.

“I think that mistakes were made,” said Lavingia, who worked at DOGE for nearly two months. “I’m sure mistakes were made. Mistakes are always made. I would never recommend someone run my code and do what it says. It’s like that ‘Office’ episode where Steve Carell drives into the lake because Google Maps says drive into the lake. Do not drive into the lake.”

Though Lavingia has talked about his time at DOGE previously, this is the first time his work has been examined in detail and the first time he’s publicly explained his process, down to specific lines of code.

Lavingia has nearly 15 years of experience as a software engineer and entrepreneur but no formal training in AI. He briefly worked at Pinterest before starting Gumroad, a small e-commerce company that nearly collapsed in 2015. “I laid off 75% of my company — including many of my best friends. It really sucked,” he said. Lavingia kept the company afloat by “replacing every manual process with an automated one,” according to a post on his personal blog.

Lavingia did not have much time to immerse himself in how the VA handles veterans’ care between starting on March 17 and writing the tool on the following day. Yet his experience with his own company aligned with the direction of the Trump administration, which has embraced the use of AI across government to streamline operations and save money.

Lavingia said the quick timeline of Trump’s February executive order, which gave agencies 30 days to complete a review of contracts and grants, was too short to do the job manually. “That’s not possible — you have 90,000 contracts,” he said. “Unless you write some code. But even then it’s not really possible.”

Under a time crunch, Lavingia said he finished the first version of his contract-munching tool on his second day on the job — using AI to help write the code for him. He told ProPublica he then spent his first week downloading VA contracts to his laptop and analyzing them.

VA press secretary Pete Kasperowicz lauded DOGE’s work on vetting contracts in a statement to ProPublica. “As far as we know, this sort of review has never been done before, but we are happy to set this commonsense precedent,” he said.

The VA is reviewing all of its 76,000 contracts to ensure each of them benefits veterans and is a good use of taxpayer money, he said. Decisions to cancel or reduce the size of contracts are made after multiple reviews by VA employees, including agency contracting experts and senior staff, he wrote.

Kasperowicz said that the VA will not cancel contracts for work that provides services to veterans or that the agency cannot do itself without a contingency plan in place. He added that contracts that are “wasteful, duplicative or involve services VA has the ability to perform itself” will typically be terminated.

Trump officials have said they are working toward a “goal” of cutting around 80,000 people from the VA’s workforce of nearly 500,000. Most employees work in one of the VA’s 170 hospitals and nearly 1,200 clinics.

The VA has said it would avoid cutting contracts that directly impact care out of fear that it would cause harm to veterans. ProPublica recently reported that relatively small cuts at the agency have already been jeopardizing veterans’ care.

The VA has not explained how it plans to simultaneously move services in-house, as Lavingia’s code suggested was the plan, while also slashing staff.

Many inside the VA told ProPublica the process for reviewing contracts was so opaque they couldn’t even see who made the ultimate decisions to kill specific contracts. Once the “munching” script had selected a list of contracts, Lavingia said he would pass it off to others who would decide what to cancel and what to keep. No contracts, he said, were terminated “without human review.”

“I just delivered the [list of contracts] to the VA employees,” he said. “I basically put munchable at the top and then the others below.”

VA staffers told ProPublica that when DOGE identified contracts to be canceled early this year — before Lavingia was brought on — employees sometimes were given little time to justify retaining the service. One recalled being given just a few hours. The staffers asked not to be named because they feared losing their jobs for talking to reporters.

According to one internal email that predated Lavingia’s AI analysis, staff members had to respond in 255 characters or fewer — just shy of the 280 character limit on Musk’s X social media platform.

Once he started on DOGE’s contract analysis, Lavingia said he was confronted with technological limitations. At least some of the errors produced by his code can be traced to using older versions of OpenAI models available through the VA — models not capable of solving complex tasks, according to the experts consulted by ProPublica.

Moreover, the tool’s underlying instructions were deeply flawed. Records show Lavingia programmed the AI system to make intricate judgments based on the first few pages of each contract — about the first 2,500 words — which contain only sparse summary information.

“AI is absolutely the wrong tool for this,” said Waldo Jaquith, a former Obama appointee who oversaw IT contracting at the Treasury Department. “AI gives convincing looking answers that are frequently wrong. There needs to be humans whose job it is to do this work.”

Lavingia’s prompts did not include context about how the VA operates, what contracts are essential or which ones are required by federal law. This led AI to determine a core piece of the agency’s own contract procurement system was “munchable.”

At the core of Lavingia’s prompt is the direction to spare contracts involved in “direct patient care.”

Such an approach, experts said, doesn’t grapple with the reality that the work done by doctors and nurses to care for veterans in hospitals is only possible with significant support around them.

Lavingia’s system also used AI to extract details like the contract number and “total contract value.” This led to avoidable errors, where AI returned the wrong dollar value when multiple were found in a contract. Experts said the correct information was readily available from public databases.

Lavingia acknowledged that errors resulted from this approach but said those errors were later corrected by VA staff.

In late March, Lavingia published a version of the “munchable” script on his GitHub account to invite others to use and improve it, he told ProPublica. “It would have been cool if the entire federal government used this script and anyone in the public could see that this is how the VA is thinking about cutting contracts.”

According to a post on his blog, this was done with the approval of Musk before he left DOGE. “When he asked the room about improving DOGE’s public perception, I asked if I could open-source the code I’d been writing,” Lavingia said. “He said yes — it aligned with DOGE’s goal of maximum transparency.”

That openness may have eventually led to Lavingia’s dismissal. Lavingia confirmed he was terminated from DOGE after giving an interview to Fast Company magazine about his work with the department. A VA spokesperson declined to comment on Lavingia’s dismissal.

VA officials have declined to say whether they will continue to use the “munchable” tool moving forward. But the administration may deploy AI to help the agency replace employees. Documents previously obtained by ProPublica show DOGE officials proposed in March consolidating the benefits claims department by relying more on AI.

And the government’s contractors are paying attention. After Lavingia posted his code, he said he heard from people trying to understand how to keep the money flowing.

“I got a couple DMs from VA contractors who had questions when they saw this code,” he said. “They were trying to make sure that their contracts don’t get cut. Or learn why they got cut.

“At the end of the day, humans are the ones terminating the contracts, but it is helpful for them to see how DOGE or Trump or the agency heads are thinking about what contracts they are going to munch. Transparency is a good thing.”

If you have any information about the misuse or abuse of AI within government agencies, Brandon Roberts is an investigative journalist on the news applications team and has a wealth of experience using and dissecting artificial intelligence. He can be reached on Signal @brandonrobertz.01 or by email brandon.roberts@propublica.org.

If you have information about the VA that we should know about, contact reporter Vernal Coleman on Signal, vcoleman91.99, or via email, vernal.coleman@propublica.org, and Eric Umansky on Signal, Ericumansky.04, or via email, eric.umansky@propublica.org.

Elon-Trump, Welcome to the Thunderdome

We’ve clearly clarified that the Elon-Trump feud is real. I assume you’ve seen or heard about the back-and-forth social media salvos in which Trump has threatened to terminate Musk’s companies’ contracts. Musk has claimed responsibility for Trump’s election and claims Trump is in the “Epstein Files.”

Musk has now at least shown that he’s serious about this, not just whining about the “Big, Beautiful Bill” which the White House and the Hill mainly didn’t care about. This is a truly sui generis situation in the sweep of American history, in large part because we’ve never had a U.S. President who is governing in the way Donald Trump is or willing to do the things he’s willing to do. We’ve also not really — though here history’s analogs are less certain — had a plutocrat with Musk’s scale of wealth and hold over multiple critical industries. There are even fun side questions: who gets custody of Katie Miller? (Google it.)

Continue reading “Elon-Trump, Welcome to the Thunderdome”

5 Points On Boasberg’s Big Alien Enemies Act Ruling 

After being mostly scuttled by the Supreme Court, the original Alien Enemies Act case has re-entered the conversation. 

While the high court took most of the Alien Enemies Act challenges out of the hands of U.S. District Judge James Boasberg of D.C. and distributed them to the individual judicial districts where Venezuelan nationals are being detained under the act, it left unresolved the fate of the deportees already removed to CECOT in El Salvador. 

In a significant ruling yesterday, Boasberg concluded that the CECOT detainees were denied due process when they were removed March 15. He ordered the Trump administration to propose a plan within a week for how to “facilitate” giving the detainees the due process they were denied.  

While President Trump’s invocation of the Alien Enemies Act was itself historic and the cases challenging his proclamation are testing the robustness of due process, the real import of these cases is that they are where the executive branch is threatening to and in fact is running roughshod over the judicial branch. In defying court orders, including to “facilitate” the return of other wrongfully deported foreign nationals, the Trump administration has provoked a constitutional clash, practically daring the judicial branch to try to stop it.

Boasberg’s decision sets up another potential focal point for that constitutional clash. Here are 5 points on how Boasberg’s ruling anticipates that confrontation:

Why did Boasberg take such a circular route to get to the same place?

Boasberg’s ruling wasn’t a complete victory for the CECOT detainees. He found it unlikely that they would win their habeas corpus claims. For the detainees to prevail on the habeas claim, they had to show that they were in the “constructive custody” of the United States, meaning under U.S. control or held at its behest. It’s troubling that Boasberg was unconvinced on this point and even he seemed troubled by it, but by taking it off the table, he eliminates one ripe avenue of appeal for the government. By grounding his ruling in the due process clause of the 5th Amendment instead, he aligned with the Supreme Court’s recent strong defense of due process in this very case. And in the end, he winds up at roughly the same place because he concluded that the remedy for violating the detainees due process was to allow them the chance to pursue the habeas claims they were denied in the first place. 

Boasberg grapples with the limits of judicial power.

Boasberg seems keenly aware that this Supreme Court is going to give maximum deference to the executive branch. I suspect that’s one reason he effectively sidestepped the “constructive custody” issue. The Roberts Court isn’t going to get involved in foreign policy by ordering the administration to make demands on El Salvador, and so Boasberg is walking a fine line. “Although the Court is mindful that such a remedy may implicate sensitive diplomatic or national-security concerns within the exclusive province of the Executive Branch, it also has a constitutional duty to provide a remedy that will ‘make good the wrong done,’” Boasberg wrote. 

The CECOT detainees aren’t being released anytime soon.

In open court previously, Boasberg had mused about how due process could be provided without having to return the detainees to the United States. In his written opinion, Boasberg said that facilitating a return of the CECOT detainees is “not necessarily” the only presumed remedy for the due process violation.

Boasberg was vague about what kind of process he was looking for to provide the detainees with their denied due process. “Exactly what such facilitation must entail will be determined in future proceedings,” he wrote. His invitation to the government to propose a process invites some sort of remote habeas proceeding. 

But in the short term it may not matter because the Trump administration will almost certainly appeal Boasberg’s preliminary injunction to the D.C. Circuit Court of Appeals and ask it to pause the case so that it doesn’t have to propose a plan for giving the detainees belated due process, before the deadline Boasberg set for next week. From there, the case is a sure bet to go to the Supreme Court. In the meantime, the CECOT detainees, who are approaching the three-month mark of their confinement there, will remain in indefinite custody.

Was Boasberg being coy when he set a nominal injunction bond of $1?

Plaintiffs typically must post an Injunction bond, which is intended to make defendants whole if it turns out the injunction was improperly granted. It’s common for judges to waive an injunction bond when the injunction is against the federal government. I was left wondering whether Boasberg set a nominal bond of $1 here to sidestep the yet-to-pass House GOP’s reconciliation bill which contains a provision that would prohibit federal judges from enforcing contempt citations unless a bond was posted when an injunction was issued. No way to confirm Boasberg’s intentions, but it caught my eye. 

WYD DC Circuit?

In his opinion, Boasberg highlights more than once the Trump administration’s poor conduct in this case from the beginning. You’ll recall he already found probable cause that the administration violated his order when it proceeded with the deportations on March 15 and didn’t turn the planes around. He references his contempt of court inquiry in the opinion. 

All of which serves as good reminder that the D.C. Circuit Court of Appeals placed an administrative stay on the contempt of court inquiry more than six weeks ago. It’s been fully briefed since April 28. And still no ruling from the appeals court. Meanwhile, several other courts have begun incipient contempt of court proceedings against the administration in other Alien Enemies Act cases and adjacent “facilitate” cases. 

It’s not at all clear what is taking the D.C. Circuit so long. 

The Stench of Loser Stuck on Mr. Elon

We seem to be moving toward a bit more real animus between Elon Musk and Donald Trump. Musk keeps attacking Trump’s budget bill on Twitter. Trump has now stopped saying they’re actually best buds. In comments today he’s saying, albeit very tepidly, that the friendship seems to be over. I remain agnostic on where this dispute goes and whether it will amount to anything. What I see mostly is that Musk just looks incredibly small and diminished at the moment. The response from Republican members of Congress seems like a general, “Thank you so much for sharing your views” kind of thing.

I hear from the D.C. publications that Republican electeds are on edge. But they don’t seem on edge. They don’t seem afraid of Musk. Or perhaps it’s better to say they’re much, much more afraid of Trump, which amounts to the same thing. But even his criticisms, while notionally biting and intense, feel sulky and ineffectual.

Continue reading “The Stench of Loser Stuck on Mr. Elon”

Thoughts on the ‘Centrist’ Hoedown

I wanted to flag your attention to this Dave Weigel piece in Semafor. It’s about an event (“WelcomeFest”) put on by a centrist PAC called WelcomePAC, which is presenting itself as a kind of latter-day Democratic Leadership Council or punchy and centrist group focused on picking fights with the party’s left wing. It’s a kind of set piece for a lot of stuff that’s going on among Democrats right now. The big push is to defang the power of “the groups” and then, on a secondary level, get the party away from various litmus tests and speech policing. Then there’s a secondary push for “abundance” politics. They brought together several centristy members of Congress — Rep. Ritchie Torres (NY), Rep. Jake Auchincloss (MA), Sen. Elissa Slotkin (MI) — and then commentator Matt Yglesias, data influencer David Schor and former Senate staffer Adam Jentleson, among others.

As Weigel reports, moments after Torres starts his remarks, this happens …

Continue reading “Thoughts on the ‘Centrist’ Hoedown”

In Historic First, Trump Orders Investigation Of Biden White House

A lot of things happened. Here are some of the things. This is TPM’s Morning Memo. Sign up for the email version.

Another Crossing The Rubicon Moment

In a new executive order, President Trump has unleashed his White House counsel and attorney general to conduct a wide-ranging investigation of his predecessor and the Biden White House staff.

The predicate for the investigation is comical, alleging that “former President Biden’s aides abused the power of Presidential signatures through the use of an autopen to conceal Biden’s cognitive decline and assert Article II authority.”

But from that launching point, the executive order is quite serious. It calls for two open-ended areas of inquiry that could, if a DOJ investigation follows, keep former Biden staffers tied up in defending themselves for months or years:

(i) whether Biden White House aides conspired to cover up “Biden’s mental and physical health”; and

(ii) “the circumstances surrounding Biden’s supposed execution of numerous executive actions during his final years in office.”

On one level this is all laughable, but it is also an unprecedented targeting of a former president by a subsequent White House with the clear intention of delegitimizing his predecessors official acts – like presidential pardons – to clear the way for declaring them invalid and supplanting them with his own prerogatives.

Trump Administration Returns Improperly Deported Man

In a first, the Trump administration has complied with a court order to return to the United States an improperly deported foreign national.

The gay Guatemalan man, identified in court filings by his initials O.C.G., feared persecution in his home country. The Trump administration abruptly deported him instead to Mexico, where he claimed to have already been raped and targeted for being gay. He ultimately wound up back in Guatemala.

After the Trump administration retracted its initial assertions about O.C.G. in court, U.S. District Judge Brian Murphy of Massachusetts ordered the administration to facilitate his return in a case challenging the legality of third party removals done without notice or hearing. O.C.G. returned aboard a commercial flight and was taken into custody, his lawyer said.

The Trump administration’s compliance with Murphy’s order has implications in the handful of other cases where the executive branch is defying, stonewalling, and rejecting court orders to “facilitate” wrongfully deported foreign nationals. Unlike the other deportees, O.C.G. was not in a foreign prison at the time of his return to the U.S.

Boasberg Weighs In On Fate Of AEA Detainees At CECOT

In a significant ruling, U.S. District Judge James Boasberg of D.C. granted a preliminary injunction, finding that the Venezuelan nationals removed to El Salvador under the Alien Enemies Act were denied the due process to which they were entitled when they were abruptly flown to the CECOT prison on March 15. Boasberg gave the Trump administration one week to propose a plan for how to “facilitate” giving the detainees a chance to pursue their habeas corpus claims.

Boasberg’s written opinion was complex and somewhat circular; and while it compared their fates to a scene from a Kafka novel, it was not a total victory for the detainees. He ruled that they are not entitled to file habeas claims now because he was not convinced that they are in the “constructive custody” of the United States. But he concluded that their removals without due process violated the Fifth Amendment and that the remedy for that violation is to let them file habeas claims.

It doesn’t appear that the detainees will be freed anytime soon, as Boasberg had previously pondered aloud in court and left the door open in his order for the detainees’ legal challenges to proceed while they remain in custody in El Salvador.

The Trump administration is likely to appeal the preliminary injunction; and this case, which is the primary vehicle for the CECOT AEA detainees, is likely headed ultimately to the Supreme Court.

Trump II Travel Ban: Still Heavily Muslim

President Trump ordered a full travel ban on citizens from 12 countries: Afghanistan, Myanmar, Chad, Republic of Congo, Equatorial Guinea, Eritrea, Haiti, Iran, Libya, Somalia, Sudan and Yemen. Five of the seven countries from Trump’s original 2017 Muslim ban are on the new list. He imposed new lesser travel restrictions on citizens from Burundi, Cuba, Laos, Sierra Leone, Togo, Turkmenistan and Venezuela.

Trump’s Attack On Higher Ed: Ivy League Edition

  • Harvard: President Trump purported to suspend Harvard University from participating in the student visa program, effectively prohibiting foreign nationals from attending the nation’s most prominent university.
  • Columbia: The Trump administration claimed Columbia University failed to meet its accreditation standard for allegedly tolerating harassment of Jewish students on campus.

Collusive Lawlessness In Texas

In the course of six hours yesterday, the Trump DOJ and Texas Attorney General Ken Paxton colluded with U.S. District Judge Reed O’Connor to vitiate a two-decade-old state law that offered undocumented residents discounted in-state college tuition.

In rapid succession, the Trump DOJ filed a suit challenging the law, Paxton filed a joint motion asking the judge to permanently block the law, and the judge issued the order. O’Conner, sits in Wichita Falls, one of the most notorious single-judge divisions, meaning the lawsuit was assured of going to him.

The collusive lawsuit came after the Texas legislature failed to repeal or otherwise amend the in-state tuition law at its recent session. Steve Vladeck has more on the legal hijinks in Texas and what he calls “a stain on the federal courts.”

Big Beautiful Bill: By The Numbers

10.9 million: the number of people it would rob of health insurance coverage

$2.4 trillion: how much it would add to the federal budget deficit over the next 10 years

18,000: the estimated number of preventable deaths among dual Medicare/Medicaid enrollees who would lose their prescription drug subsidy

All The Best People

Meet the 22-year-old Trump’s Team picked to lead the DHS terrorism prevention program.

Hanging Tough

Kim Sajet, director of the Smithsonian National Portrait Gallery. (photo by Andre Chung for The Washington Post via Getty Images)

Since President Trump purported to fire her last week, Kim Sajet, the director of the Smithsonian National Portrait Gallery, has continued to report to work and carry out her duties, the WaPo reports.

Do you like Morning Memo? Let us know!

‘The Intern in Charge’: Meet The 22-Year-Old Trump’s Team Picked To Lead Terrorism Prevention

This article first appeared at ProPublica, a Pulitzer Prize-winning investigative newsroom. Sign up for The Big Story newsletter to receive stories like this one in your inbox.

When Thomas Fugate graduated from college last year with a degree in politics, he celebrated in a social media post about the exciting opportunities that lay beyond campus life in Texas. “Onward and upward!” he wrote, with an emoji of a rocket shooting into space.

Continue reading “‘The Intern in Charge’: Meet The 22-Year-Old Trump’s Team Picked To Lead Terrorism Prevention”

GOP Leadership Not Worried About Forcing Members To Go On Record On Worst Of DOGE

The White House finally sent over a rescissions package request — a move the administration has been dragging its feet on for months — asking Republicans in Congress to swallow a chunk of the sweeping cuts that Elon Musk has enacted with his DOGE destruction so far this year.

Continue reading “GOP Leadership Not Worried About Forcing Members To Go On Record On Worst Of DOGE”