# Dual Encoder Also known as a **bi-encoder**. These work with vector spaces. All documents are encoded into the vector space. Then, when a query arrives it is passed through the model and we see what it's nearest neighbor is (the nearest document) in the vector space. ![](Introduction%20-%20Recent%20Developments%20in%20Neural%20Search%203-3%20screenshot.png) ![](Introduction%20-%20Recent%20Developments%20in%20Neural%20Search%205-7%20screenshot.png) ### How to train these bi/dual encoders? ![](Introduction%20-%20Recent%20Developments%20in%20Neural%20Search%205-16%20screenshot.png) ![](Introduction%20-%20Recent%20Developments%20in%20Neural%20Search%207-16%20screenshot.png) ![](Introduction%20-%20Recent%20Developments%20in%20Neural%20Search%207-38%20screenshot.png) --- Date: 20230607 Links to: Tags: References: * [Introduction - Recent Developments in Neural Search - YouTube](https://www.youtube.com/watch?v=ukIYZw3uRX0)