Adaptive Retrieval component for Efficient Retrieval
Project description
FFAR
Adaptive Retrieval component for Efficient Retrieval
Installation
Install the package via pip:
pip install ff-adaptive
Getting Started
- Create an Index
- Run the following code:
import pyterrier as pt
from pyterrier_adaptive import CorpusGraph
from ff_adaptive import FFAdaptive
if __name__ == "__main__":
corpus_graph = CorpusGraph.from_hf("macavaney/msmarco-passage.corpusgraph.bm25.128")
dataset = pt.get_dataset(f"irds:msmarco-passage/trec-dl-2019/judged")
index = pt.IndexFactory.of("/path/to/your/index") # Replace with index path
bm25 = pt.terrier.Retriever(index, wmodel="BM25")
rerank_model = pt.terrier.Retriever(index, wmodel="BM25") # Replace with a re-ranker of choice
pipeline = bm25 >> FFAdaptive(corpus_graph=corpus_graph, retriever=bm25, k=16) >> rerank_model
result = pipeline.transform(dataset.get_topics())
print(result)
Citation
@inproceedings{rear2025,
title = {Resource Efficient Adaptive Retrieval},
author = {Martijn Smits},
year = {2025},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ff_adaptive-0.1.1.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ff_adaptive-0.1.1.tar.gz.
File metadata
- Download URL: ff_adaptive-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41499930787b548be72d27ee3735d622d947cece54d48f4f13ce86af769c7e5
|
|
| MD5 |
7810f5a65253284d7f00f0c16b82cd50
|
|
| BLAKE2b-256 |
024835db5ff7338b8a56f8d7aa5135ff0c685e72f32db637eb75e38790cc8f93
|
File details
Details for the file ff_adaptive-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ff_adaptive-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fdbe72477e3878eb452fe29c1a3b9d9b4c4eeae7a50abfdede0c454f2ad307b
|
|
| MD5 |
e08c509b45e3f4149501a5315bd2f3db
|
|
| BLAKE2b-256 |
9cb60bc22c920e1873d52c24351e9e26e7e8ace207c22a90fcdef25392cc585d
|