Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I believe the abstractions in Langchain are inherently flawed. The core problem resides in the composability of chains. While it offers a handy way to create prototypes, it becomes restricting when you desire to modify a specific element within the chain. The hierarchical design of chains in Langchain conceals the component you wish to alter and obscures the parts developers might want to adjust, making the process of experimenting and refining the pipeline difficult.

The optimal abstraction for LLM apps, in my view, should resemble a DAG or a state machine. This alternative exposes the distinct stages in the pipeline rather than masking them in a hierarchy. Yes, adopting this new abstraction might lead to more code but it offers superior control. It's hardly surprising that many users start prototyping with Langchain, but then, when ready, they clone the prompts and construct their own systems.

Fixing this fundamental issue would be very difficult. It would necessitate reworking the library from the ground up.



Take a look at https://promptfile.org/ for an alternative approach to the prototyping -> app flow.


Promptfile is written in markdown, which is unsuited for templates and config management.

I have an attempt in the same domain, would love feedback

We didnt invent a new markup - we used jsonnet which is used in large scale kubernetes and has a grammar that has been well tested for config mgmt.

https://github.com/arakoodev/EdgeChains/blob/main/Examples/r...

Prompts live outside the code.


A DAG is not expressive enough for some applications. Lang chain is actually a poorly implemented free monad.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: