This repository contains code for reproducing the experiments described in the H&S paper and running the H&S demo.
# Clone the git repository
git clone https://github.com/microsoft/highlight-summarize
# Create a Python virtual environment
python3 -m venv .venv
# Activate the virtual environment (Linux)
source .venv/bin/activate
# Activate the virtual environment (Windows)
.venv\Scripts\Activate.ps1 # On Windows
# Install this project and its dependencies
pip install .[all]
This is done via Microsoft Entra ID. Ensure your machine is authenticated, and then export AZURE_OPENAI_ENDPOINT={your endpoint}.
To add support for an additional client, edit openai_client() at highlight_summarize/utils.py.
The demo app implements a chatbot that answers questions about H&S (based on our paper) by implementing the H&S pattern.
It has additional requirements. To run it:
pip install .[demo]
cd demo
bash run.sh
Note By default, the demo app listens on 0.0.0.0. You may want to change this to localhost by editing demo/run.sh.
To reproduce the experiments, head over to reproduce.
To check out the proofs of our theory section go to proofs.
Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
