xlang-ai / instructor-embedding

[ACL 2023] One Embedder, Any Task: Instruction-Finetuned Text Embeddings
Apache License 2.0
1.78k stars 131 forks source link

how to parse instructions into the chroma - instructor model integration #83

Closed Bobolx00 closed 10 months ago

Bobolx00 commented 10 months ago

hi. in the chroma docs, i can see that there is an embedding function that use instructor models. anyway, the function embedding_functions.InstructorEmbeddingFunction() parse the text without the instruction, as it doesn't accept a "list of lists" as input, and does not provide any "instruction" argument. should I add the instruction at the beginning of the "text" string? (but probably this does not match with the training format of your models....)

thanks in advance

Bobolx00 commented 10 months ago

my fault, found that their function have an optional "instruction" argument