Hi everyone!
I’m trying to classify reviews by extracting 0 to N issues from each one, with each issue tied to a predefined label and the relevant review text. I’m approaching this using structured output from an LLM and drawing inspiration from the LangChain’s Multiple Entities Extraction Chain example.
My main question is: Is there a method in LangChain to fine-tune structured output LLMs?
More specifically:
- I have a labeled dataset and want to fine-tune the model to predict the correct label for each extracted issue—ideally using
enum
constraints and possibly by adding label descriptions in the context to improve accuracy (is there a way to do it?). - I also want to instruct the model to parse the review according to the expected label set. I can provide a few curated examples, though creating many is expensive.
Any insights into whether LangChain supports this kind of fine-tuning—or how best to approach it—would be greatly appreciated. Thanks!