Skip to content
The Chat Archive
Mistralmistral-medium-2505· Mistral AIHugging Face LMArena Human Preference 140K

softcosine(a,b)= ∑ i,j ​ s ij ​ a i ​ a j ​ ​ ∑ i,j ​ s ij ​ b i ​ b j ​ ​ ∑ i,j ​ s ij…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Mistralmistral-small-2506’s answer.
  1. User

    soft_cosine(a,b)= ∑ i,j ​ s ij ​ a i ​ a j ​

    ​

    ∑ i,j ​ s ij ​ b i ​ b j ​

    ​

    ∑ i,j ​ s ij ​ a i ​ b j ​

    ​

    Gdzie:

    a_i i b_j to wagi (np. TF-IDF) słów w dokumentach a i b.

    s_ij to podobieństwo między słowem i a słowem j z naszej macierzy podobieństwa.

    How to write it in markdown to. be well formatted?

  2. Mistral Assistant

    Here's how you can write the soft cosine formula in Markdown to ensure it's well-formatted:

    The soft cosine similarity between vectors **a** and **b** is defined as:
    
    $$
    \text{soft\_cosine}(a, b) = \frac{\sum_{i,j} s_{ij} a_i a_j}{\sqrt{\sum_{i,j} s_{ij} a_i a_j} \sqrt{\sum_{i,j} s_{ij} b_i b_j}} \sum_{i,j} s_{ij} a_i b_j
    $$
    
    Where:
    - \( a_i \) and \( b_j \) are weights (e.g., TF-IDF) of words in documents **a** and **b**.
    - \( s_{ij} \) is the similarity between word \( i \) and word \( j \) from the similarity matrix.
    

    Notes:

    1. The formula is written using LaTeX-style math notation within $$ ... $$ for display-style equations.
    2. The description is formatted as a bulleted list for clarity.
    3. If you're using a platform that doesn't support LaTeX (like some basic Markdown editors), you might need to use plain text or Unicode symbols instead.

    Alternative (if LaTeX isn't supported):

    The soft cosine similarity between vectors a and b is defined as:
    
    soft_cosine(a, b) = [ ∑_i,j s_ij * a_i * a_j ] / sqrt( ∑_i,j s_ij * a_i * a_j ) * sqrt( ∑_i,j s_ij * b_i * b_j ) * ∑_i,j s_ij * a_i * b_j
    
    Where:
    - a_i and b_j are weights (e.g., TF-IDF) of words in documents a and b.
    - s_ij is the similarity between word i and word j from the similarity matrix.
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.