From the course: Hands-On Generative AI: Applying Your Tabular Data With ChatGPT, GPT-4, and LangChain
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Custom prompt template - ChatGPT Tutorial
From the course: Hands-On Generative AI: Applying Your Tabular Data With ChatGPT, GPT-4, and LangChain
Custom prompt template
- [Instructor] There are three roles in the conversations with large language model, the system, the user, and the AI assistant. It's similar to the relationship of the manager, the customer, and the waiter in a restaurant. Customers ask questions and make queries. For example: What's the special of the day? I'd like a sandwich, please. The AI assistant or waiter will answer your questions and provide you surveys based on your requests. And the system role is like the manager who sets the tone and the guidelines for how things work. It provides the rules for our interactions. To customize the prompt, we first need to import some schema and the templates from langchain. Here we craft our own system message, setting the stage for the AI's behavior. For example, we tell the model: You are helpful assistant Lilis using the following pieces of context from a private data set to answer user's question. If you don't know the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.