def generate_bio_entity_tags(mentions, sentence_length):
    """
    Generate BIO/IOB2 tags for entity detection task.
    """
    bio_tags = ['O'] * sentence_length
    for mention in mentions:
        start = mention['start']
        end = mention['end']
        bio_tags[start] = 'B-E'
        for i in range(start + 1, end):
            bio_tags[i] = 'I-E'
    return bio_tags