Despite my usual concerns and paranoia about privacy when it comes to using Google Products, I’ve been using Google Bard as a full replacement for standard search engines for a while now, and I have to be honest, it works, it improves my productivity and it’s fun to use.
Today I discovered something amazing and scary at the same time: talking with Google Bard is a two-way communication and if you correct it, Bard will remember your correction, learn from it and provide the correct answer next time.
I was looking for a way to re-use the same arguments of a previous command to a new one in ZSH and I asked Bard:
I tried and it didn’t work, so I told him:
Bard was very sure about his answer. I was in doubt I didn’t use the right prompt (yeah, I know, Bard didn’t understand and I felt I was the one wrong, that tells a lot about my personality and how much we trust Google) so I tried to verify we were talking about the same thing with an example:
Yes, Bard understood, but the provided solution simply didn’t work. So, I fell back to the dear old search engine (Brave in my case) and I found this wonderful page about ZSH history expansion.
The solution to re-use the same arguments for a different command in ZSH is to use the ‘!’ modifier. Hence, if my previous command was “cat ./text.txt”, in order to open ‘./text.txt’ in VS Code, I can run “code !” and ZSH will expand the command to “code ./text.txt”.
I was going to simply annotate it in my notes, but then I thought: “Hey, why don’t I tell Bard about it?”. So I did:
What I nice guy is this Bard!
But now the interesting part, I wonder if it learnt from my correction, let me ask again the same question:
OMG, it did! I wonder whether it’ll apply what it learnt also if another user asked.
Comments powered by Disqus.