Write your own pipeline
Add a dataset
Inherit from
retrieval_qa_benchmark.schema.BaseDatasetImplement
buildfunction that parse your data to list ofretrieval_qa_benchmark.schema.QARecord.Register your dataset with
retrieval_qa_benchmark.utils.registry.REGISTRY.register_datasetlike this:
@retrieval_qa_benchmark.utils.registry.REGISTRY.register_dataset("type name you want")
class YourDataset(retrieval_qa_benchmark.schema.BaseDataset):
pass
Create a PR on github.
Add a transform
Inherit from
retrieval_qa_benchmark.schema.BaseTransform.- Implement any of
retrieval_qa_benchmark.schema.BaseTransform.transform_questionretrieval_qa_benchmark.schema.BaseTransform.transform_choicesretrieval_qa_benchmark.schema.BaseTransform.transform_contextand other fields you would like to change in
QARecord
Register your transform with
retrieval_qa_benchmark.utils.registry.REGISTRY.register_transformlike this:
@retrieval_qa_benchmark.utils.registry.REGISTRY.register_transform("type name you want")
class YourTransform(retrieval_qa_benchmark.schema.BaseTransform):
pass
Create a PR on github
Add a LLM
Inherit from
retrieval_qa_benchmark.schema.BaseLLM- Implement all of below
Register your language model with
retrieval_qa_benchmark.utils.registry.REGISTRY.register_modellike this:
@retrieval_qa_benchmark.utils.registry.REGISTRY.register_model("type name you want")
class YourLLM(retrieval_qa_benchmark.schema.BaseLLM):
pass
Create a PR on github
Add a evaluator
Inherit from
retrieval_qa_benchmark.schema.BaseEvaluatorChange the
matcherfunction ofretrieval_qa_benchmark.schema.BaseEvaluatorlike thisRegister your dataset with
retrieval_qa_benchmark.utils.registry.REGISTRY.register_evaluatorlike this:
@retrieval_qa_benchmark.utils.registry.REGISTRY.register_evaluator("type name you want")
class YourLLM(retrieval_qa_benchmark.schema.BaseLLM):
pass
Create a PR on github