## Simple Contrastive Learning of Sentence Embeddings

Tianyu Gao Xingcheng Yao Danqi Chen
Princeton University Tsinghua University

SimCSE is a novel framework for contrastive learning of sentence embeddings. This demo shows how our pre-trained sentence embeddings can be directly applied to sentence retrieval tasks. You can type any natural language sentences and click the search button to see which sentences in the example database are semantically similar to the provided sentence. Here are some details about this demo:

- Retrieved sentences are coming from STS-Benchmark dataset
- Two hyperparameters can be adjusted: (1) Top-K: the maximum number of sentences to be displayed (2) Threshold: the minimum similarity score for a sentence to be retrieved
- We use Faiss to accelerate the sentence retrieval process

Top K: 5
Threshold: 0.6