home | tags


My take on asking LLMs a question

tags: #intro #AI #rant

I see a lot of my students seem to use LLMs to get their work done. This is bad, in the sense that you’re a student, how on earth do you expect to learn if you don’t do the work yourself?

And no, this is not the same as the calculator analogy. I don’t need to do 474945 * 2524752949 manually because that is a task whose result is deterministic. The questions we ask LLMs are generally not.

Also see this related blog post.

Rant aside, I do use LLMs. The trick is to be smart about when and when not to use it, and what to do with the results.

Here are the rules I set for myself, some tips, and some examples.

Rules

Rule 1: Always verify the output of an LLM

LLMs are probabilistic. They synthesise answers, which means we have no idea how close to reality they are. EVERYTHING NEEDS TO BE VERIFIED OR DOUBLE CHECKED.

I could tell you several incidents where I’ve tried to ask an LLM for answers to some simple questions, all of them relating to some open source software that I was trying to use that was not working exactly the way I thought it should. In approximately 30 to 40 percent of the cases the answer supplied, even after multiple iterations to fine tune the result, was completely wrong and didn’t help me.

But I was OK because verification was easy. I would try the command or the option or the change suggested, and if it worked, great! But if it didn’t work, I would know immediately.

In contrast, when I asked questions about PQC (Post-Quantum Cryptography), especially the future of parts of our internet infrastructure, I got different answers from different LLMs, and I’m pretty sure I have no way to verify if any of them are correct, because we’re discussing something that is currently in progress and very far from “done”.

Also see Example 3 below.

And definitely do not use LLMs for medical advice. Mark Twain is supposed to have said once: “Be careful about reading health books. You might die of a misprint”. That situation got about ten times worse with the internet, and, I suspect, a hundred times worse with LLMs!

Rule 2: Don’t stunt your own development

Using an LLM for tasks that are part of your “core competency” is not a good idea.

Let’s go back to the example of my students – 3rd or 4th year in a B Tech Cyber-Security program, and working on their final year project. This project is supposed to demonstrate their skills and learning beyond the core curriculum. A well-executed final year project can easily be the most impressive thing in an undergrad’s resume.

But if most of the challenging work, the “learning opportunity” work, has been done by an LLM, what have they learnt? If the external examiner asks them some pointed questions which require them to have thought about the topic a little deeper, will they be able to answer those questions?

As a counterpoint, it appears that some companies – especially the larger ones who are themselves selling AI – prefer that students know how to use an LLM, what goes into AGENTS.md and SKILLS.md, etc. That still does not mean you should short-circuit your own learning and development. Treat it as yet another topic you need to learn, not as an excuse to stop learning everything else!

Rule 3: Recognise when it’s OK to use an LLM

First, if the task is not in your core area of interest, and you lack either the time or the interest to learn, then an LLM is fine. (But rule 1 still applies!)

But even when the task is in your core subject, there are a couple of exceptions to rule 2:

An expert developer using an LLM to make some routine changes to the code, or write test scripts, may be a good example of the second one.

Tips

The biggest use of an LLM I can recommend is that it makes a much better “search engine”. You can ask a question in plain English, and it will find (generally, though not always) the best URLs that may contain an answer.

Just ignore the synthesised answer and go for the links.

Tip 2: Use multiple LLMs

Sometimes you may have to try different LLMs to get a good result.

For my Thunderbird query (see example 2 later), I tried both Chatgpt and Gemini.

Gemini returned a generic “upgrade your software” message although it did mention that this is a “tracked bug”.

Chatgpt, on the other hand, started out saying “this is a known bug” and also told me which version (153.0) fixes it. Naturally that is a lot more useful than what Gemini put out.

(Don’t take this to mean Chatgpt is always better. For the next query it could be the other way around)

Examples

Example 1: CSS changes

This example is from my point of view because I am not a web technologies person. I know some basic HTML, CSS, and I don’t want to know more. So this fits the “not my area of interest” criterion.

Anyway, somehow I ended up with two CSS files, one for my blog, and one for gitolite documentation. They differed in almost every aspect, so it was very hard for me to manually reconcile them and get a “best of both” version.

So I fired up OpenCode, connected it to “Muse Spark 1.3 free”, and told it what I want: generate a sample HTML that exercises all the selectors in both CSS files so I can see them side by side in my browser. It did that. It also very helpfully categorized the selectors into various classifications. So it was easy for me to say: alright, take the one on the right and add these selectors from the left side to the right side and give me the new CSS.

And that’s it, other than a small tweak to one of the colors. I didn’t actually touch any of the files with an editor myself.

Example 2: Thunderbird

My mail client, Thunderbird, was hanging with a message “filter complete” anytime I sent an email. I asked Gemini, and, after ignoring all the junk about anti-virus (I use Linux), and some other useless tips, I found one that basically said delete the MSF file for the “Sent” folder.

Now, here’s the catch. I happen to already know that deleting the MSF file is harmless; Thunderbird will simply re-create it. So I had no qualms about trying this, and it worked (hurray!). But the important bit is: if you did not already know that this is harmless, would you do it? I wouldn’t. Or at least I would double and triple check from links (see above) that it is harmless.

Example 3: Subjective question on Linux kernel using AI-generated code

Background: Linus Torvalds is now OK with using LLMs. He is absolutely the top example of “expert developer” and so are his 1st, 2nd, and maybe 3rd level lieutenants. But, as you know, Linux development happens in a somewhat hierarchical fashion. Code is submitted by somebody and gradually moves up the maintainer hierarchy until it reaches Linus’ tree.

The question (or concern) that I have is: when a piece of code transitions from somebody who is probably not an expert to the next higher level maintainer who is an expert, how much time does this maintainer have, to review what he has been given thoroughly before pushing it up the tree?

Considering the rate at which changes are now being submitted by, shall we say, politely, “neophytes”, I very much doubt if the expert maintainer who is supposed to review it has enough time to review all of them with the same amount of attention that he used to give before AI.1

I asked this question to both Gemini and Chatgpt. With Gemini, I phrased it as scepticism on my part (which is true; I am sceptical that this will end well in the long term). The most interesting part of the answer I got, basically confirmed my fears :-)

Then I asked Chatgpt the same question, but phrased optimistically. It also gave me a reply, but this one was tuned towards optimism :-) The only significant thing that it said which made sense was that the review process would have to change over the next few years; e.g., submission quality gates becoming stricter, using automated triage, AI helping maintainers understand code (which makes the problem recursive in some weird manner!), and so on.


  1. I am now starting to look at one of the BSDs for my server – NetBSD appears to have the strongest anti-AI stance. I may even use it on my regular desktop because I don’t do a lot of fancy things; it’s mostly command line. And I can always use a virtual machine when required. I’m pretty sure Linux is not in any trouble, at least not in the short to medium term, but this gives me a chance to learn something new so why not?↩︎