As we continue developing our software, we accumulate a growing amount of technical debt just to keep the system running. But I believe we are on the brink of an even larger issue. Cognitive debt.
Hope you enjoy this reading, all feedback is welcome.
35 comments
log in to comment.
I enjoyed reading this. I don’t have anything more constructive to say (I’m only leaving this comment because I realised that you are the person who actually wrote the linked post, and I’ve found that leaving an appreciative comment is like a super-upvote).
I like this piece because it’s another voice saying effectively the same thing as many others I respect have argued: that pressure to ship leads to poor quality, difficult to maintain code (even before AI), and that AI is just making the problem worse. It’s cool to see the conversation evolve. For example, after I first saw the term “cognitive debt” used, I saw it crop up in more and more places, as other writers seemed to conclude “this problem is similar to technical debt, but it’s distinct enough that using a different but related term is a good idea”. And even if there are multiple people arguing effectively the same thing, each person tends to tackle the problem slightly differently
Hey there! Thanks for the comment, and reading it.
I know that sometimes hearing the same voice speaking on the same topic can be problematic. But on the other side of the same coin, have fewer voices pointing to the problem is also a problem. For me, writing the blog is a way to organize my own mind and be able to create a reasoning on some topic.
And sometimes, repeating the echoed words that the industry is repeating.
Either way, thanks again for reading, and even more for the comment.
We always called it “domain knowledge” or “tribal knowledge”.
“oral history”.
“The ropes”
It’s got many names. Why did this guy not know any of them? Why was “I don’t know the name” suddenly “there is no name”?
That isnt what was described by cognitive debt which is what the post is describing
But in the days of old, the replacement of human, or generation of domain/tribal knowledge were in the range of human capability to learn the new parts of a system.
With the LLM of today this scale is far flipped on the wrong side, and no product fully LLM will be manageable in a few years.
It’s not a reading: we have to read it ourselves.
I’ll be honest, I had to look on the dictionary to understand this subtle meaning.
Thanks, I learned a new thing today! :D
I hate to say this but can’t LLMs solve the cognitive debt problem better then people? Wouldn’t having a stochastic machine that can have its state frozen in time, retrived at convience, and fed the same inputs be a potentially more transparent machine, thinking or otherwise?
I agree with you on stating thr problem though, and the term seems concise enough to me. The gap seems to be not in ability to do this but that creating graspable and reasonable audits for LLM usage is like many risk mitigation systems, an after thought in the industry.
This is where you go off the rails. LLMs are probalistic, not deterministic. It will probably give the same output, but thats still not actually true. This is where hallucinations come from.
Tbf the exact input and node activation is all you’d need for forensics, the only reason to refeed would old input plus new input mix, which should be new output.
Its not neural nets, its staticics. There aren’t nodes to trace.
Most of the LLMs architectures that I know of are neural net based.
For training maybe. But execution as far as i know are just a bunch of probabilities chucked into matrices. Back in my physcos days I could u derstand the math, but not today.
Also what needs citing, that nodes translate to debugable, reproducible outputs.
Because again, it’s all probablilties under the hood.
I mean probabilities in matrices are nodes in a neural net, right?
The only thing that makes it non-deterministic is the tempature value which is known after the fact from my understanding, so that should be able to deterministic.
No… No they’re not. Either that or nerual nets are even dumber than I thought. My understanding was emulating nodes of information like brains do. Thats not probabilities. But willing to be wrong if you can bring sources. The connection between points in probability doesn’t make sense. Thats a nonsense statement.
Thats also no how simulated annealing works. The temperature value is roughly the probability it will pick a different, less optimal step, in order to try and find better alternative paths. The temperature value is roughly the probability of trying something ‘random’. Not deterministic at all. The temperature value is lowered with time and progression. Its known the entire time, but its still a weighted coin flip that determines which path to take.
en.wikipedia.org/wiki/Simulated_annealing
Neural nets are dumber than you thought for sure. What I mean is the coin flip results are known after the fact.
I’m not convinced of that you do. Nor is knowing that flip helpful. Because it’s non deterministic. An internal coin flip is not an input either.
Better, probably not. And I’ll give you one example. In a codebase there was an issue with Auth, after few runs of the LLM, the best suggestion resulted in 30~40% of change in the Auth workflow.
Took me a couple hours to figure out that the problem was a misconfiguration key (
camelCasetosnake_casein the vault store). Fixing this on the store (not on the code) fixed the Auth workflow.This two hours were the cognitive debt. And keep in mind, I’m familiar with this part of the code. A Mechanical Parrot happy-trigger boyz would accept the change in the codebase as an attempt to fix it.
So, mechanical parrot can help? Sure. But better than people, probably not. At least not yet, not with the current set of tool, not with the promise of fully solving it.
This is badly wrong. The same node can point to multiple places depending on the
Kfactor on this. And this isn’t even theTapplied to it. So, the same node can infer multiple different others. This is the nature of the probabilistic of LLM.First agreed. Honestly I haven’t an LLM do anything close to an engineer. You can get lucky for a code snippet or two and maybe a few ADRs but even those are fraught with the chance of slop clean up work. I am not arguing that.
The node is only probalistic because of the random number added. After the fact the number is known.
So you are suggesting that we should have the metadata for every decision and direction. This is a
N^Namount of data. Keeping this data is wastefull (even more than the usage of LLM right now). Not saying that is is useless, but for sure this won’t help to mitigate the cognition since this data don’t carry meaning for us humans.No that should be discoverable with the models weights, input and random numbers added to the weight at the time.
Say for example you find that a collection of outputs behave oddly or in an undesired way, you could use this to find what simularties they share with each other but delta with other and naively prune the nodes or simply decrease their weights. Those you could also try to corralate that to certain input tokens to engineer better prompts or try to trace it back to initial training data.
It could also be a failed tool call adding garbage data in, or malicious. A trace could catch that as well.
No, the random part happens in the query.
There is also random in the training, but the query also generate more random numbers.
Otherwise this would be a deterministic procedure, and it’s not.
We are saying the samethings but you are adding no to it.
Right, during inference random numbers are generated, that plus the numbers from input are added to the weight values and the matrix multiplication happens. If you used the same random numbers and inputs it is deterministic. For regular use you don’t do that because you want a stochastic output, if you wanting to do forensics and trace what led to an output you would benifit from that determinism.
Gotcha,
But this means we need to provide not only the same query (and be sure that the tokenizer is the same) but also provide the seed for the number generation. In this case we will have a deterministic outcome. (Unless we provide the list of numbers used, which for me feels wasteful)
But at this point none of the providers have this feature.
And I don’t think the open source have this also. But open source can be updated/changed.
Not that I see either looking at opensource inference engines. vLLM supports setting the seed so if you have that you do, and maybe it’s just as simple as harness setting and recording that. At least for replay this request type of operation but that does not show where in model each random numbers would have been applied.
I’m going to break this up into two. Feedback on content and feedback on style and presentation.
Content
LLMs didn’t create cognitive debt, but they do make it worse. Cognitive debt is paid every time a team member leaves or is promoted to a non-contributing role.
The interesting thing to me is that, in order for an LLM project to be successful, all of that cognition has to be done up front, and written down. If done well, you aren’t relying on the LLM to figure anything out, and it’s just rote execution by a simpler model. The build process then exposes holes in the initial design which must be plugged within the documentation until all of the cognition has been performed and the LLM can execute.
The beauty of that model is that you can be 2/3 of the way through a project, realize you missed something foundational and rearchitect and rebuild the whole project in hours instead of weeks. LLM saves no time or money if you have perfect planning and execution skills, but it does enable you to make significant pivots far faster than a human team.
One of my teams just finished a project that took two massive pivots just as design was finished and execution was underway. The result was all the time explaining v1 was wasted and left confusion for the developers, v2 was continuing to be developed even after v3 was provided, and months of time were wasted understanding and building the wrong thing. This was a six month effort when it could’ve been two.
Now, with a real developer, they eventually build their own cognition and their own mental model and are then capable of cognitive work — LLMs can assist documenting the cognitive work, but they are piss poor at performing it. LLMs can’t cognate and they can’t replace developers — but they can change the shape of development work to be more about requirements analysis and architecture, and if used well can improve efficiency of teams.
I could write a whole article on that — I could write a book — but I don’t have time and AI would completely fuck it up, so it’s just in my head, still taking shape.
Presentation
I might have more specific feedback on your points, but I’d forgotten them by the time I got to the end.
I’d suggest moving your analysis of the examples to their own post which you can then link to support your points. The concept you are trying to convey isn’t difficult, but this article is about 10x the length it needs to be. You basically write well enough, and you attempt to engage the reader well, but this article is like having a chat with someone and they just launch into an hour long impromptu lecture and giving you no chance to absorb or respond.
By breaking it up into smaller chunks, you can give a reader an opportunity to engage with an idea fully, and then they can decide if they want to follow the links to read your takes on this project or the, or simply accept a one sentence reference in the primary article at face value.
There is writing out there so enchanting that you don’t mind investing the time because the reading is as much entertainment as it is learning. This article aspires to be that, but isn’t there.
Wooow, this message is as long as my post, love it!
This is where the open spec tries to help/solve. But this is a bandaid. Without a lot of hand-holding the models will make shity decisions/code. And this is cumulative, the more you try to steer the wheel, the worse it gets. I can specify details, but a 3 years old project is in this shape, and no amount of LLM will solve/help.
I understand this point, but it’s flaky at best. To be honest, with a large enough project a decision will take longer, if not impossible in a LLM driven codebase. It will be years to debugging, breaking down and rebuilding to even get close. Or spend the paycheck of 5 engineers annually for a single migration.
And this considers the the current LLM are heavily subsided.
Wrong, from the experiments on the academia, we get the fact that engineers with AI are often slower, because the problem was never in the code, code is the tool, it was the acquiring the right data, model and get the knowledge of the product to make the changes needed.
I try to keep around 1.5k to 2k words a week. It’s not always the case, some weeks I’m somewhat more inspired, sometimes I need some refinement, but this is a personal view, I want the reader to have a “conversation” with the author. This is the type of metaphor I try to use.
Either way, thanks for reading.
Ps.: Do you always use LLMs to write your messages? I would love to read your own words. Don’t be the meat proxy for the LLM.