castorini / rank_llm

Repository for prompt-decoding using LLMs (GPT3.5, GPT4, Vicuna, and Zephyr)
http://rankllm.ai
Apache License 2.0
277 stars 36 forks source link

Create results class #54

Closed sahel-sh closed 6 months ago

sahel-sh commented 6 months ago

This cl: 1- creates a Result class and integrates it to retriever. In all retrieval modes the retriever now returns a list[Result] rather than list[dict]. 2- creates a helper 'ResultsWriter` class to take care of writing results to files.

Changing the reranker to read from this new result type will be submitted in a follow up cl.

TESTED=ran all demos of different retrieval modes.