Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rag metrics #508

Merged
merged 23 commits into from
Jan 23, 2024
Merged

Rag metrics #508

merged 23 commits into from
Jan 23, 2024

Conversation

assaftibm
Copy link
Member

@assaftibm assaftibm commented Jan 22, 2024

  • New RAG metrics (details below)
  • A new tool for executing evaluation metrics on an input DataFrame, and setting results as new columns in the DataFrame
  • Updates to the Perplexity metric

List of added RAG metrics:

  • reference-less:

    • context-relevance:

      • metrics.rag.context_relevance
    • faithfulness:

      • metrics.rag.faithfulness

      • metrics.rag.k_precision

      • metrics.rag.bert_k_precision

    • answer-relevance:

      • metrics.rag.answer_relevance
  • reference-based:

    • context-correctness:
      • metrics.rag.mrr
      • metrics.rag.map
    • answer-correctness:
      • metrics.rag.correctness
      • metrics.rag.recall
      • metrics.rag.bert_recall

Copy link
Member

@matanor matanor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left just one small question

prepare/metrics/rag.py Show resolved Hide resolved
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (ab14e92) 94.18% compared to head (df0985a) 94.13%.

Files Patch % Lines
src/unitxt/eval_utils.py 41.66% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
- Coverage   94.18%   94.13%   -0.06%     
==========================================
  Files         193      194       +1     
  Lines        7759     7803      +44     
==========================================
+ Hits         7308     7345      +37     
- Misses        451      458       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Assaf Toledo <assaf.toledo@ibm.com>
@assaftibm assaftibm merged commit f7aebec into main Jan 23, 2024
4 of 6 checks passed
@elronbandel elronbandel deleted the rag_metrics branch April 8, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants