Skip to content

Fix wrong comparison of embeddings #2

@nachoalonsoportillo

Description

@nachoalonsoportillo

Issue Overview

The embeddings being compared are those of answer given in code as "3rd century" with those of answer provided by model for question "When was tea discovered?", which is correct, and those of answer provided by model for question "When was tea discovered?" with itself, which is incorrect.

Describe your environment

Steps to Reproduce

  1. Run code in branch 05_03.

Expected Behavior

Current Behavior

Possible Solution

Replace this code

for i in range(0, len(question_answers)*2, 2):

with this code:

for i in range(0, len(question_answers)):

And this code

embedding_b = resp['data'][len(question_answers)]['embedding']

with this code:

embedding_b = resp['data'][i+len(question_answers)]['embedding']

Screenshots / Video

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions