# FewShotPromptWithTemplates

> **Class** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates)

Prompt template that contains few shot examples.

## Signature

```python
FewShotPromptWithTemplates(
    self,
    *args: Any = (),
    **kwargs: Any = {},
)
```

## Extends

- `StringPromptTemplate`

## Properties

- `examples`
- `example_selector`
- `example_prompt`
- `suffix`
- `example_separator`
- `prefix`
- `template_format`
- `validate_template`
- `model_config`

## Methods

- [`get_lc_namespace()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/get_lc_namespace)
- [`check_examples_and_selector()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/check_examples_and_selector)
- [`template_is_valid()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/template_is_valid)
- [`format()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/format)
- [`aformat()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/aformat)
- [`save()`](https://reference.langchain.com/python/langchain-core/prompts/few_shot_with_templates/FewShotPromptWithTemplates/save)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/6fb37dba71da807af60aa7b909f71f0625a666bf/libs/core/langchain_core/prompts/few_shot_with_templates.py#L19)