Comment by manmal

Comment by manmal 12 hours ago

16 replies

One weird trick is to tell the LLM to ask you questions about anything that’s unclear at this point. I tell it eg to ask up to 10 questions. Often I do multiple rounds of these Q&A and I‘m always surprised at the quality of the questions (w/ Opus). Getting better results that way, just because it reduces the degrees of freedom in which the agent can go off in a totally wrong direction.

jackphilson 6 hours ago

I often like to just talk out out. Stream of thought. Gives it full context of your mental model. Talk through an excalidraw diagram

deadbabe 11 hours ago

This is a little anthropomorphic. The faster option is to tell it to give you the full content of an ideal context for what you’re doing and adjust or expand as necessary. Less back and forth.

  • 7thpower 6 hours ago

    It’s not though, one of the key gaps right now is that people do not provide enough direction on the tradeoffs they want to make. Generally LLMs will not ask you about them, they will just go off and build. But if you have them ask, they will often come back with important questions about things you did not specify.

    • MrDunham 3 hours ago

      This is the correct answer. I like to go one step further than the root comment:

      Nearly all of my "agents" are required to ask at least three clarifying questions before they're allowed to do anything (code, write a PRD, write an email newsletter, etc)

      Force it to ask one at a time and it's event better, though not as step-function VS if it went off your initial ask.

      I think the reason is exactly what you state @7thpower: it takes a lot of thinking to really provide enough context and direction to an LLM, especially (in my opinion) because they're so cheap and require no social capital cost (vs asking a colleague / employee—where if you have them work for a week just to throw away all their work it's a very non-zero cost).

      • iaw 2 hours ago

        My routine is:

        Prompt 1: <define task> Do not write any code yet. Ask any questions you need for clarification now.

        Prompt 2: <answer questions> Do not write any code yet. What additional questions do you have?

        Reiterate until questions become unimportant.

    • deadbabe 3 hours ago

      They don’t know what to ask. They only assemble questions according to training data.

      • 7thpower 29 minutes ago

        It seems like you are trying to steer toward a different point or topic.

        In the course of my work, I have found they ask valuable clarifying questions. I don’t care how they do it.

      • fuzzzerd 3 hours ago

        While true, the questions are all points where the LLM would have "assumed" an answer and by asking you get to point in the right direction instead.

  • manmal 10 hours ago

    Can you give me the full content of the ideal context of what you mean here?

bbarnett 10 hours ago

Oh great.

LLM -> I've read 1000x stack overflow posts on this. The way coding works, is I produce sub-standard code, and then show it to others on stackoverflow! Others chime in with fixes!

You -> Get the LLM to simulate this process, by asking to to post its broken code, then asking for "help" on "stackoverflow" (eg, the questions it asks), and then after pasting the fix responses.

Hands down, you've discovered why LLM code is so junky all the time. Every time it's seen code on SO and other places, it's been "Here's my broken code" and then Q&A followed by final code. Statistically, symbolically, that's how (from an LLM perspective) coding tends to work.

Because of course many code examples it's seen are derived from this process.

So just go through the simulated exchange, and success.

And the best part is, you get to go through this process every time, to get the final fixed code.

  • elif 4 hours ago

    Please keep comments in this thread non-fiction.

    • th0ma5 23 minutes ago

      Lolll everything in this thread is unfalsifiable conjecture??

  • manmal 10 hours ago

    The questions it asks are usually domain specific and pertaining to the problem, like modeling or „where do I get this data from ideally“.

    • bbarnett 9 hours ago

      Not blaming you, it's actually genius. You're simulating what it's seen, and therefore getting the end result -- peer discussed and reviewed SO code.

  • ModernMech 2 hours ago

    Although you're being voted down probably for tone, this is a very interesting point.