-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding fiqa v1.0.0 multifield regressions from the BEIR benchmark (#1842
- Loading branch information
1 parent
d75981e
commit 9c790b9
Showing
4 changed files
with
171 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Anserini Regressions: BEIR (v1.0.0) — fiqa | ||
|
||
This page documents BM25 regression experiments for [BEIR (v1.0.0) — fiqa](http://beir.ai/). | ||
These experiments index the "title" and "text" fields in corpus separately. | ||
At retrieval time, a query is issued across both fields (equally weighted). | ||
|
||
The exact configurations for these regressions are stored in [this YAML file](../src/main/resources/regression/beir-v1.0.0-fiqa-multifield.yaml). | ||
Note that this page is automatically generated from [this template](../src/main/resources/docgen/templates/beir-v1.0.0-fiqa-multifield.template) as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead. | ||
|
||
From one of our Waterloo servers (e.g., `orca`), the following command will perform the complete regression, end to end: | ||
|
||
``` | ||
python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-fiqa-multifield | ||
``` | ||
|
||
## Indexing | ||
|
||
Typical indexing command: | ||
|
||
``` | ||
target/appassembler/bin/IndexCollection \ | ||
-collection BeirMultifieldCollection \ | ||
-input /path/to/beir-v1.0.0-fiqa-multifield \ | ||
-index indexes/lucene-index.beir-v1.0.0-fiqa-multifield/ \ | ||
-generator DefaultLuceneDocumentGenerator \ | ||
-threads 1 -storePositions -storeDocvectors -storeRaw -fields title \ | ||
>& logs/log.beir-v1.0.0-fiqa-multifield & | ||
``` | ||
|
||
For additional details, see explanation of [common indexing options](common-indexing-options.md). | ||
|
||
## Retrieval | ||
|
||
After indexing has completed, you should be able to perform retrieval as follows: | ||
|
||
``` | ||
target/appassembler/bin/SearchCollection \ | ||
-index indexes/lucene-index.beir-v1.0.0-fiqa-multifield/ \ | ||
-topics src/main/resources/topics-and-qrels/topics.beir-v1.0.0-fiqa.test.tsv.gz \ | ||
-topicreader TsvString \ | ||
-output runs/run.beir-v1.0.0-fiqa-multifield.bm25.topics.beir-v1.0.0-fiqa.test.txt \ | ||
-bm25 -removeQuery -hits 1000 -fields contents=1.0 title=1.0 & | ||
``` | ||
|
||
Evaluation can be performed using `trec_eval`: | ||
|
||
``` | ||
tools/eval/trec_eval.9.0.4/trec_eval -c -m ndcg_cut.10 src/main/resources/topics-and-qrels/qrels.beir-v1.0.0-fiqa.test.txt runs/run.beir-v1.0.0-fiqa-multifield.bm25.topics.beir-v1.0.0-fiqa.test.txt | ||
tools/eval/trec_eval.9.0.4/trec_eval -c -m recall.100 src/main/resources/topics-and-qrels/qrels.beir-v1.0.0-fiqa.test.txt runs/run.beir-v1.0.0-fiqa-multifield.bm25.topics.beir-v1.0.0-fiqa.test.txt | ||
tools/eval/trec_eval.9.0.4/trec_eval -c -m recall.1000 src/main/resources/topics-and-qrels/qrels.beir-v1.0.0-fiqa.test.txt runs/run.beir-v1.0.0-fiqa-multifield.bm25.topics.beir-v1.0.0-fiqa.test.txt | ||
``` | ||
|
||
## Effectiveness | ||
|
||
With the above commands, you should be able to reproduce the following results: | ||
|
||
| nDCG@10 | BM25 | | ||
|:-------------------------------------------------------------------------------------------------------------|-----------| | ||
| BEIR (v1.0.0): fiqa | 0.2361 | | ||
|
||
|
||
| R@100 | BM25 | | ||
|:-------------------------------------------------------------------------------------------------------------|-----------| | ||
| BEIR (v1.0.0): fiqa | 0.5395 | | ||
|
||
|
||
| R@1000 | BM25 | | ||
|:-------------------------------------------------------------------------------------------------------------|-----------| | ||
| BEIR (v1.0.0): fiqa | 0.7393 | |
44 changes: 44 additions & 0 deletions
44
src/main/resources/docgen/templates/beir-v1.0.0-fiqa-multifield.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Anserini Regressions: BEIR (v1.0.0) — fiqa | ||
|
||
This page documents BM25 regression experiments for [BEIR (v1.0.0) — fiqa](http://beir.ai/). | ||
These experiments index the "title" and "text" fields in corpus separately. | ||
At retrieval time, a query is issued across both fields (equally weighted). | ||
|
||
The exact configurations for these regressions are stored in [this YAML file](${yaml}). | ||
Note that this page is automatically generated from [this template](${template}) as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead. | ||
|
||
From one of our Waterloo servers (e.g., `orca`), the following command will perform the complete regression, end to end: | ||
|
||
``` | ||
python src/main/python/run_regression.py --index --verify --search --regression ${test_name} | ||
``` | ||
|
||
## Indexing | ||
|
||
Typical indexing command: | ||
|
||
``` | ||
${index_cmds} | ||
``` | ||
|
||
For additional details, see explanation of [common indexing options](common-indexing-options.md). | ||
|
||
## Retrieval | ||
|
||
After indexing has completed, you should be able to perform retrieval as follows: | ||
|
||
``` | ||
${ranking_cmds} | ||
``` | ||
|
||
Evaluation can be performed using `trec_eval`: | ||
|
||
``` | ||
${eval_cmds} | ||
``` | ||
|
||
## Effectiveness | ||
|
||
With the above commands, you should be able to reproduce the following results: | ||
|
||
${effectiveness} |
57 changes: 57 additions & 0 deletions
57
src/main/resources/regression/beir-v1.0.0-fiqa-multifield.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
corpus: beir-v1.0.0-fiqa-multifield | ||
corpus_path: collections/beir-v1.0.0/corpus/fiqa/ | ||
|
||
index_path: indexes/lucene-index.beir-v1.0.0-fiqa-multifield/ | ||
collection_class: BeirMultifieldCollection | ||
generator_class: DefaultLuceneDocumentGenerator | ||
index_threads: 1 | ||
index_options: -storePositions -storeDocvectors -storeRaw -fields title | ||
index_stats: | ||
documents: 57600 | ||
documents (non-empty): 57600 | ||
total terms: 5288635 | ||
|
||
metrics: | ||
- metric: nDCG@10 | ||
command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: -c -m ndcg_cut.10 | ||
separator: "\t" | ||
parse_index: 2 | ||
metric_precision: 4 | ||
can_combine: false | ||
- metric: R@100 | ||
command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: -c -m recall.100 | ||
separator: "\t" | ||
parse_index: 2 | ||
metric_precision: 4 | ||
can_combine: false | ||
- metric: R@1000 | ||
command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: -c -m recall.1000 | ||
separator: "\t" | ||
parse_index: 2 | ||
metric_precision: 4 | ||
can_combine: false | ||
|
||
topic_reader: TsvString | ||
topic_root: src/main/resources/topics-and-qrels/ | ||
qrels_root: src/main/resources/topics-and-qrels/ | ||
topics: | ||
- name: "BEIR (v1.0.0): fiqa" | ||
id: test | ||
path: topics.beir-v1.0.0-fiqa.test.tsv.gz | ||
qrel: qrels.beir-v1.0.0-fiqa.test.txt | ||
|
||
models: | ||
- name: bm25 | ||
display: BM25 | ||
params: -bm25 -removeQuery -hits 1000 -fields contents=1.0 title=1.0 | ||
results: | ||
nDCG@10: | ||
- 0.2361 | ||
R@100: | ||
- 0.5395 | ||
R@1000: | ||
- 0.7393 |