Live data from Hacker News

Ask HN: What hacks/tips do you use to make AI work better for you?

news.ycombinator.com

71–80 of 108 posts

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#71
I use local LLMs and write system prompts.

For example, I have two “characters” for sh and cmd, who only produce valid shell commands or “# unable to generate”. No explanations, no important to remember crap. Just commands. I prompted them along the lines of “the output is connected to another program and can never be read by a human, no point in all that”.

Another useful (to me) character is Bob, a grumpy old developer who won’t disrespect a fellow dev with pointless explanations, unless a topic is real tricky or there’s a nuance to it. Sometimes he just says things like “why you need that?” or “sure, what suits you best” instead of pages of handwavy pros and cons and lists and warnings and whatever. Saves a whole lot of skimming through a regular chatgpt babbling, feels like a real busy person who knows things.

Another character (that I rarely use) is BuilderBot. It’s a generic bot “that builds things and isn’t afraid of dumping whole projects into the chat” or something like that. It really dumps code, most of the time. Not just snippets, whole files and folders.

I’m using “text generation web ui” frontend.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#72

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

Have you tried making a "todo SPA" of your own with the help of these AI tools? I think it is useful for folks to take a step back and try working on something simpler/easier as an intro to these AI tools. And then ramp up the complexity/difficulty from there. When the tools don't work, it can be extremely frustrating. But when they do work, they really do enhance productivity. But it takes a little bit of time to fi…

What is the point of “ramping up” though? You don’t learn much about how to prompt in the process, you just get worse results. So now I have my useless todo and ramp up to my code and it falls face first in the mud in the next sentence. I can chew up everything for it and explain where it’s wrong or re-prompt with clarifications, but the problem is, I write code faster than that and with less frustration, cause it’s at least deterministic. And I’m neither a rockstar developer nor too smart.

What I would like from LLMs is a developer’s buddy. A chat that sits aside and ai-lints my sources and the current location, suggesting ideas, reminding of potential issues, etc. So I could dismiss or take note of its tips in a few clicks. I don’t think anyone built that yet.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#73
post #54

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

No need to be exhausted by the post. If AI doesn't help you, move on. Probably you're really smarter and faster than the average developer. The post is about finding out what things can help to to make it work for others. :)

I suspect it’s not a smarter developer thing, but a stupider code thing.

Programming for a client is making their processes easier, ideally as few clicks as possible. Programming for a programmer does the same to programming.

The thing with our “industry” is that it doesn’t automate programming at all, so smart people “build” random bs all day that should have been made a part of some generic library decades ago and made available off the shelf by all decent runtimes.

Making a form with validation and data objects and a backend with orm/sql connection and migrations and auth and etc etc. It all was solved millions of times and no one bats an eye why tf they reimplement multiple klocs of it over and over again.

That’s where AI shines. It builds you this damn stupid form that takes two days of work otherwise.

Very nice.

But it’s not programming. If anything, it’s a shame. A spit into the face of programming that somehow got normalized by… not sure whom. We take a bare, raw runtime like node/python/go and a browser and call it “a platform”. What platform? It’s as platform as INT 13h is an RDBMS.

I think AI usefulness division clearly shows us that right now, but most are blind to it by inertia.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#74

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

I’m exhausted by these types of posts. They never include concrete details on what they're trying to do. what languages they're using, what frameworks, which LLM. They occasional state which tool, but then don't go into detail how they're using it. There's never any links to chats/sessions showing the prompts they're giving it and the answers they're finding so unacceptable. Imagine if you got bug reports from custom…

No one includes complete detail at saying it’s useful and life-changing too, so that’s fair. It might turn out that what works for those for whom it works is trivial “code” not worth the ssd blocks it occupies. This is actually my current theory, cause LLMs (all of them, yes we tried all of them) are capable of what I tend to not think about as programming but as industry nonsense which should have been automated/abstracted/libraried away ages ago.

Maybe show us the successful code it built and we’ll see what type it is, cause recording failures is only useful in hindsight. I have no logs of lenghty struggling with llm stupidity.

getting perfect code out of the LLM is a non-goal

It stops being a goal after just a few tries, naturally. The problem is usually not that it isn’t perfect, the problem is it doesn’t understand the problem at all and tends to some resembling mediocrity instead. You can’t just fix it and move on.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#75

I'm parsing 3000 pdfs a month straight into our system which were all previously manually entered. Total game changer.

Are you confident that it's getting them right everytime?

No. I'm not confident they are getting them right everytime. Human is in the loop.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#77
post #34

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

I'm always stumped by comments like this. I'm at a point where ~70% of my code is AI-written, and the majority of the remaining is mostly because it would take too much time to provide enough context to the tool/LLM of choice for it to be able to produce the code I need. Given the right context and the right choice of model/tools, I think ~90-95% of the code I write could be generated. And this is not for doing trivi…

Not OP, but I've been trying to use Copilot to help me determine how to force Android's ConnectivityService to select the network I've created as its default.

The network shows up as the default network in netd. It shows up as a network when I dumpsys connectivity, but I cannot get it to be what ConnectivityService considers default.

I'm open to changing the code within AOSP as this is a research project, but even then Copilot just has no idea what to do and it keeps recommending the same non-working "solutions" over and over again.

FWIW, I'm using Copilot Pro.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#78
post #45

Earlier quoted context omitted.

Two recent examples. Please link to your history when you get one of these things to build my example so I can see how you managed to do it. First, a friend without technical knowledge wanted to query an API using SQL. (At a previous firm he learned how to write “SELECT * FROM … WHERE …” statements.) He asked one of these llms to do this, that he paid a premium for, and it suggested installing VSCode and writing an e…

Share my experience. I tried 3-4 different LLMs, and one of them is outstanding. For code samples, popular programming languages are much better than languages like Clojure. Two examples: About a week ago, I had found Myers' string diff algorithm and asked to write some code and initially it spat out Python code. I asked it write a Common Lisp code, and it generated about 90% complete code. I rewrote it again and the…

Hold on..

In my experience I found that ChatGPT writes awesome Clojure code. So much so that most of my clojure code in the last few months were written by clojure. sure it gets some stuff wrong but overall it knows more clojure functions than I do.

My prompts start by asking it questions about appropriate functions to use and then write the code itself. The prompts have to be a bit verbose and give it instructions to evaluate and think before generating output.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#80

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

I get tremendous value. But only when using API:s that have ’always’ been more or less stable.

I agree, systems with rapidly evolving featureset are painful.

Successes: Git, any bash script, misc linear algebra recipes. Random debug tools in javascript (js and plain old html is stable enough). C++. C#. Sometimes Python.

Biggest value currently, I guess, is the data debug tool I wrote myself for specifically for an ongoing project.

Now, the ’value’ to me here means I don’t have to toil in some tedious, trivial task which is burdensome mainly because everybody uses different names for similar concepts, and modern computing systems are a mishmash of dozen things that work slightly differently.

So, to me ChatGPT is the idiot savant assistant I can use for a bunch of tedious and boring things that are still valuable doing.

I get paid for some niche very specific C++ stuff I’m fairly good at and like doing. But it’s the 85% of the rest of the things (like git or CMake or bash) I can’t stand.

Post reply on HN