Files
langchain/docs/docs/concepts/example_selectors.mdx
Eugene Yurtsev f2dbf01d4a Docs: Re-organize conceptual docs (#27047)
Reorganization of conceptual documentation

---------

Co-authored-by: Lance Martin <122662504+rlancemartin@users.noreply.github.com>
Co-authored-by: Lance Martin <lance@langchain.dev>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-10-22 22:08:20 -04:00

20 lines
781 B
Plaintext

# Example selectors
:::note Prerequisites
- [Chat models](/docs/concepts/chat_models/)
- [Few-shot prompting](/docs/concepts/few_shot_prompting/)
:::
## Overview
One common prompting technique for achieving better performance is to include examples as part of the prompt. This is known as [few-shot prompting](/docs/concepts/few_shot_prompting).
This gives the [language model](/docs/concepts/chat_models/) concrete examples of how it should behave.
Sometimes these examples are hardcoded into the prompt, but for more advanced situations it may be nice to dynamically select them.
**Example Selectors** are classes responsible for selecting and then formatting examples into prompts.
## Related resources
* [Example selector how-to guides](/docs/how_to/#example-selectors)