DeepLearning.AI
AI is the new electricity and will transform and improve nearly all areas of human lives.

💻   Accessing Utils File and Helper Functions

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Open"

You will be able to see all the notebook files for the lesson, including any helper functions used in the notebook on the left sidebar. See the following image for the steps above.


💻   Downloading Notebooks

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Download as"

3:   Then, click on "Notebook (.ipynb)"


💻   Uploading Your Files

After following the steps shown in the previous section ("File" => "Open"), then click on "Upload" button to upload your files.


📗   See Your Progress

Once you enroll in this course—or any other short course on the DeepLearning.AI platform—and open it, you can click on 'My Learning' at the top right corner of the desktop view. There, you will be able to see all the short courses you have enrolled in and your progress in each one.

Additionally, your progress in each short course is displayed at the bottom-left corner of the learning page for each course (desktop view).


📱   Features to Use

🎞   Adjust Video Speed: Click on the gear icon (⚙) on the video and then from the Speed option, choose your desired video speed.

🗣   Captions (English and Spanish): Click on the gear icon (⚙) on the video and then from the Captions option, choose to see the captions either in English or Spanish.

🔅   Video Quality: If you do not have access to high-speed internet, click on the gear icon (⚙) on the video and then from Quality, choose the quality that works the best for your Internet speed.

🖥   Picture in Picture (PiP): This feature allows you to continue watching the video when you switch to another browser tab or window. Click on the small rectangle shape on the video to go to PiP mode.

√   Hide and Unhide Lesson Navigation Menu: If you do not have a large screen, you may click on the small hamburger icon beside the title of the course to hide the left-side navigation menu. You can then unhide it by clicking on the same icon again.


🧑   Efficient Learning Tips

The following tips can help you have an efficient learning experience with this short course and other courses.

🧑   Create a Dedicated Study Space: Establish a quiet, organized workspace free from distractions. A dedicated learning environment can significantly improve concentration and overall learning efficiency.

📅   Develop a Consistent Learning Schedule: Consistency is key to learning. Set out specific times in your day for study and make it a routine. Consistent study times help build a habit and improve information retention.

Tip: Set a recurring event and reminder in your calendar, with clear action items, to get regular notifications about your study plans and goals.

☕   Take Regular Breaks: Include short breaks in your study sessions. The Pomodoro Technique, which involves studying for 25 minutes followed by a 5-minute break, can be particularly effective.

💬   Engage with the Community: Participate in forums, discussions, and group activities. Engaging with peers can provide additional insights, create a sense of community, and make learning more enjoyable.

✍   Practice Active Learning: Don't just read or run notebooks or watch the material. Engage actively by taking notes, summarizing what you learn, teaching the concept to someone else, or applying the knowledge in your practical projects.


📚   Enroll in Other Short Courses

Keep learning by enrolling in other short courses. We add new short courses regularly. Visit DeepLearning.AI Short Courses page to see our latest courses and begin learning new topics. 👇

👉👉 🔗 DeepLearning.AI – All Short Courses [+]


🙂   Let Us Know What You Think

Your feedback helps us know what you liked and didn't like about the course. We read all your feedback and use them to improve this course and future courses. Please submit your feedback by clicking on "Course Feedback" option at the bottom of the lessons list menu (desktop view).

Also, you are more than welcome to join our community 👉👉 🔗 DeepLearning.AI Forum


Sign in

Create Your Account

Or, sign up with your email
Email Address

Already have an account? Sign in here!

By signing up, you agree to our Terms Of Use and Privacy Policy

Choose Your Learning Path

Enjoy 30% Off Now. Cancel Anytime!

MonthlyYearly

Change Your Plan

Your subscription plan will change at the end of your current billing period. You’ll continue to have access to your current plan until then.

View All Plans and Features

Welcome back!

Hi ,

We'd like to know you better so we can create more relevant courses. What do you do for work?

DeepLearning.AI
  • Explore Courses
  • Community
    • Forum
    • Events
    • Ambassadors
    • Ambassador Spotlight
  • My Learnings
  • daily streak fire

    You've achieved today's streak!

    Complete one lesson every day to keep the streak going.

    Su

    Mo

    Tu

    We

    Th

    Fr

    Sa

    free pass got

    You earned a Free Pass!

    Free Passes help protect your daily streak. Complete more lessons to earn up to 3 Free Passes.

    Free PassFree PassFree Pass
Welcome to Getting Structured LLM Output built in partnership with DotTxt. When working with LLMs in a typical chat interface, unstructured text output is fine, but if you're building software, it becomes much harder to parse and rely on free-form text output. That's where structured output such as JSON becomes very important. They provide a clear format to the machine can read and process. For example, if you want your LLM to look at a product review and generate a couple of fields, say the product name and whether the sentiment is positive or negative, then outputting those two fields in JSON that's downstream software reads that process these fields reliably. In this course, you will learn how to obtain structured outputs using several approaches. The basic idea is you can tell an LLM that you would like the data in a particular format, and if you write the format clearly, specifically using what computer scientists call a regex or regular expression. Then they'll be an efficient way to get an LLM to reliably generate outputs in that format, because regex can be used to enforce constraints on the next token to be generated one token at a time. I'm delighted to introduce the instructors: Will Kurt and Cameron Pfiffer. Will, is a founding engineer at DotTxt, and Cameron is a developer relations engineer. And they help developers like you to build and integrate reliable structured formats into their LLM apps. Thanks, Andrew. In this course you will first get structured output from models that support structured responses. You also learn about the limitations of this approach. To address some of these limitations. We'll use Instructor, an open source library that re-prompts the model until a valid JSON structure is produced. You will also learn how constrained decoding works. this is the underlying concept behind outlines, our open source library that you will use in this course. While learning all the concepts in this course, you'll work on several cool examples and use cases, including a social media analysis agent. The agent reads user posts, identifies the sentiment, and decides whether or not a response is needed. You can even generate a customer support ticket if there's an issue. All of the Json output. After working with retry-based methods, you'll learn how you can get the structure and output from the get-go with outlines, a library that constrains model outputs at the token level by intercepting the logits the probabilities the model assigns to each next token-Outlines blocks any tokens that don't fit your defined schema or format. This guarantees a valid output without any do-overs. In the last lesson, you will learn how you can generate beyond normal JSON. For example, you will learn how to generate valid phone numbers, email addresses, or even ASCII tic-tac-toe boards; and basically any format you can express in a regex. Many people have worked to create this course. I'd like to thank Rémi Louf and Andrea Pessl from DotTxt. From DeepLearning.AI, Esmaeil Gargari has also contributed to this course. The first lesson will be an introduction to structured output generation. That sounds great. Let's go on to the next video and let's get structured.
course detail
Next Lesson
Getting Structured LLM Output
  • Introduction
    Video
    ・
    3 mins
  • Introduction to Structured Output Generation
    Video
    ・
    13 mins
  • How To Use Structured Outputs
    Video with Code Example
    ・
    11 mins
  • Retry-based Structured Output
    Video with Code Example
    ・
    11 mins
  • Structured Generation with Outlines
    Video with Code Example
    ・
    13 mins
  • Structured Generation: Beyond JSON
    Video with Code Example
    ・
    16 mins
  • Conclusion
    Video
    ・
    1 min
  • Course Feedback
  • Community