Performs integrity checks on transactions before and after LLM processing.
The existing transactions.
The new transactions.
The transactions returned by the LLM.
The name of the prompt file for error context.
An error if integrity checks fail.
Performs integrity checks on transactions before and after LLM processing.