8 ms·
Coping with dumb LLMs using classic ML
- sgt101 2y agoOptions: Finetune the models to be better Optimise the prompts to be better Train better models
- hackerwr 2y agohello do you have a place for me im haking the school now
- Vampiero 2y agoWake me up when LLMs are good at Problog because it's the day we can finally rest
- kvgr 2y agoThe amount of hallucination I get when trying to write code is amazing. I mean it can get the core concepts of language, can create structure/algo. But it often makes up objects/values when I ask questions. Exampe: It suggested TextLayoutResult.size - which is Int value. I asked if it is width and height. And it wrote it has size.height and also size.width. Which it does not. I am now writing production code and also evaluating the LLMs, that our management thinks will save us shit load of time. We will get there sometimes, but the push from management is not compatible with the state of the LLMs. (I use Claude 3.5 sonnet now, as it is also built in some of the "AI IDEs".)
- antihipocrat 2y agoYou're not alone. In my experience the senior executive are enamoured by the possibility of halving headcount. The engineers reporting honestly about the limitations of connecting it to core systems (or using it to generate complex code running on core systems) are at risk of being perceived as blocking progress. So everyone keeps quiet, tries to find a quick and safe use case for the tech to present to management, and make sure that they aren't involved in any project that will be the big one to fail spectacularly and bring it all crashing down.
- deleted 2y ago[deleted]
- ZaoLahma 2y agoWhat irks me is how LLMs won't just say "no, it won't work" or "it's beyond my capabilities" and instead just give you "solutions" that are wrong. Codeium for example will absolutely bend over backwards to provide you with solutions to requests that can't be satisfied, producing more and more garbage for every attempt. I don't think I've ever seen it just say no. ChatGPT is marginally better and will sometimes tell you straight up that an algorithm can't be rewritten as you suggest, because of ... But sometimes it too will produce garbage in its attempts at doing something impossible that you ask it to do.
- epcoa 2y ago> ChatGPT is marginally better and will sometimes tell you straight up that an algorithm can't be rewritten as you suggest Unfortunately this very often it gets wrong, especially if it involves some multistep process.
- dingnuts 2y ago>What irks me is how LLMs won't just say "no, it won't work" or "it's beyond my capabilities" and instead just give you "solutions" that are wrong. This is one of the clearest ways to demonstrate that an LLM doesn't "know" anything, and isn't "intelligence." Until an LLM can determine whether its own output is based on something or completely made up, it's not intelligent. I find them downright infuriating to use because of this property. I'm glad to see other people are waking up
- genewitch 2y agoIntelligence doesn't imply knowing when you're wrong though. Hackernews has Intelligent people... Q. E. D. % LLMs can RAG incorrect PDF citations too
- scarface_74 2y agoThat’s an easily solvable problem for programming. Today ChatGPT has an embedded Python runtime that it can use to verify its own code and I have seen times that it will try different techniques if the code doesn’t give the expected answer. The one time I can remember is with generating regex. I don’t see any reason that an IDE especially with a statically typed language can’t have an AI integrated that at least will never hallucinate classes/functions that don’t exist. Modern IDEs can already give you real time errors across large solutions for code that won’t compile. Tools need to mature.
- swells34 2y agoThis is a good representation of my experience as well. At the end of the day, this is because it isn't "writing code" in the sense that you or I do. It is a fancy regurgitation engine, that will output bits of stuff it's seen before that seem related to your question. LLMs are incredibly good at this, but that it also why you can never trust their output.
- kvgr 2y agoyes, I told Windsurf to copy some code to another folder. And what it did? It "regenerated" the files, in the right folders. But the content was different. Great chaos Agent :D
- Vampiero 2y ago... I just realized that I would be waking up just to go back to resting.
- AJRF 2y agoMy takeaway is that he didn’t solve anything, he just changed the shape of the problem into one that was familiar to him.
- ebiester 2y agoThat's how we all solve problems. If this was novel, it would be a paper rather than a blog post. The meta-strategy of combining LLM and non-LLM techniques is going to be key for getting good results for some time.
- AJRF 2y agoNo I don’t think I agree. There is lots of effort wasted shuffling problems around laterally but not solving for the actual goal, that’s what I am saying.
- ccortes 2y ago> he just changed the shape of the problem into one that was familiar to him that's a classic strategy to solve problems
- devvvvvvv 2y agoUsing AI as a way to flag things for humans to look at and make final decisions on seems like the way to go
- internet_points 2y agoI've worked on some projects that used ML and such to half-automate things, thinking that we'd get the computer to do most of the work and people would check over things and it would be quality controlled. Three problems with this: * salespeople constantly try to sell the automation as more complete than it is * product owners try to push us developers into making it more fully automated * users get lulled into thinking it's more complete than it is (and accepting suggestions instead of deeply thinking through the issues like they would if they had to think things from scratch)
- liontwist 2y agoAnd all of these are management problems.
- NonHyloMorph 2y agoWhich is a very real component of the whole system at large. (Think along the lines of assemblage/actor-network theory. Maybe fixing management is the more pressing issue then working on the task of selfreplacement in the name of profit for others. Thinking about it, the implications are interesting. What is the energyconsumption of a human thinking in comparison with the energy requirement of a possible machinic replacement?
- liontwist 2y agoYes. It’s just very hard to succeed with even the best technical execution if you do not have good management.
- internet_points 2y agoTo me they feel more like Molokh-style problems; systems that work towards more automation will always have to deal with these problems. You can't management your way out of users trusting your product too much.
- GardenLetter27 2y agoThe example here isn't great, but the idea of using an ensemble of LLMs when compute is cheaper is cool. As the foundational models can parse super complex stuff like dense human language, music, etc. with context - like a really good pre-built auto-encoder, which would be a nightmare with classic machine learning feature selection (remember bag of words? and word2vec?). I wonder how such an approach would compare to just fine-tuning one model though? And how the cost of fine-tuning vs. greater inference cost for an ensemble compares?
- dailykoder 2y agoThis is interesting. I think I did not entirely understand OPs problem, but we are going more and more in a direction where we try to come up with things how to "program" LLMs, because human language is not sufficient enough. (Atleast I thought) the goal was to make things simple and "just" ask your question to an LLM and get the answer, but normal language does not work for complex tasks. Especially in programming it is fun. People spent hours over hours to come up with a prompt that can (kinda-of) reliably produce code. So they try to hack/program some weird black box so that they can do their actual programming tasks. On some areas there might be a speed up, but I still don't know if it's worth it. It feels like we are creating more problems than solutions
- flessner 2y agoI feel the same way about programming, but there are plenty of people that don't enjoy it. I recently was chatting with my friend that wanted to automate one of his tasks by writing a python script with AI -> because all the influencers said it was "so easy" and "no programming knowledge" required. That might have been the single funniest piece of code I have seen in a long time. Didn't install the dependencies, didn't fill in the Twitter API key, instead of searching for a keyword on Twitter it just looked up 3 random accounts, 25 functions on like 120 lines of code? Also, the line numbers in the errors weren't helpful because the whole thing lived in Windows notepad. That was a flagship AI and a (in my opinion) capable human not being able to assemble a simple script.
- PaulHoule 2y agoIf you have some idea of what good code looks like you can sometimes give feedback to something like Cursor or Windsurf. For small greenfield projects (that kind of downloader script) they succeed maybe 50% of the time. If you had no idea of what code looks like and poor critical thinking abilities God help you.
- cyanydeez 2y agoPossible bug on uber query? --- Which of these product descriptions (if either) is more relevant to the furniture e-commerce search query: Query: entrance table Product LHS name: aleah coffee table Product LHS description: You'll love this table from lazy boy. It goes in your living room. And you'll find ... ... Or Product LHS name: marta coffee table Product RHS description: This coffee table is great for your entrance, use it to put in your doorway... ... Or Neither / Need more product attributes Only respond 'LHS' or 'RHS' if you are confident in your decision RESPONSE: RHS --- LHS is include. Hopefully this is a bug in the blog and not the code
- outofpaper 2y agoWith or without the bug it's a horid prompt. Prompts work best when they resemble content LLMs have in their training data. People use first and second far more often then LHS and RHS when talking about options. First or second, 1 or 2, a or b or neither. LLMs are narrative machines. They make up stories which often make sense.
- cyanydeez 2y agoLHS might trigger a better parsing window and that window would be model dependent.
- softwaredoug 2y agoThis is a copy/pasted typo, the real prompt begins > Which of these furniture products is more relevant to the furniture e-commerce search query: Fixed in the post. Thanks
- MichaelMoser123 2y agoclassical ML always runs into the knowledge representation problem - the task is to find some general representation of knowledge suitable for computer reasoning. That's something of a philosophers stone - they keep searching for it for seventy years already. I think agents will run into the same problem - if they will try to find a classical ML solution to verify what comes out of the LLM.
- blueflow 2y agoAnd like the philosophers stone it does not exist. Remember the "Map vs Territory" discussion: you cannot have generic maps, only maps specialized for a purpose.
- outofpaper 2y agoYes. All too easily we forget that the maps are not the territories. LLMs are amazing we are creating better and better hyperdimentional maps of language but until we have systems that are not just crystallized maps of the language they were trained on we will never have something that can really think, let alone AGI or whatever new term we come up with.
- Matthyze 2y agoThat's essentially the No Free Lunch (NFL) theorem, right? The thing about the NFL theorem is that it assumes an equal weight or probability over each problem/task. It's impossible to find a search/learning algorithm that performs superiorly over another, 'averaged' over all tasks. But—and this is purely my intuition—the problems that humans want to solve, are a very small subset of all possible search/learning problems. And this imbalance allows us to find algorithms that work particularly well on the subset of problems we want to solve. Coming back to representation and maps. Human understanding/worldview is a good example. Human understanding and worldview is itself a map of reality. This map models certain facts of the world well and other facts poorly. It is optimized for human cognition. But it's still broad enough to be useful for a variety of problems. If this map wasn't useful, we probably wouldn't have evolved it. The point is, I do think there's a philosopher's pebble, and I do think there's a few free bites of lunch. These can be found in the discrepancy between all theoretically possible tasks and the tasks that we actually want to do.
- Matthyze 2y agoSo, if I understand the approach correctly: we're essentially doing very advanced feature engineering with LLMs. We find that direct classification by LLMs performs worse than LLM feature engineering followed by decision trees. Am I right? The finding surprises me. I would expect modern LLMs to be powerful enough to do well at the task. Given how much the data is processed before the decision trees, I wouldn't expect decision trees to add much. I can see value in this approach if you're unable to optimize the LLM. But, if you can, I think end-to-end training with a pre-trained LLM is likely to work better.
- softwaredoug 2y agoTBH I'm not sure its better, but the decision tree structure is pretty handy for problem exploration (However 'better' might be defined, I care more about the precision / recall tradeoff)
- ellisv 2y agoThis resonates with my experience. Use LLMs for feature engineering, then use traditional ML for your inference models.
- Matthyze 2y agoPerhaps the reason that this approach works well is that, while the LLM gives you good general-purpose language processing, the decision tree learns about the specific dataset. And that combination is more powerful than either component.
- ellisv 2y agoIt’s the same reason LLMs don’t perform well on tabular data. (They can do fine but usually not was well as other models) Performing feature engineering with LLMs and then storing the embeddings in a vector database also allows you to reuse the embeddings for multiple tasks (eg clustering, nearest neighbor). Generally no one uses plain decision trees since random forest or gradient boosted trees perform better and are more robust.
- 2y ago
- jncfhnb 2y agoIf you’re going to use classic ML why not just train a model based on the vector representations of the product descriptions?
- softwaredoug 2y agoYes that's a great idea, and maybe something I would try next in this series.
- lewisl9029 2y agoI had a somewhat similar experience trying to use LLMs to do OCR. All the models I've tried (Sonnet 3.5, GPT 4o, Llama 3.2, Qwen2 VL) have been pretty good at extracting text, but they failed miserably at finding bounding boxes, usually just making up random coordinates. I thought this might have been due to internal resizing of images so tried to get them to use relative % based coordinates, but no luck there either. Eventually gave up and went back to good old PP-OCR models (are these still state of the art? would love to try out some better ones). The actual extraction feels a bit less accurate than the best LLMs, but bounding box detection is pretty much spot on all the time, and it's literally several orders of magnitude more efficient in terms of memory and overall energy use. My conclusion was that current gen models still just aren't capable enough yet, but I can't help but feel like I might be missing something. How the heck did Anthropic and OpenAI manage to build computer use if their models can't give them accurate coordinates of objects in screenshots?
- HanClinto 2y agoMaybe still worth it to separate the tasks, and use a traditional text detection model to find bounding boxes, then crop the images. In a second stage, send those cropped samples to the higher-power LLMs to do the actual text extraction, and don't worry about them for bounding boxes at all. There are some VLLMs that seem to be specifically trained to do bounding box detection (Moondream comes to mind as one that advertises this?), but in general I wouldn't be surprised if none of them work as well as traditional methods.
- parsakhaz 2y agoWe've run a couple experiments and have found that our open vision language model Moondream works better than YOLOv11 in general cases. If accuracy matters most, it's worth trying our vision language model. If you need real-time results, you can train YOLO models using data from our model. We have a space for video redaction, that is just object detection, on our Hugging Face. We also have a playground online to try it out.
- owkman 2y agoI think people have had success with using PaliGemma for this. The computer use type use cases probably use fine tuned versions of LLMs for their use cases rather than the base ones.
- ausbah 2y agothis is sort of what tooling is suppose to be like right? llm isn’t great at X task so regulates it to a proven capable tool like a calendar
- raghavbali 2y agoMaybe I missed something but this is a round about way of doing things where an embedding + ML classifier would have done the job. We don't have to use an LLM just because it can be used IMO
- napsternxg 2y agoWe often ignore the importance of using good baseline systems and jump to the latest shiny thing. I had a similar experience few years back when participating in a ML competitions [1,2] for detecting and typing phrases in a text. I submitted an approach based on Named Enttiy Recognition using Conditional Random Field (CRF) which has been quite robust and well known in the community and my solution beat most of tuned Deep learning solutions by quite a large margin [1]. I think a lot of folks underestimate the complexity of using some of these models (DL, LLM) and just throw them at the problem or don't compare it well against well established baselines. [1] https://scholar.google.com/citations?view_op=view_citation&hl=en&user=013OA04AAAAJ&sortby=pubdate&citation_for_view=013OA04AAAAJ:j3f4tGmQtD8C https://scholar.google.com/citations?view_op=view_citation&h... [2] https://scholar.google.com/citations?view_op=view_citation&hl=en&user=013OA04AAAAJ&citation_for_view=013OA04AAAAJ:8k81kl-MbHgC https://scholar.google.com/citations?view_op=view_citation&h...
- PaulHoule 2y agoAs I see it, you need a model you can train quickly so you can do tuning, model selection, and all that. I have a BERT + SVM + Logistic Regression (for calibration) model that can train 20 models for automatic model selection and calibration in about 3 minutes. I feel like I understand the behavior of it really well. I've tried fine tuning a BERT for the same task and the shortest model builds take 30 minutes, the training curves make no sense (back in the day I used to be able to train networks with early stopping and get a good one every time) and if I look at arXiv papers it is rare for anyone to have a model selection process with any discipline at all, mainly people use a recipe that sorta-kinda seemed to work in some other paper. People scoff at you if you ask the engineering-oriented question "What training procedure can I use to get a good model consistently?" Because of that I like classical ML.
- korkybuchek 2y agoThere's a reason xgboost is still king in large companies.
- 2y ago