For those who couldn't attend my 'Keynote' at @aiDotEngineer
> Pydantic is all you need
Making LLMs, software 3.0, backwards compatible with software 1.0
https://t.co/FOS0wtQiHU
other links in the thread!
@emollick Your tweets about the science behind learning are so interesting and motivational! I wish my teachers were reading your feed back in the day 😅
Combining @pydantic, @OpenAI function calling, and @langchain for data analysis is insane!
Suppose you want structured data on healthcare startups, but you're met with nothing but blogs and articles.
How can you transform this mess into the key info you need?
It's easy! 🧵
@yimingdothan@pydantic@OpenAI@langchain Output still needs to be validated, and the more text you throw at the model the greater the odds of hallucinations. Sometimes it even hallucinates parts of the function that aren’t there
@oval_eyes@pydantic@OpenAI@langchain Yeah I think you can just pass it back through the existing pydantic model to validate it, not sure what you mean by self critique chain though?
And that's it! We now have our structured data extracted from the text. In just a few lines of code, we can easily parse the output and have it ready to be saved, displayed, or whatever else you intend to do with it.
Now we can move on to the fun part! Using @langchain, we initialize an @OpenAI chat model. We then convert our Pydantic model into a function and pass it along with the original text to the chat model.
We're releasing 60+ lessons & practical projects on LangChain & Vector Databases in Production as our inaugural course within the Gen AI 360 Certification.
Enroll at https://t.co/rKhrQrhlil
Why should you take it?
Just built this - generate a fully illustrated picture book using a single text prompt
Uses function calling with @langchain@OpenAI, @replicatehq for stable diffusion, @activeloop Deep Lake to store prompts + images
Check it out: https://t.co/eWputbdNEX