Prompt
You can draft and iterate on prompts on the Literal Prompt Playground. Once you are happy with your prompt, you can save it and use it in your code.
Moving prompts out of your code has several benefits:
- Non technical people can draft and iterate on prompts.
- You can deploy a new version of your prompt without deploying your code.
- You can track which prompt version for a specific generation.
- You can compare prompt versions to see which one performs better.
Get a Prompt
Getting a prompt is the first step to use it in your code. You can get a prompt by its name.
Format a Prompt
Once you got your prompt, you can format it to get messages in the OpenAI format.
Combining prompts with integrations (like the OpenAI integration) allows you to log the generations and to track which prompt versions were used to generate them.
Langchain Chat Template
Since Langchain has a different format for prompts, you can convert a Literal prompt to a Langchain Chat Template.
You can combine the prompt with the Langchain integration to log the generations and to track which prompt versions were used to generate them.
Was this page helpful?