Leveraging Domain Knowledge at Inference Time for LLM Translation: Retrieval versus Generation