File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -732,6 +732,11 @@ <h3 id="adding-a-fixed-string-to-a-query-text">Adding a fixed string to a query
732732 Find a complete example in the < a href ="https://github.com/vespa-engine/sample-apps/tree/master/colbert "> ColBERT</ a >
733733 sample application.
734734</ p >
735+ < p >
736+ The < code > <prepend></ code > element is also supported by the
737+ < a href ="../reference/rag/embedding.html#openai-embedder-reference-config "> OpenAI embedder</ a > ,
738+ which is useful for OpenAI-compatible instruction-tuned models that expect a task-specific prefix.
739+ </ p >
735740< p >
736741 An alternative approach is using query profiles to prepend query data.
737742 If you need to add a standard wrapper or a prefix instruction around the input text you want to embed
Original file line number Diff line number Diff line change @@ -661,6 +661,24 @@ <h3 id="openai-embedder-reference-config">OpenAI embedder reference config</h3>
661661 < td > element</ td >
662662 < td > disabled</ td >
663663 </ tr >
664+ < tr >
665+ < td > prepend</ td >
666+ < td > Optional</ td >
667+ < td > Strings prepended to the text input before sending the embedding request. Useful for
668+ OpenAI-compatible instruction-tuned models that expect a task-specific prefix.
669+ < ul >
670+ < li > Element <query> - Optional query prepend instruction.</ li >
671+ < li > Element <document> - Optional document prepend instruction.</ li >
672+ </ ul >
673+ < pre > {% highlight xml %}
674+ < prepend >
675+ < query > query: </ query >
676+ < document > passage: </ document >
677+ </ prepend > {% endhighlight %}</ pre >
678+ </ td >
679+ < td > Optional <query> <document> elements.</ td >
680+ < td > </ td >
681+ </ tr >
664682 </ tbody >
665683</ table >
666684
You can’t perform that action at this time.
0 commit comments