179 questions
No questions match those filters.
← All questions
Retrieval & EmbeddingsHard· Generative Retrieval· Decoding· Constraints
How do you fix a generative retriever that returns document IDs that do not exist in the corpus?
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe problem arises because the decoder’s search space includes many strings that do not correspond to real documents. Training alone cannot guarantee that the model will never produce these invalid IDs. A trie mask makes the generation of non-existent IDs impossible by construction, which is more robust than trying to filter results after decoding or hoping that more training data will make invalid IDs improbable.