https://promptfoo.dev/ logo
How to use huggingface embeddings models for simil...
# ❓|questions
a
I am trying to override the provider used by the similar assertion so that it uses the huggingface 'all-MiniLM-L6-v2' model. I'm trying to follow the examples outlined here: https://www.promptfoo.dev/docs/configuration/expected-outputs/similar/#overriding-the-provider And have this simple test with irrelevant vars just to try and get the simlar assertion to work:
Copy code
tests:
  - vars:
      context: Two plus two equals five.
      query: What is two plus two?
    assert:
      - type: similar
        value: Hello world
        provider: huggingface:feature-extraction:sentence-transformers/all-MiniLM-L6-v2
When I run it, I get this error: `FAIL API call error: SentenceSimilarityInputsCheck expected dict not str:
__root__
in `parameters`` Am I doing something wrong? Any help appreciated!
i
It looks like
all-MiniLM-L6-v2
was switched over to HF's sentence similarity API 🤔 It doesn't return raw embeddings. That will require a code change on our end to support