Pydantic is all you need: Jason Liu

preview_player
Показать описание
Please return only json, do not add any other comments ONLY RETURN JSON OR I'LL TAKE A LIFE

If this was you, then you've probably been pretty happy to see OpenAI function_call get released, I'm here to show you how you can get the most out of such powerful feature. Instead of writing prompts that turn strings into strings, we can write Pydantic objects and get Pydantic objects out of OpenAI.

In this talk we explore some model driven development. Where we go step by step with some examples on how to represent your problem as simple code so we can model, generate diagrams, and write prompts as code to save time and model complex data correctly, allow us to use the same best practices rather than having to invent new ones for how we manage prompts.

About Jason Liu
Previously stitch fix and Facebook. Currently consulting startups on production using llm systems.
Рекомендации по теме
Комментарии
Автор

Thanks for having me on! this was my first publish speaking thing in like.. .5 years

jxnlco
Автор

Jason Lio is seriously next level, he brings so much in this video, can watch this 10 times.

DKLHensen
Автор

I was at the conference in person -- this talk was a major highlight. Glad to see it again!

josephmdev
Автор

- Consider using structured prompting for better LL model outputs (00:31)

- Ensure LL models output JSON or structured data compatible with existing software (00:50)

- Utilize OpenAI function calls for improved JSON schema validation (2:49)

- Employ the Pantic library for data model validation and to generate JSON schema (3:53)

- Implement instructor library to simplify OpenAI function calling with Pantic (5:16)

- Use doc strings in Pantic models to improve prompt and data quality (6:47)

- Create validators in Pantic models for data integrity and error handling (7:20)

- Use LL models to output structured data for complex data processing (11:08)

- Explore advanced applications of structured prompts for knowledge extraction (12:07)

- Check out additional examples and documentation on structured prompting (16:29)

ReflectionOcean
Автор

Wow, outstanding talk. I came in thinking a 15 minute talk on typing wouldn't be that interesting, but by the end I felt like this was the most well explained and immediately useful presentation on here.

parttimelarry
Автор

One more awesome thing is that this video tile is intentionally (or maybe not) a reference to "Attention is all you need" (2016)

piotrmazgaj
Автор

and now we have PydanticAI. Revisiting this talk after launch.

jaideep_yes
Автор

🎯 Key Takeaways for quick navigation:

00:01 🎵 *Introduction and Scope*
- Jason Liu introduces himself as a keynote speaker, providing an overview of his talk on type hints, Pydantic, and structured prompting.
- Discusses the challenges of using language models in production, particularly when outputting JSON or structured data.
01:19 🌐 *Introduction to Pydantic*
- Introduces Pydantic as a library for data model validation, emphasizing its similarity to data classes and its reliance on type hints.
- Highlights the benefits of using Pydantic, including better validation, cleaner code, and automatic generation of JSON schema.
04:21 🧩 *Introduction to Structured Prompting with Pydantic*
- Discusses the concept of structured prompting, where prompts are actual code represented by Pydantic objects.
- Demonstrates how Pydantic enables defining objects with nested references, methods, and cleaner code for language model prompts.
05:28 🔧 *Introduction to Instructor Library*
- Introduces the "instructor" library, designed to simplify the usage of Pydantic for prompting language models, especially for OpenAI function calls.
- Explains how "instructor" patches the completion API and facilitates type-safe and auto-complete features.
06:24 🔄 *Advantages of Structured Prompting*
- Explores the advantages of structured prompting, emphasizing the ability to define nested references, methods, and reusable components.
- Discusses how this approach leads to more modular, maintainable, and bug-free code.
07:47 🛡️ *Using Validators with Pydantic*
- Demonstrates the use of validators with Pydantic, showcasing the ability to add custom validation functions.
- Illustrates how language model validators can be integrated to catch and handle errors effectively.
08:57 🌐 *Structured Prompting for Knowledge Workflows*
- Explores how structured prompting can go beyond structured outputs, enabling the modeling of knowledge workflows and plans.
- Discusses the potential for representing knowledge graphs and leveraging language models for more productive development.
12:14 🔄 *Advanced Applications: Search Query Planning*
- Demonstrates advanced applications, such as search query planning using structured prompting.
- Shows how defining a data structure for search types and execution methods simplifies the process of querying multiple backends.
14:34 📊 *Advanced Applications: Knowledge Graph Extraction*
- Illustrates an advanced application focused on extracting knowledge graphs by closely modeling the data structure to the graph visualization API.
- Emphasizes the simplicity achieved in code with the structured prompting approach.
16:11 🔮 *Future Possibilities and Conclusion*
- Discusses the future possibilities of structured outputs, including multimodal applications and generative UI over images, audio, and more.
- Concludes with excitement about the evolving space of structured prompting and its potential in various domains.

Made with HARPA AI

ilianos
Автор

Thank you Jason. Phenomenal work and effort + you & your team.

rstar
Автор

I used decorators over my calls to allow for feedback loops ! Pydantic is a must 😊

friendlydroid
Автор

00:13 Pydantic is all you need: Jason Liu

02:08 Pydantic is a library for data model validation.

04:07 Pydantic is a trusted library for handling JSON schema and object definition in Python.

06:06 Pydantic allows for cleaner code and easier maintenance by defining nested references and object behavior.

07:54 Validation error handling in Instructor helps fix errors in language models.

09:45 Pydantic allows for structured prompting and object-oriented programming.

11:38 Language models can output data structures to traverse and process data more effectively.

13:27 Pydantic enables easy creation and visualization of graph structures.

15:27 The paraphrasing detection algorithms help identify quotes and provide more accurate answers.

17:20 Pydantic enables extraction of bounding boxes and structured outputs.

Crafted by Merlin AI.

aitools
Автор

Geez this is must have video to watch

liked so much

BeLKa
Автор

This is something very different from all the other stuff out there!

swannschilling
Автор

Well this really helped me learn Pydantic🎉

anthonyd
Автор

Respond only with a valid json and nothing else. MY AND MY FAMILY'S LIFE DEPEND UPON THIS!

Let us hope Roko's basilisk will look kindly upon us emotionally manipulating our poor LLMs

ristopaasivirta
Автор

Awesome talk jasonliu learned something new today.Thank you for sharing this

shanky
Автор

Engineers used to be expensive because they produced potentially infinite automation.

Today, they're expensive because they consume potentially infinite automation.

pythagoran
Автор

This awesome! Thank you for sharing this!

DeruwynArchmage
Автор

Validation with citation is very interesting. I did this using normal prompt engineering and hoped I’d get good results every time 😂

sanyamjain
Автор

Great talk. Such a useful workflow, thanks!

kevon
join shbcf.ru