Prompt Templates

Prompt templates are pre-defined templates can contain instructions, context, few-shot examples, and questions that are appropriate for a particular task. They provide a structured framework for crafting prompts, incorporating relevant context and variables tailored to specific tasks.

Karini AI provides a repository of managed prompt templates for various cases which is automatically made available to users on bootstrap. Users also have options to create customized prompt templates as needed, or save a well-written prompt as a prompt template to enable it's reusability.

Create New Prompt Template

You can create a custom prompt template by updating an existing template with new instructions, or create a new template from scratch.

  1. On the Prompt Templates panel, click Add New.

  2. Provide a prompt template name and select an appropriate task from the available list.

    1. Classification

    2. Summarization

    3. QnA

    4. Evaluation

    5. Agent

  3. Write prompt instructions for the selected task. The instructions may include context, variables, few-shot-examples.

  4. Preview the generated prompt template on the right hand side panel.

  5. Save the prompt template.

Prompt templates improve usability and maintenance of shared prompt logic. You can define a prompt template once and reuse it to avoid duplication. For instance, create a “summarize article” template and use it whenever a summary is needed.

Last updated