From the course: Building Apps with AI Tools: ChatGPT, Semantic Kernel, and Langchain

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Building a GenAI test suite for your librarian

Solution: Building a GenAI test suite for your librarian - ChatGPT Tutorial

From the course: Building Apps with AI Tools: ChatGPT, Semantic Kernel, and Langchain

Solution: Building a GenAI test suite for your librarian

(upbeat music) - [Instructor] Okay, our final challenge. Let's dive in. I'm in main.py on branch 05_06. Now, how did we build our solution? I used a lot of the same code that we did when we built our test generation suite from a previous video. I also combined our self-evaluation that we learned from another previous video. So let's go ahead and walk through on how this works. So I have two functions here. The first one generates some book recommendations based on some requests, and the second one generates some book requests. So very similar to what we've seen before. Now I'm going to generate my requests. This is using GPT-4 to come up with phrases that somebody might ask a librarian. So it looks like something like this. Generate one utterance for how someone may ask for a blank, include a genre and a year. And we're just passing in a book. Okay, now let's go up to our book recommendations. And here we're…

Contents