Live data from Hacker News

Libraries are under-used. LLMs make this problem worse

makefizz.buzz

21–30 of 59 posts

Re: Libraries are under-used. LLMs make this problem worse

#21
I'm having a problem like this now. I have a library that handles very complex hardware drivers and linkages.

I want people in the company to use it, but it's big and complicated (lots of chipsets and Bluetooth to boot).

I'm trying to design the library so the MCP can tell the LLM to pull it from our repo, read the prompt file for instructions and automatically integrate with the code.

I can't get it to do it consistenlty. There is a big gap in the current LLM tech where there is no standard/consistent way to tell an LLM how to interface with a library (C/Python/Java/etc.)

The LLM more often than not will read the library and then start writing duplicate code.

Maddening.

Re: Libraries are under-used. LLMs make this problem worse

#22

>Vibe coding is more fun than reading documentation. Shit, vibe-coding can be more fun than ordinary coding. In my experience the big problem is that the documentation is always terrible, you can't ask open-ended questions on stack overflow, the library's reddit (if any) has zero users, and anything asked on their discord is not searchable. It's incredible that we still don't have a stack overflow that is just a foru…

There are some bad/missing documentations out there, but more often than not, people rush to use the library without first understanding the domain and learning the library's design. Once that's done, the generated api reference and the source code is more than enough to get going.

Re: Libraries are under-used. LLMs make this problem worse

#24
post #21

I'm having a problem like this now. I have a library that handles very complex hardware drivers and linkages. I want people in the company to use it, but it's big and complicated (lots of chipsets and Bluetooth to boot). I'm trying to design the library so the MCP can tell the LLM to pull it from our repo, read the prompt file for instructions and automatically integrate with the code. I can't get it to do it consist…

That's part of the idea behind https://llmstxt.org/ - even if you ignore the "/llms.txt" URL there's a bunch of thinking around that to help write explanations of things like libraries that can be used to "teach" a model to use it by injecting that into a prompt.

I'm still not clear on what the best patterns for this are myself. I've been experimenting with dumping my entire documentation into the model as a single file - see https://github.com/simonw/docs-for-llms and https://github.com/simonw/llm-docs - but I'd like to produce shorter, optimized documentation (probably with a whole bunch of illustrative examples) that use fewer tokens and get better results.

Re: Libraries are under-used. LLMs make this problem worse

#25
post #24
post #21

I'm having a problem like this now. I have a library that handles very complex hardware drivers and linkages. I want people in the company to use it, but it's big and complicated (lots of chipsets and Bluetooth to boot). I'm trying to design the library so the MCP can tell the LLM to pull it from our repo, read the prompt file for instructions and automatically integrate with the code. I can't get it to do it consist…

That's part of the idea behind https://llmstxt.org/ - even if you ignore the "/llms.txt" URL there's a bunch of thinking around that to help write explanations of things like libraries that can be used to "teach" a model to use it by injecting that into a prompt. I'm still not clear on what the best patterns for this are myself. I've been experimenting with dumping my entire documentation into the model as a single f…

At this point it seems like just learning the library is easier than trying to cram the documentation into an LLM compatible format.

Re: Libraries are under-used. LLMs make this problem worse

#26
post #8

Earlier quoted context omitted.

This. We finally have a tool that can learn from all the libraries and abstractions that have to fit everybody's needs (and do so badly because there is no free lunch), and extract just the parts that are actually relevant to our problem and domain. This allows you to not only produce a much smaller attack surface, but also allows for domain specific optimisations and shortcuts. It's kinda like project specific seman…

Sure. Lot's more debugging than using something battle tested, which is why I have this in my CLAUDE.MD: > If there is a battle tested, well known package that can help us, then recommend it BEFORE implementing large swaths of custom code.

This is hilarious.

Re: Libraries are under-used. LLMs make this problem worse

#27
post #26

Earlier quoted context omitted.

Sure. Lot's more debugging than using something battle tested, which is why I have this in my CLAUDE.MD: > If there is a battle tested, well known package that can help us, then recommend it BEFORE implementing large swaths of custom code.

This is hilarious .

[deleted]

Re: Libraries are under-used. LLMs make this problem worse

#29
post #15

Unrelated: I initially expected this articles to be referring to public libraries. I think that would be a challenging connection to prove despite it making intuitive sense. On the article: some use cases eg handling dates, fault tolerant queues have so many edge cases and are so mission critical that relying on a battle tested tool makes a lot of sense. However, in my career I’ve seen a lot of examples of a package…

I thought this was about physical libraries as well. Maybe the link is librarians, supposedly if you didn't even know where to begin searching a trained librarian would have been a good person to ask.

Re: Libraries are under-used. LLMs make this problem worse

#30
post #8

I disagree. Every python package we install seems to install dozens of libraries, each of which can could harbour malware. Many of them are only used for a single function within them. We have no idea of what most of the packages are for. It's a lot.

This. We finally have a tool that can learn from all the libraries and abstractions that have to fit everybody's needs (and do so badly because there is no free lunch), and extract just the parts that are actually relevant to our problem and domain. This allows you to not only produce a much smaller attack surface, but also allows for domain specific optimisations and shortcuts. It's kinda like project specific seman…

>This allows you to not only produce a much smaller attack surface

Why does this reduce your attack surface? Can the functions in the library, unrelated to the ones you're using, be triggered by user input somehow?

Post reply on HN