179 questions
No questions match those filters.
Our generative retriever returns document IDs that don’t exist in the corpus. What’s wrong and how do you fix it?
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 issue is structural rather than statistical. In generative retrieval, the decoder ranges over a large space of possible strings (k^L). If the number of possible generated strings significantly exceeds the number of actual documents (N) in the corpus, the model will inevitably produce invalid identifiers.
For example, with a sequence length of 7 and a vocabulary size of 10, there are approximately 1.2 million possible identifiers, many of which will not correspond to an existing document. To resolve this, you must constrain the decoding process. By using a trie-based constraint, you restrict the decoder’s output space to only those sequences that represent valid document IDs present in your corpus.