Prompt Templates

Prompt Templates are what exactly what they sound like, they are templates that are used to instruct the Large Language Model on how to make sense of the data and how to respond to it, they can be used in LangChain to retrieve data from the LLM and then use the response in the Chains to chain other prompts to get a desired output.

These prompt templates can have variables which can by dynamically injected during the conversation as per need thus focusing on flexibility, re usability and modularity. They are also used to set the system prompt and give context on how the LLM should respond with the given context.

Example:

  • you are a customer representative
  • you are a local shopkeeper in a remote village of Andhra Pradesh etc etc.
  • you are a street vendor with an ego higher that Mount Everest.