Can AI explain COBOL without making things up?
The short answer
Yes, if the AI is not allowed to answer from memory. Parse the code into facts first, give a model only a bounded set of those facts and the source lines they point to, require every statement to cite that evidence, and drop any statement whose citation does not check out. Where the facts are enough, compose the answer without a model at all.
By Nisius · Updated
Why do general AI assistants get legacy code wrong?
A general assistant predicts plausible text. Asked about a COBOL estate, it fills gaps with what such systems usually do. The meaning of a COBOL program is also spread across files: copybooks define its records, JCL binds its files to datasets, and other programs read what it writes. No single file holds the answer, and an estate is far larger than what a model can read at once.
What does grounded mean in practice?
- The model never reads the estate directly. It receives a bounded part of a graph built by deterministic parsers, and the source lines those facts point to.
- It answers in a fixed, validated structure, not free text that has to be interpreted.
- Every statement must cite evidence it was given. A validator checks each citation and drops any statement that fails, and a dropped statement is never shown as a fact.
- The model does not write its own queries; it chooses from a closed set, so it cannot go looking for things to support a guess.
- Anything the model writes that becomes lasting knowledge, such as a summary or a business rule, waits for an expert's review.
What should you ask any vendor?
- Does the model ever see raw source, or only facts extracted first?
- Can you show me the source line behind every sentence of an answer?
- What happens to a statement that cannot be cited?
- Does any of our code leave our network, including to the model?
- When our experts correct an answer, does the correction survive the next time the code is read?
How Telikos does it
Telikos works this way. The answer on our home page was composed with no model at all: asked which program decides whether a claim needs supervisor approval, it cites the condition at cobol/CLM0200.cbl lines 127 to 136. When a model is used, it runs on the appliance inside your network, and its output is kept only where it cites evidence it was given.
Related questions
Is it safe to paste COBOL into a public AI chatbot?
It sends your source to a third party, which many organisations' policies forbid, and the answer is not grounded in the rest of your estate. A system that runs inside your network and cites your own code avoids both problems.
Does an AI that explains COBOL need a large model?
Not necessarily. When answers are composed from extracted facts, many can be produced with no model at all; a model helps most with summaries and plain-language explanations, and those should still cite their evidence.