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

Genuine question: can someone point me to a use case where langchain makes the problem easier to solve than using the openai/anthropic/ollama SDKs directly? I've gotten a lot of advice to use langchain, but the docs haven't really shown me how it simplifies the task, or at least not more than using an SDK directly.

I really want to at least understand when to use this as a tool but so far I've been failing to figure it out. Some of the things that I tried applying it for:

- Doing a kind of function calling (or at least, implementing the schema validation) for non-gpt models

- parsing out code snippets from responses (and ignoring the rest of the output)

- Having the output of a prompt return as a simple enum without hallucinations

- process a piece of information in multiple steps, like a decision tree, to create structured output about some text (is this a directory listing or a document with content? What category is it? Is it NSFW? What is the reason for it being NSFW?)

Any resources are appreciated



It makes it simple (and uniform) to switch providers.


theres already solutions for this but even this i feel like is a wasted effort unless you have the token volume to justify high availability


Is that really it?


Mind tell what kind of scenario you are tring to solve?


I literally just want to know what use cases langchain serves. I've built four or five different applications at this point, and it was easy to enough to use various SDKs. Where does langchain come in?




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

Search: