GithubHelp home page GithubHelp logo

apollohuang1 / hyde Goto Github PK

View Code? Open in Web Editor NEW

This project forked from texttron/hyde

0.0 0.0 0.0 504 KB

HyDE: Precise Zero-Shot Dense Retrieval without Relevance Labels

Python 2.49% Jupyter Notebook 97.51%

hyde's Introduction

HyDE: Precise Zero-Shot Dense Retrieval without Relevance Labels

This is code repository for the paper: HyDE: Precise Zero-Shot Dense Retrieval without Relevance Labels.

HyDE zero-shot instructs GPT3 to generate a fictional document and re-encodes it with unsupervised retriever Contriever to search in its embedding space. HyDE significantly outperforms Contriever across tasks and languages and it does not require any human labeled relevance judgement.

approach

Steps to run the code

  1. Install pyserini by following the guide. We use pyserini to conduct dense retrieval and evaluation.

  2. Download the prebuilt Contrever faiss index

wget  https://www.dropbox.com/s/dytqaqngaupp884/contriever_msmarco_index.tar.gz
tar -xvf contriever_msmarco_index.tar.gz
  1. Setup GPT3 API key
export OPENAI = <your key>
  1. Run hyde-dl19.ipynb, it will run the experiment on the TREC DL19 dataset. Run hyde-demo.ipynb, it will go through HyDE pipeline with an example query.

Citation

@article{hyde,
  title = {Precise Zero-Shot Dense Retrieval without Relevance Labels},
  author = {Luyu Gao and Xueguang Ma and Jimmy Lin and Jamie Callan},
  journal={arXiv preprint arXiv:2212.10496},
  year = {2022}
}

hyde's People

Contributors

mxueguang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.