Prompt templates

Langchain prompting : Sample notebook

Demonstrates the use of Langchain prompt template classes.

Local Jupyter Lab setup

prompts-template-sample-code

Google Colab

  • Don’t forget to follow the instructions for setting up langchain package in notebook runtime
Open In Colab

Model prompt specificity

Code does not carry out invocation of model; just creates the instances of model to demonstrate working of the conditional prompts. You do not need valid API keys unless you want to try the model invocation as well.

Local Jupyter Lab setup

langchain-conditional-prompt-selector

Google Colab

Open In Colab