发布

  • Fix remap_column_names (#140)

    frostbyte_neo 发布于 2023-09-15 18:28:06 +00:00

    When I try to do the following, I got error:

    ds = Dataset.from_dict(
        {
            "question": ["question"],
            "answer": ["answer"],
            "contexts": [["context"]],
        }
    )
    
    from ragas import evaluate
    from ragas.metrics import Faithfulness
    
    evaluate(dataset =ds, metrics=[Faithfulness(batch_size=1)])
    
    KeyError: "Column ground_truths not in the dataset. Current columns in the dataset: ['question', 'answer', 'contexts']"
    

    But ground_truths is not needed for Faithfulness .

    This PR is to fix it.

    下载附件