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

fix: Add Korean AutoRAGRetrieval #1388

Merged
merged 10 commits into from
Nov 11, 2024
Merged

Conversation

yjoonjang
Copy link
Contributor

@yjoonjang yjoonjang commented Nov 5, 2024

Adding datasets checklist

Reason for dataset addition:
This is a Korean Retrieval benchmark dataset covering 5 domains: Finance, Public, Medicine, Law, Commerce

  • I have run the following models on the task (adding the results to the pr). These can be run using the mteb -m {model_name} -t {task_name} command.
    • sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
      • {"ndcg_at_1": 0.29825, "ndcg_at_5": 0.3973, "ndcg_at_10": 0.42296}
    • intfloat/multilingual-e5-small
      • {"ndcg_at_1": 0.59649, "ndcg_at_5": 0.73205, "ndcg_at_10": 0.75466}
  • I have checked that the performance is neither trivial (both models gain close to perfect scores) nor random (both models gain close to random scores).
  • If the dataset is too big (e.g. >2048 examples), considering using self.stratified_subsampling() under dataset_transform()
  • I have filled out the metadata object in the dataset file (find documentation on it here).
  • Run tests locally to make sure nothing is broken using make test.
  • Run the formatter to format the code using make lint.

ruff format . 			# running ruff formatting
716 files left unchanged
ruff check . --fix  	# running ruff linting
All checks passed!
@yjoonjang
Copy link
Contributor Author

Hello, I tried to contribute this AutoRAGRetrieval task, but I got some errors while testing. Can I please get some help?
My codes are in mteb/tasks/Retrieval/kor/AutoRAGRetrieval.py

Thank you.

Comment on lines 22 to 30
date=None,
form=None,
domains=None,
task_subtypes=None,
license=None,
socioeconomic_status=None,
annotations_creators=None,
dialect=None,
text_creation=None,
Copy link
Contributor

@KennethEnevoldsen KennethEnevoldsen Nov 5, 2024

Choose a reason for hiding this comment

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

If the metadata is not filled out you will get an error in the tests. Let me know if there are any problems with these.

mteb/tasks/Retrieval/kor/AutoRAGRetrieval.py Show resolved Hide resolved
@KennethEnevoldsen KennethEnevoldsen changed the title Add AutoRAGRetrieval for Korean embedding model fix: Add Korean AutoRAGRetrieval Nov 7, 2024
@KennethEnevoldsen
Copy link
Contributor

@yjoonjang I think we are almost there. Will you complete the checklist for adding a new dataset?

I also want to double check that annotations are human and not LLM generated?

@yjoonjang
Copy link
Contributor Author

yjoonjang commented Nov 10, 2024

Hello, @KennethEnevoldsen

  • I'm sorry, but I when I try to test with the dataset AutoRAGRetrieval, I still get this error: "KeyError: 'AutoRAGRetrieval' not found. Did you mean: DuRetrieval?"

    • My command was this: mteb run -m sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 -t AutoRAGRetrieval
    • I added my dataset name to Retrieval/__init__.py, but I don't know why I get this issue. Cand I get some help please?
  • And yes, this dataset is not LLM-generated.

@Samoed
Copy link
Collaborator

Samoed commented Nov 10, 2024

I tried to run your code and maybe you need to reinstall your package to fix your problems, because I can run task like this mteb run -m intfloat/multilingual-e5-small -t AutoRAGRetrieval

@yjoonjang
Copy link
Contributor Author

I tried to run your code and maybe you need to reinstall your package to fix your problems, because I can run task like this mteb run -m intfloat/multilingual-e5-small -t AutoRAGRetrieval

I still had the same error, but I ran the test by python code.
I updated the scores on the checklist !!
It would be great if you could check it.

Thank you, @KennethEnevoldsen @Samoed

@yjoonjang
Copy link
Contributor Author

I have deleted the descriptive_stats in TaskMetadata field and made it to a json file with running calculated_metadata_metrics.

@yjoonjang
Copy link
Contributor Author

yjoonjang commented Nov 11, 2024

I got these results sentence-transformers__paraphrase-multilingual-MiniLM-L12-v2 AutoRAGRetrieval.json intfloat__multilingual-e5-small AutoRAGRetrieval.json

This corresponds with the results I attatched on the checklist above!

@Samoed
Copy link
Collaborator

Samoed commented Nov 11, 2024

Results for the e5-small model are slightly different. I suspect this is because I overlooked that the model should be initialized with model = mteb.get_model(model_name) rather than directly with SentenceTransformer. Using SentenceTransformer directly would skip the prompts.

@yjoonjang
Copy link
Contributor Author

Results for the e5-small model are slightly different. I suspect this is because I overlooked that the model should be initialized with model = mteb.get_model(model_name) rather than directly with SentenceTransformer. Using SentenceTransformer directly would skip the prompts.

Oh yes. I tested with model = mteb.get_model(model_name) and got the same reslult as yours.
I don't really know why. Because e5-small doesn't need prompts.
Do you have some opinions?
And also, is this the end of contribution, or do I have to do anything else ?

@KennethEnevoldsen
Copy link
Contributor

I don't really know why. Because e5-small doesn't need prompts.

e5 does use prompts though they are minimal (e.g. "query: " ).

Copy link
Contributor

@KennethEnevoldsen KennethEnevoldsen left a comment

Choose a reason for hiding this comment

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

Things looks good on my end - @Samoed feel free to merge this in if you feel the same

@Samoed Samoed merged commit f79d9ba into embeddings-benchmark:main Nov 11, 2024
10 checks passed
@yjoonjang
Copy link
Contributor Author

Thank you so much for your help.
Is my point automatically updated, or do I have to add my contribution to points folder ?

@KennethEnevoldsen
Copy link
Contributor

@yjoonjang we no longer take point for the MMTEB contribution (it has already been submitted). However you will appear as a contributor on MTEB.

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.

3 participants