Enviar por SMS: Optimizing document reranking in a retrieval-augmented generation pipeline for Portuguese legal research