PydanticAI: How To Code New "Safe" AI Agents

  Рет қаралды 2,156

Discover AI

Discover AI

Күн бұрын

Пікірлер: 7
@IdPreferNot1
@IdPreferNot1 11 күн бұрын
Given the stateless nature of LLMs, Agents act as just massive state models so Pydantic is a natural fit. Look at the Swarm system and see how that is all that is needed to get agents that can drive themselves without any other framework, interpreting functions into a schema and driving tool calls. Swarm did the dynamic prompt and tool injection discussed here. All that was needed was a larger model to help manage state/context better (inputs in/inputs out/shareability between agents), and here is Pydantic to do just that. All with built in validation... and retries to deal with the non-deterministic life of an AI.... I would not bet against Pydantic!! Love it.
@Karl-Asger
@Karl-Asger 11 күн бұрын
Really happy that you made a video on pydanticai, its exciting to see it be released. The Pydantic team and PydanticAI is unrelated to instructor as far as I know, I'm not sure where you got that but just needed to let you know since you focused on this in the beginning.
@IdPreferNot1
@IdPreferNot1 11 күн бұрын
Jason Liu is Instructor guy, famous for his "P:ydantic is all you need" speech.
@Karl-Asger
@Karl-Asger 11 күн бұрын
@IdPreferNot1 yup correct!
@irbsurfer1585
@irbsurfer1585 11 күн бұрын
So use pydantic for defining the schema > if you need structured output then use Instructor for generating the response from the LLM to produce it > if structured output is incomplete, Instctor queries the LLM again and again until it is properly formatted and conforms to the schema definition. It is worth considering augmenting the system with Error handling and Validation, Data Transformation to analyze and transform structured outputs validated by Pydantic, and some form of a security enhancement to ensure security at every level of the pipleine (to protect against injection attacks). And likely some form of logging and monitoring. Pydantic + Pydantic AI + Instructor +Jinja = Win Win WIn for MAS Engineers and clients who need structured output.
CLAUDE Desktop w Secure MCP AI Agents (Anthropic)
38:45
Discover AI
Рет қаралды 4,7 М.
PydanticAI - The NEW Agent Builder on the Block
21:45
Sam Witteveen
Рет қаралды 26 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 16 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 123 МЛН
System Design of ChatGPT | Mock interview @gkcs
26:16
sudoCODE
Рет қаралды 937
Tutorial on AI & AI Agents (simple explanations)
50:44
Discover AI
Рет қаралды 3,9 М.
ICL and TTT: Adaptive Intelligence for Small LM
46:45
Discover AI
Рет қаралды 1,4 М.
YouTube is now on EASY Mode (Anyone Can Blow Up in 2025)
12:08
Jason Lee
Рет қаралды 319 М.
LCM: The Ultimate Evolution of AI?
30:13
Discover AI
Рет қаралды 14 М.
(Neo)Vim Made Me a Better Software Developer
40:27
vim-jp
Рет қаралды 38 М.
Scaling AI Reasoning: MCTS in ICL for Small LM
39:41
Discover AI
Рет қаралды 2 М.
How to Build AI Agents with PydanticAI (Python Tutorial)
33:56
Dave Ebbelaar
Рет қаралды 8 М.
Make Your RAG Agents Actually Work! (No More Hallucinations)
35:01
Leon van Zyl
Рет қаралды 23 М.