ChatGPT is a generative-AI assistant used through natural-language prompts for coding help and exploratory questions. It can help turn an unclear task into a starting point: summarize a regulation for a bank customer, produce a small Python program, explain a failure, or reshape generated code. Its output is an aid to development work rather than an automatically correct solution. section 1.4.1 section 1.5.2
Prompt refinement controls the level and purpose of a response. A request to summarize Check 21 can be narrowed from regulatory detail to customer benefits, a few sentences, or even one word. The same approach applies to code: ask for a balance-printing statement, then request input handling, a function, type hints, or a returned formatted string. Responses can vary even for the same prompt because ChatGPT is nondeterministic. section 1.5.2
Use ChatGPT as part of a deliberate development workflow:
- Request a small implementation or a focused revision instead of assuming a first response is production-ready. section 1.5.2 section 2.3.1
- Give faulty code and tests when debugging; inspect whether the explanation identifies the actual logic problem. section 1.5.3
- Check generated code against domain requirements, such as required ACH record types and correct record labels. section 2.3.1
- Verify library versions, security implications, and current guidance when a response may rely on outdated model knowledge. section 1.5.7
From a balance formatter to testable payment parsing
A prompt can first generate Python that formats a user-entered current balance. Asking for a function, annotations, and a returned string makes the result easier to reuse. For a larger task, an ACH parser generated from the same broad request may omit record types or mislabel them. A useful follow-up asks for separate parser functions per record type, allowing valid and invalid records to be tested independently. section 1.5.2 section 2.3.1
Listing 2.3 Parsing with separate functions
def parse_ach(filename):
records = []
parser_functions = { #1
'1': parse_file_header, #1
'5': parse_batch_header, #1
'6': parse_entry_detail, #1
'7': parse_addenda, #1
'8': parse_batch_control, #1
'9': parse_file_control #1
} #1
#1
with open(filename, 'r') as file: #1
lines = file.readlines()
for line in lines:
record_type = line[0]
parser = parser_functions.get(record_type) #2
if parser: #3
records.append(parser(line))
else:
print(f"Unknown record type:
➥{record_type} in line: {line}") #4
continue
return records
… #5
def parse_file_control(line): #5
return { #5
'record_type': 'File Control', #5
# ... additional fields #5
} #5
… #5
Inspect a generated ACH parser structure that dispatches each record type to a dedicated parsing function, including handling for unknown records. section 2.3.1
Treat answers as a starting point to review, run, and improve. ChatGPT may identify a transaction-list bug, such as removing an item too early because of an incorrect comparison, but tests establish the expected behavior. It may also give a plausible PostgreSQL example using psycopg2 while failing to recognize psycopg3; a revised prompt can adapt the example, but cannot replace validation against the intended version and environment. section 1.5.3 section 1.5.7



















