Remix.run Logo
Anti-patterns while working with LLMs(instavm.io)
42 points by mkagenius 5 hours ago | 15 comments
willvarfar a minute ago | parent | next [-]

I have had both frustration and joy working with AI.

I have found it is far better at understanding - and, with prodding, determining the root causes of bugs - in big sprawling codebases than it is at writing anything in even simple code bases.

Recently I had it compare and contrast two implementations of the same API written in different languages to find differences, and it found some very subtle things and impressed me. It got a lot wrong, but that was because one of the implementations had lots of comments that it took at face value. I then wrote a rough spec of what the API should do and it compared the implementations to the API and found more problems. Was a learning experience for me writing specs too.

Also recently I asked an AI to compare two sets of parquet files and it did sensible things like downloading just bits of them and inspecting metadata and ended up recommending that I change some of the settings when authoring one of the sets of parquet files to improve compression. It needed esc and prodding at the halfway point but still it got there. Was great to watch.

And finally I've asked it a detailed question about database internals and vectorising predicates and it got talking about 'filter masks' and then, in the middle of the explanation, inserted in image to illustrate. Of 'filter masks' in the PPE sense. Hilariously wrong!

pedropaulovc an hour ago | parent | prev | next [-]

This post resonates a lot with me. I've been experimenting with Claude Code to write code that interacts with the SolidWorks SDK. It is both extremely complex (method calls with 15+ bools, doubles, strings; abbreviated parameters; etc) and obscure. It has been like pulling teeth. Claude would hallucinate methods, parameters etc.

I tried using Context7 MCP with the SolidWorks docs but the results were not satisfactory. I ended up crawling SW's documentation in HTML, painstakingly translating it to markdown and organizing it to optimize greppability [1]. I then created a Claude skill to instruct CC to consult the docs before writing code [2]. It is still stubborn and sometimes does not obey my instructions but it did improve the quality of the code. Claude would need 5 to 10 rounds of debugging before getting code to compile. Now it gets it in 1 to 2 rounds.

[1] https://github.com/pedropaulovc/offline-solidworks-api-docs

[2] https://github.com/pedropaulovc/harmonic-analyzer/blob/main/...

sharkjacobs 3 hours ago | parent | prev | next [-]

This post is a mess. The best advice is clear and specific, and this is neither.

The examples are at best loosely related to the points they're supposed to illustrate.

It's honestly so bad that I cynically suspect that this post was created solely as a way to promote click3, in the first bullet, and then 4 more bullets were generated to make it a "whole" post

CGMthrowaway 2 hours ago | parent | next [-]

The five anti-patterns (or remedies, rather)-

  1. Don't re-send info you've already sent (be resourceful) 
  2. Play to model strengths (e.g. generating an image of text vs generating text in an image, or coding/executing a string counter rather than counting a search string)
  3. Stay aware of declining accuracy as context window fills up
  4. Don't ask for things it doesnt know (e.g. obscure topics or outside cutoff window)
  5. Careful with vibe coding
meander_water 44 minutes ago | parent | prev [-]

Yeah I was hoping for a lot more from the title.

Scotrix an hour ago | parent | prev | next [-]

I played a lot with LLMs over the last year and built a multitude of products with it and it’s always just the same bottom line outcome: - be specific - keep it small - be precise when adding context - don’t expect magic and shift deterministic requirements to deterministic code execution layers

All this is awfully painful to manage with current frameworks and SDKs, somehow a weird mix of over-engineered stuff while missing the actual point of making things traceable and easy changeable once it gets complex (my unpopular personal opinion, sorry). So I have built something out of my own need and started to offer it (quite successfully so far)to family & friends to get a handle on it: Have a look: https://llm-flow-designer.com

isodev 3 hours ago | parent | prev [-]

Perhaps we can add that using LLMs for logical, creative or reasoning tasks (things the technology isn’t capable of doing) is an anti-pattern.

pan69 2 hours ago | parent | next [-]

I use LLMs as a sounding board for logical, creative or reasoning tasks all the time as it can provide different points of view that make ME think about a problem differently.

Yoric 2 hours ago | parent | prev | next [-]

In my experience, LLMs work pretty nicely as rubber ducks, for logical, creative or reasoning tasks. They'll make lots of mistakes, but if you know the field, they are often (not always, though) easy to detect and brush off.

Whether that's worth the environmental or social cost, of course, remains open for debate.

johnfn 3 hours ago | parent | prev | next [-]

I use LLMs for those purposes all the time and they seems to work for me.

epolanski an hour ago | parent | prev | next [-]

> reasoning tasks

Please provide a definition of reasoning.

fluoridation 20 minutes ago | parent [-]

Reasoning is the manipulation and transformation of symbols (i.e. stand-ins for real objects) by well-defined rules, often with the object to find equivalences or other classes of relationships between seemingly unrelated things.

For example, logical reasoning is applying common logical transformations to propositions to determine the truth relationship between different statements. Spatial reasoning is applying spatial transformations (rotation, translation, sometimes slight deformation) to shapes to determine their spatial relationship, such "can I fit this couch through that doorway if I rotate it in some way?"

Reasoning has the property that a valid reasoning applied to true data always produces a correct answer.

qsort 3 hours ago | parent | prev [-]

What would be examples of tasks of that type? I hate hype as much as the next guy, but frankly I don't think you can support that assertion.

xgulfie 2 hours ago | parent [-]

It is at the very least an anti-pattern in the same way hiring an assistant to do the work for you is an anti-pattern

shermantanktop 2 hours ago | parent [-]

I agree, moving into management is definitely an anti-pattern.