From the course: Prompt Engineering with LangChain
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Prompt versioning in LangSmith
From the course: Prompt Engineering with LangChain
Prompt versioning in LangSmith
- [Instructor] Utilizing the latest version of a prompt can lead to some unpredictable issues in production environments. For more stable and consistent deployments, it's advisable to use specific prompt versions. LangChain Hub supports pulling prompts by their specific commit hash. This ensures that you're using the exact version of the prompt needed for your application. To specify the version, you'd use a pattern like this. You simply just add the version tag to the prompt ID in the pull command. Here's a Python snippet for reference. Let's go ahead and load a prompt from the LangChain Hub. Specifically. We are going to load this prompt, which we have created in the previous video. So we'll write a function here that is just going to pull the prompt from LangChain and then push the prompt from LangChain. We will instantiate an LLM, because we want to do some generations with it. The repo is going to be the Linkedin-learning-example, which is what this is called, and it's coming…
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.