Factored interview question

When to use encoder vs decoder models