5 Comments
User's avatar
Nick Taylor's avatar

I'm starting to rely on your posts to keep me up to date with LLM developments. Many thanks!

Expand full comment
Michael Lones's avatar

Good to hear they’re useful to you Nick. To be fair, I’m starting to rely on writing posts to keep me up to date too!

Expand full comment
Ignatious Peiris's avatar

Hi, I think you've mixed up PydanticAI with Pydantic in this article. Pydantic is a data validation library that's also used in backend web development when making APIs, typically with FastAPI. PydanticAI is the AI agent framework developed by the folks at Pydantic, as an alternative to Langchain. It's Pydantic that is included in almost every LLM framework, not PydanticAI.

Expand full comment
Michael Lones's avatar

Thanks Ignatious. Yes, the statement I made about PydanticAI being used by LangChain was a slip-up - you’re right, that should have been Pydantic (and I’ll remove that to avoid confusion). However, the rest is correct I think. PydanticAI can be used to get an LLM to anneal to a Pydantic schema (LangChain provides similar functionality). Or at least this is what one of my students has been using it for. But yes, it also aspires to be a replacement for LangChain more generally.

Expand full comment
Ignatious Peiris's avatar

All good!

Since you mentioned the "ReAct" framework, another popular library when making AI agents is LangGraph.

It's specialty is in being able to create state machines called "graphs" instead of linear "chains", as is typically done in LangChain. PydanticAI also supports this. I personally prefer PydanticAI as it extremely intuitive. But LangGraph is also a decent choice and has plenty of documentation after overcoming its difficult initial learning curve.

It's a really cool little concept and I hope you'd check it out!

Expand full comment