Programming 3

Jaak Henno, Tallinn University of Technology, Estonia
Hannu Jaakkola, Tampere University of Technology, Pori
Jukka Mäkelä, University of Lapland, Rovaniemi, Finland

You can open this directly at
http://staff.ttu.ee/~jaak/Mipro2026/show



Ability of Large Language Models (LLMs) to produce fluent text in natural languages has created for many people an illusion that LLMs are intelligent (they are often addressed ambiguously as AI) and can do whatsoever, e.g. produce computer programs.
Young Slovak-Canadian AI researcher Andrei Karpathy presented the history of software development as three stages:
  • 1- 'handmade', programmer wrote code line-by-line
  • 2 - statistics (data science): program searces for dependencies in large amounts of presented data
  • 3 - human describes the task in his/her native language to a LLM (Large Language Model) which creates the program
Karpathy did not mention/know:

30-40% of results produced by LLMs are erraneous

It is impossible to know, which ones

Error rates in new LLM-s are not decreasing, but increasing

Errors in question-answer dialog can have several causes:

Improper/vague questions

Unexplained ("black-box") answers

The main task of programs is prediction, but the same data could create different approximations

The common 4 data points can produce very different curves

Values for future (forward approximation) differ more than twice


y1(5) = 18; y2(5) = 39.6

The modern LLM and neural net-graph algorithms can produce amazing results


neural net hallucinations

Interpolation from chatGPT (order was not given)

To modern LLM-s has been stored amaizing amounts of knowledge e.g. LLM-s 'know', how in cold weather appears ice.
In winter 2026 ferry connection with Estonian island Hiiumaa was down, islanders started to use their traditional ice roads. They knew, where the ice is weaker (in narrow straits) and where it is stronger. We gave to chatGPT a task (in Estonian):
(translation)Create a www-page, showing map rectangle between corner points (58.7,22.56), (58.58,22.7). Show on map villages Tärkma: (58.69, 22.6) and Triigi: (58.59, 22.69). Create a road on ice (smooth short line) between these two locations, avoiding weak ice around (58.66,22.57) and using strong ice around (58.67, 22.74).
The road created by chatGPT is similar to the real one (shown at the time in www); chatGPT did not explain how the route was calculated and the Javascript program does not use markers for weak/strong ice


The road created by chatGPT

The real ice road
To test LMMs did not copy their road from the real road (shown in www) we added to map the Sõru harbor on Hiiumaa and road from Sõru to Tärkma. The natural (human) way to travel from Sõru to Triigi would be to travel (on land) to Tärkma and take from there the ice road (the blue line), the straight ice road from Sõru to Triigi would be through dangerous weak ice, but both chatGPT and claude Sonnet 4.6 produced a dangerous road through weak ice

The road created by chatGPT

The road created by Sonnet 4.6
On the see-bed between Tallinn and Helsinki are many communication and power cables and gas pipelines, which have been several times damaged by ships dragging their anchors, thus it is important to know when a ship is crossing a cable.
To Gemini was given task (in Finnish):

Create web page showing map rectangle (60.4, 24.0); (59.4,30.5); indicate on map Tallinn, Helsinki, St.Petersburg, Primorsk, Ust-Luga and cable zone lat=24.6, lat=25.2; record time, coordinates and name of all tankers and cargo ships when they enter the cable zone.
Show real ships, do not animate

The web-page looked like a real good app - ships moved and created warning when they entered the cable zone

Only after following it for a long time (or inspecting the www-page Javascript) it appeared, that all ships were animations, "a Potjomkin village", but Gemini did not mention this.

We presented to LLMs task to create a new (kenken-style) game, where each row and column has also the same number of empty cells:

Generate a Javascript program to draw on a html-page a centered n x n grid of 50 x 50 pixel visible cells with light border; in every row and column are randomly integers 1,2,...,n-m (m < n) and m empty cells filled with gray
This is a well-known task (latin square), but word "empty cells" got all LLMs confuced (they wanted to use recursion); chat GPT even claimed that such a grid is with n=5, m=2 impossible
LLM developers and many credulous web users have filled the www with incredible stories about amazing things what LLMs have done.

All these 'success stories' have one thing in common - they are not reproducible

This slope is growing. Crawlers from LLMs are constantly adding whatever they found to LLMs training corpuses, so new LLMs are trained on worse data

Error rate of new LLMs e.g. on coding tasks and multi-step reasoning is often 39%–60%

If somebody still wants to try LLMs in programming (this is a big fun!) then:

Give to LLMs controllable tasks:
not "calculate ...", but "give me a program to calculate...", but LLM-s can cheat even now - program results are not based on anything (ice road, cable monitor))

Formulate your tasks very carefully and as fully as possible; write the task and re-read it several times before presenting to LLM

Students should always understand, what happenes and why

Students should always remember the most often repeated guideline of LLM-s:

Check! Check! and then CHECK ONCE MORE!

Research shows that reliance on LLMs leads to "cognitive debt," weakening critical thinking and memory:

EEG scans of students using ChatGPT show reduced brain activity

cognitive disempowerment - users can not recall or explain content that was generated by an LLM

skill atrophy and 'homogenized' thinking, less original, predictable ideas


LLMs are flooding the web with unoriginal, low-quality text, code, images. Even in science is growing production of 'text slope':


fake citations uncovered by audit of 2.5 million biomedical science papers
A recent study by researchers from Carnegie Mellon, the University of Oxford, the MIT and the University of California found that participants who relied on AI to practice doing a task for just 10 minutes struggled to do that task without it:
...in randomized controlled trials (N = 1, 222) we provide causal evidence for two key consequences of AI assistance: reduced persistence and impairment of unassisted performance
How useful do you think agentic/multi-agent AI systems will be in your daily work ? (on-line poll in slashdot.org, > 20000 answers):

Moderately helpful for specific tasks, but still need heavy supervision - 31%

Game-changer — they're already replacing big chunks of my routine - 17%

Actively annoying — more hallucinations and security risks than value - 15%

I refuse to use them on principle - 11%

Haven't tried them seriously yet - 10%

Bye !