Code Monkey home page Code Monkey logo

wenyang-ltr's Introduction

Add machine learning to search relevance - Azure Cognitive Search

This tutorial demonstrates the adoption of Learning To Rank to improve search relevance in search applications backed by Azure Cognitive Search. This tutorial highlights how to use the new featuresMode parameter to train a ranking model.

This tutorial is for developers who are looking to improve relevance in their Azure Cognitive Search applications. Azure Cognitive Search provides different ways to control search relevance including scoring profiles and query term boosting. These techniques work well in scenarios where indexed content and user query patterns are relatively static and well understood. In applications where this is not true, machine learning based techniques can be used to tune relevance dynamically.

Why machine learning for ranking?

Machine learned ranking models are highly effective, especially in applications that handle a lot of data and user traffic, such as Bing, Google, Facebook, Twitter, and Netflix. Ranking models are suitable for applications where a notion of what's relevant can be defined and observed. Machine learning based approaches to tune search relevance allow ever-changing information about user behavior and preferences to be injected into the search experience.

Training and serving a ranking model involves lots of "gotchas". This tutorial describes a simple pattern for doing this with Azure Cognitive Search as the retrieval engine where reranking happens on the application side.

Getting Started

If you just want to read the code, skip the "Setup" section.

Setup

Prerequisites

Optional

Installation

  1. Download and install the latest version of Anaconda or Miniconda.
  2. Clone this repository to your local machine.
    • On Windows, make sure to open this repo with an Anaconda command prompt.
    • On Linux or OSX, if you didn't add Anaconda to your system PATH variable, you'll have to source the Anaconda environment manually.
  3. Install the conda environment with conda env create -f environment.yml. Wait for installation to finish.
  4. Activate the environment with conda activate azs-l2r.
  5. Run Jupyter with your choice of jupyter notebook or jupyter lab. Navigate to the tutorial at l2r_part1_data_eng.ipynb and l2r_part2_experiment.ipynb.

One-Click Alternative

  • For a free, runnable link to the notebook, please click on the Binder button below.
  • Please note that MyBinder is a free public service with limited computational resources. Skip the K-Fold cross-validation section if you're running this on Binder.

Binder

wenyang-ltr's People

Contributors

heidisteen avatar shmed avatar wenyangfu avatar yahnoosh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.