4
[Feature Request] Configurable query/document instructions for embedding models
Source: paperless-ngx/paperless-ngx#14724 · opened by @moedesux
Description Please add optional instruction/prefix settings for the embedding model, applied to query embeddings (and optionally document embeddings), for example: • PAPERLESS_AI_LLM_EMBEDDING_QUERY_INSTRUCTION: text prepended to every query before it is embedded • PAPERLESS_AI_LLM_EMBEDDING_DOCUMENT_INSTRUCTION: text prepended to every chunk before it is embedded (optional; empty by default) Both would default to empty, so current behaviour stays the same. Many current embedding models are trained with asymmetric prompts and lose a lot of retrieval quality when queries are embedded as raw text: • Qwen3-Embedding: Instruct: <task>\nQuery: <query> on the query side only • multilingual-e5 / e5: query: and passage: • nomic-embed-text: search_query: and search_document: • EmbeddingGemma: task prompts such as task: search result | query: Right now there is no way to set these. The openai-like and ollama backends send the raw text, …
No pledges yet. Be the first to back this.
Comments
Similar requests
[Feature Request] AI chat/RAG: cache the embedding model instead of reloading it on every query
2 votes · 0 comments
[Feature Request] Settings for the LLM index queue and embedding retries/timeout
1 vote · 0 comments
[Feature Request] Allow overriding the embeddings encoding_format for OpenAI-compatible LLM providers
4 votes · 0 comments
[Feature Request] Different keys for LLM vs. LLM embeddings
6 votes · 0 comments
Official support for Tesseract tessdata_best OCR models
1 vote · 0 comments
No comments yet.