Replies: 2 comments
-
There are different approaches to extraction using LLMs: https://python.langchain.com/docs/use_cases/extraction/ Kor does a better job than most libraries for prompt based parsing. So if you're working with a model that does not support function calling, I'd recommend using Kor (or exploring JSON mode if that's supported by the model). If you want to use LangChain function calling look through the guide I referenced above -- you should be using the with_structured_output -- and definitely include examples. create_extraction_chain in langchain bears the same name but behaves differently. |
Beta Was this translation helpful? Give feedback.
-
Ah, I see. Thanks for the clarification!
…On Fri, Mar 29, 2024 at 9:44 AM Eugene Yurtsev ***@***.***> wrote:
There are different approaches to extraction using LLMs:
https://python.langchain.com/docs/use_cases/extraction/
Kor does a better job than most libraries for prompt based parsing. So if
you're working with a model that does not support function calling, I'd
recommend using Kor (or exploring JSON mode if that's supported by the
model).
If you want to use LangChain function calling look through the guide I
referenced above -- you should be using the with_structured_output -- and
definitely include examples.
—
Reply to this email directly, view it on GitHub
<#278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXMPTRSURZ443N24KAEFVTY2VV2TAVCNFSM6AAAAABFN2BUIOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DSNJRHA4DM>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
create_extraction_chain is now included as part of LangChain:
https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.extraction.create_extraction_chain.html
Does this mean the kor library is no longer needed?
Beta Was this translation helpful? Give feedback.
All reactions