Hacker News new | ask | show | jobs
by JoshuaRowe 967 days ago
I worked on a simple company idea chatbot style app as a take home test for a startup I was hoping to contract with. They asked me to use LangChain and SolidStart JS. No biggie it seemed as I’ve done a few SolidJS and OpenAI API things in the past. What I found was that I am either very much not a ML / prompt engineer / whatever term this falls under or LangChain is completely useless as an abstraction layer. The examples did not work at the time like mentioned in this thread and after struggling through and getting a few things working with the docs, I then had to add memory to the agent (to reuse the chat context in successive questions), and I really struggled to get that working. Part of it was also dealing with SolidStart, which docs were half baked as well. I eventually got it all working, but with what seemed like twice as much code and maybe three times the effort of maybe just using OpenAI’s API. I think the part that I really thought was off was the classes and the distinction between chains, agent, memory, and the other abstractions. They didn’t seem to add value or make the coding part of it easier. I even did a dry run with just calling OpenAI’s API directly and it just worked way better. It all reminded me sort of the fast fashion of Javascript years past after sitting there with a working solution and some time to reflect. I also feel like I understand the high level usefulness of the chain idea and such, but the solution didn’t really seem very pragmatic in the end, at least with LangChain.
3 comments

Did you look into Flowise or Langflow? These are UI drag-n-drop implementations of LangChain and can be easily self-hosted. It’s trivial to create a chatbot with data coming from other apps, the internet, etc. You can use OpenAI or Antrophic keys and it even has an embeddable chat UI.
Why would I use drag-and-drop UIs to replace one of my favorite things, coding, when I use infrastructure as code stuff to replace a cloud console panel, FastAPI to generate OpenAPI documents, and even D2-lang to draw graphical diagrams?
> They asked me to use LangChain and SolidStart JS

They were at some level, trolling you. Either way intentionally or not, it says too much about them and not about the position itself.

They did indeed use those things in their own setup. Whether that is good or bad is a matter of opinion, but I think they were trying to provide a realistic challenge into the work that needed to be done. I think he did realize the “challenges” in the combination, though.
Off topic - what's your opinion on SolidJS? What's the right use case for it vs other frameworks?
I think it keeps what is good about React and ditches what is bad. It is familiar enough to pick up if you’ve done any component and hook based React. I think it probably serves as a framework that people who know what they are doing to get more performance and predictability out of their front end code and maybe a better mental model than wondering why React has an infinite rerender issue or other weird quirks we’ve grown to not notice / appreciate in React. I think there is probably more out of the box functionality that probably allows you to not then have to bundle React with some other meta framework, such as NextJS or similar.

While SolidJS is good, I really don’t think SolidStart is close to being useful or good. Not sure I really understand the value add on top of SolidJS quite like I understand NextJS on top of React. When I had to use SolidStart, there was a few times, I really just used SolidJS in place of some SolidStart built-ins because I couldn’t get it to do what I wanted and the docs were nearly non-existent. I even think I had to look at its src code to paint a complete picture from where the docs were at the time. In additional, I have no idea why people decide to use things that are so new for apps that are production used as much as they do. SolidStart really just made things more complicated for as simple of an app as I used it on. I couldn’t imagine using it for something that is non trivial at all.