Expand description
Example selectors for FerricLink Core.
Example selector implements logic for selecting examples to include them in prompts. This allows us to select examples that are most relevant to the input.
Example selectors are crucial for:
- Few-shot learning and prompting
- Dynamic prompt construction
- Semantic similarity-based example selection
- Length-based prompt management
- Max Marginal Relevance algorithms
Structs§
- Length
Based Example Selector - Select examples based on length.
- MaxMarginal
Relevance Example Selector - Select examples based on Max Marginal Relevance (MMR).
- Semantic
Similarity Example Selector - Select examples based on semantic similarity using vector stores.
Traits§
- Base
Example Selector - Interface for selecting examples to include in prompts.
Functions§
- sorted_
values - Utility function to return values in a dictionary sorted by key.
Type Aliases§
- Example
- A type alias for example data