IR Baseline

This agent is a simple information retrieval baseline. If label_candidates are provided in the task, it simply ranks them according to their similarity to the input message. To use TF-IDF similarity, you must build a dictionary and “train” on the train set first. See the examples below for clarification.

Basic Examples

Evaluate the IR baseline model (without using TF-IDF) on the Persona-Chat task.

parlai eval_model -m ir_baseline -t personachat

Build a dictionary on the Persona-Chat task, and then evaluate the model using TF-IDF.

parlai train_model -m ir_baseline -t personachat --dict-file /tmp/personachat.dict -ttim 5

DictionaryAgent Options

BPEHelper Arguments

Argument

Description

--bpe-vocab

Path to pre-trained tokenizer vocab

--bpe-merge

Path to pre-trained tokenizer merge

--bpe-dropout

Use BPE dropout during training.

IrBaselineAgent Options

IrBaseline Arguments

Argument

Description

--length-penalty, --lp

Length penalty for responses

Default: 0.5.

--history-size, --hsz

Number of utterances from the dialogue history to take use as the query

Default: 1.

--label-candidates-file

File of candidate responses to choose from

BPEHelper Arguments

Argument

Description

--bpe-vocab

Path to pre-trained tokenizer vocab

--bpe-merge

Path to pre-trained tokenizer merge

--bpe-dropout

Use BPE dropout during training.