Start here / Usage guide
Choose the right input.
Prompting is task-specific. Retrieval uses paired query and passage prompts. Other embedding tasks use plain text.
Retrieval
Use prompt_name="query" for a user query. Use prompt_name="passage" for documents or passages. The model adds the prompt prefix. Do not type the prefix yourself as well.
Other tasks
For classification, clustering and similarity, pass plain text with no prompt.
Limits and vectors
- 512 tokens by default and up to 2,048 tokens opt-in. Set model.max_seq_length = 2048 after loading to opt in.
- Vectors are already unit length.
- No additional normalization is needed before dot-product ranking.
Keep the same task convention throughout an index. A retrieval query and its passages must use their matching prompt names.