# 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.&#x20;

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. &#x20;

### 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.&#x20;
   1. Classification
   2. Summarization
   3. Evaluation
   4. Agent
   5. Deep Agent (Beta)
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.&#x20;
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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://karini-ai.gitbook.io/karini-ai-documentation/prompt-management/prompt-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
