Agent-ModernColBERT
State-of-the-Art ColBERT Model for Agentic Retrieval
Tl;Dr
A few weeks ago, we evaluated Reason-ModernColBERT, a 150M late-interaction model trained on ReasonIR data nearly solved BrowseComp-Plus, reaching 87.56% accuracy with GPT-5 (a +7.59 absolute jump over the previous SOTA) while topping recall and calibration error, while not being trained for agentic retrieval at all (and being one year old).
We now present Agent-ModernColBERT, a model specifically fine-tuned for agentic retrieval using the AgentIR dataset released alongside AgentIR. You can find the training boilerplate here. This very lightweight fine-tuning adds increase the performance of Reason-ModernColBERT by another 10%, which allows, when exposing the get_document function and the GPT-OSS-120B model, to beat the original GPT-5 + Qwen3-8B runs, while using a retriever model 54× smaller and an open source LLM.
How it works
Before issuing a query, deep research agents generate explicit reasoning traces describing what they're looking for and why.
Conventional retrievers throw all of that away. The AgentIR paper introduced Reasoning-Aware Retrieval: instead of discarding those reasoning traces, concatenate them to the query you send to the retriever. To enable this, the authors generated trajectories from a deep-research agent and released them (the Tevatron/AgentIR-data dataset), then trained AgentIR-4B, a 4B dense model that beats much larger baselines including ReasonIR-8B and rerank pipelines.
BrowseComp-Plus Results
The get_document column indicates whether the LLM was exposed to the possibility of using the get_document function that allows, in addition to the usual search function that returns a snippet of the top-5 documents for a given query (the beginning of the document), to request the full content of a document using its id.
It allows the model to get more information when needed, but can also add noise to the process if the model reads full documents that are irrelevant, and thus require a precise retrieval signal.
A few things worth highlighting:
- With the
get_document function exposed, Agent-ModernColBERT + GPT-OSS-120B reaches 72.53, higher than the original GPT-5 + Qwen3-8B setup (which doesn't expose get_document).
- Agent-ModernColBERT is **competitive with the single-vector AgentIR-4B** despite being **26× smaller** and trained on the exact same data, direct evidence that late interaction is the right inductive bias for reasoning-trace-augmented queries.
- We use the same prompt as AgentIR to keep the comparison clean (down to a wrongly-escaped line break, for full reproducibility). The prompt has a small but positive effect, as discussed in the next section.
Query format (⚠️ important)
Agent-ModernColBERT was trained on the AgentIR query format, which prepends an instruction and concatenates the agent's reasoning trace with the search query. Documents are encoded as plain text, no prefix.
The exact query layout is:
A few non-obvious details worth flagging:
- The instruct prefix itself ends with a literal
\nQuery: (a backslash followed by n, 2 characters — not a newline). This is inherited byte-for-byte from the AgentIR training script and the model expects it.
- As a consequence, the word
Query: appears twice in every query — once at the end of the prefix, once as a real label before the search query.
- If you don't have a reasoning trace, pass the literal string
"Empty" (this matches the AgentIR agent loop).
Helper:
Then encode normally with is_query=True for queries and is_query=False for documents:
If you rather want to use a simpler version without the prefix (just reasoning + query), you can use the no-prefix version, at the cost of slighlty lower performance:
Caveats on the get_document setup
get_document is a net improvement in most cases, but the gains depend on both the retrieval model and the agent. The very strong numbers above are not a given for every combination. We tried adding more get_document data points, but were not able to reproduce the original AgentIR results exactly (small deltas remain after fixing environments). We therefore omit those points from the comparison: although they look favorable to Agent-ModernColBERT, we can't yet rule out GPT-OSS-side errors.
Multi-vector embedding model based on lightonai/GTE-ModernColBERT-v1
This is a multi-vector (ColBERT-style late interaction) embedding model finetuned from lightonai/GTE-ModernColBERT-v1 on the agent_ir-data dataset. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
Model Details
Model Description
- Model Type: Multi-vector embedding model
- Base model: lightonai/GTE-ModernColBERT-v1
- Document Length: 4096 tokens
- Query Length: 8192 tokens
- Output Dimensionality: 128 tokens
- Similarity Function: MaxSim
- Training Dataset:
- Language: en
- License: Apache 2.0
Model Sources
Full Model Architecture
Usage
Sentence Transformers
This model can be used with Sentence Transformers as a multi-vector (ColBERT-style late interaction) retriever via the MultiVectorEncoder:
PyLate
First install the PyLate library:
Retrieval
Use this model with PyLate to index and retrieve documents. The index uses FastPLAID for efficient similarity search.
Indexing documents
Load the ColBERT model and initialize the PLAID index, then encode and index your documents:
Note that you do not have to recreate the index and encode the documents every time. Once you have created an index and added the documents, you can re-use the index later by loading it:
Retrieving top-k documents for queries
Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
To do so, initialize the ColBERT retriever with the index you want to search in, encode the queries and then retrieve the top-k documents to get the top matches ids and relevance scores.
Note that queries must be wrapped with format_query() — see the Query format section above. Pass the agent's reasoning trace as the first argument, or None if you don't have one.
Reranking
If you only want to use the ColBERT model to perform reranking on top of your first-stage retrieval pipeline without building an index, you can simply use the rank function and pass the queries and documents to rerank.
As with retrieval, queries must be wrapped with format_query() (see the Query format section). Documents are encoded as plain text — no prefix.
Training Details
Training Dataset
agent_ir-data
- Dataset: agent_ir-data at 3f67a6a
- Size: 5,238 training samples
- Columns:
query, positive, negative_0, negative_1, negative_2, negative_3, negative_4, negative_5, and negative_6
- Approximate statistics based on the first 1000 samples:
- Samples:
- Loss:
pylate.losses.cached_contrastive.CachedContrastive
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 32
per_device_eval_batch_size: 32
learning_rate: 3e-06
num_train_epochs: 2
bf16: True
dataloader_num_workers: 8
accelerator_config: {'split_batches': True, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
All Hyperparameters
Click to expand
overwrite_output_dir: False
do_predict: False
eval_strategy: no
prediction_loss_only: True
per_device_train_batch_size: 32
per_device_eval_batch_size: 32
per_gpu_train_batch_size: None
per_gpu_eval_batch_size: None
gradient_accumulation_steps: 1
eval_accumulation_steps: None
torch_empty_cache_steps: None
learning_rate: 3e-06
weight_decay: 0.0
adam_beta1: 0.9
adam_beta2: 0.999
adam_epsilon: 1e-08
max_grad_norm: 1.0
num_train_epochs: 2
max_steps: -1
lr_scheduler_type: linear
lr_scheduler_kwargs: {}
warmup_ratio: 0.0
warmup_steps: 0
log_level: passive
log_level_replica: warning
log_on_each_node: True
logging_nan_inf_filter: True
save_safetensors: True
save_on_each_node: False
save_only_model: False
restore_callback_states_from_checkpoint: False
no_cuda: False
use_cpu: False
use_mps_device: False
seed: 42
data_seed: None
jit_mode_eval: False
bf16: True
fp16: False
fp16_opt_level: O1
half_precision_backend: auto
bf16_full_eval: False
fp16_full_eval: False
tf32: None
local_rank: 6
ddp_backend: None
tpu_num_cores: None
tpu_metrics_debug: False
debug: []
dataloader_drop_last: True
dataloader_num_workers: 8
dataloader_prefetch_factor: None
past_index: -1
disable_tqdm: False
remove_unused_columns: True
label_names: None
load_best_model_at_end: False
ignore_data_skip: False
fsdp: []
fsdp_min_num_params: 0
fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
fsdp_transformer_layer_cls_to_wrap: None
accelerator_config: {'split_batches': True, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
parallelism_config: None
deepspeed: None
label_smoothing_factor: 0.0
optim: adamw_torch_fused
optim_args: None
adafactor: False
group_by_length: False
length_column_name: length
project: huggingface
trackio_space_id: trackio
ddp_find_unused_parameters: None
ddp_bucket_cap_mb: None
ddp_broadcast_buffers: False
dataloader_pin_memory: True
dataloader_persistent_workers: False
skip_memory_metrics: True
use_legacy_prediction_loop: False
push_to_hub: False
resume_from_checkpoint: None
hub_model_id: None
hub_strategy: every_save
hub_private_repo: None
hub_always_push: False
hub_revision: None
gradient_checkpointing: False
gradient_checkpointing_kwargs: None
include_inputs_for_metrics: False
include_for_metrics: []
eval_do_concat_batches: True
fp16_backend: auto
push_to_hub_model_id: None
push_to_hub_organization: None
mp_parameters:
auto_find_batch_size: False
full_determinism: False
torchdynamo: None
ray_scope: last
ddp_timeout: 1800
torch_compile: False
torch_compile_backend: None
torch_compile_mode: None
include_tokens_per_second: False
include_num_input_tokens_seen: no
neftune_noise_alpha: None
optim_target_modules: None
batch_eval_metrics: False
eval_on_start: False
use_liger_kernel: False
liger_kernel_config: None
eval_use_gather_object: False
average_tokens_across_devices: True
prompts: None
batch_sampler: batch_sampler
multi_dataset_batch_sampler: proportional
router_mapping: {}
learning_rate_mapping: {}
Training Logs
Click to expand
Framework Versions
- Python: 3.12.12
- Sentence Transformers: 5.1.1
- PyLate: 1.3.4
- Transformers: 4.57.3
- PyTorch: 2.9.0+cu128
- Accelerate: 1.12.0
- Datasets: 4.6.1
- Tokenizers: 0.22.2
Citation
BibTeX
Agent-ModernColBERT
AgentIR
Sentence Transformers
PyLate
CachedContrastive