0
0
Prompt Engineering / GenAIml~20 mins

Hierarchical chunking in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Hierarchical Chunking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the purpose of hierarchical chunking

What is the main advantage of using hierarchical chunking in machine learning models?

AIt increases the speed of training by using only the first layer of data representation.
BIt allows models to process data at multiple levels of abstraction, improving understanding of complex structures.
CIt reduces the size of the dataset by removing irrelevant features before training.
DIt guarantees 100% accuracy by memorizing all training examples.
Attempts:
2 left
💡 Hint

Think about how breaking data into parts helps models learn better.

Predict Output
intermediate
2:00remaining
Output of hierarchical chunking on a sequence

Given the following Python code that simulates hierarchical chunking on a sequence of tokens, what is the output?

Prompt Engineering / GenAI
def hierarchical_chunking(tokens):
    level1 = [tokens[i:i+2] for i in range(0, len(tokens), 2)]
    level2 = [level1[i:i+2] for i in range(0, len(level1), 2)]
    return level2

sequence = ['I', 'love', 'machine', 'learning', 'and', 'AI']
result = hierarchical_chunking(sequence)
print(result)
A[[['I', 'love'], ['machine', 'learning']], [['and', 'AI']]]
B[[['I', 'love', 'machine'], ['learning', 'and']], [['AI']]]
C[['I', 'love'], ['machine', 'learning'], ['and', 'AI']]
D[['I', 'love', 'machine', 'learning'], ['and', 'AI']]
Attempts:
2 left
💡 Hint

Look at how the code groups tokens first in pairs, then groups those pairs again.

Model Choice
advanced
2:00remaining
Choosing a model architecture for hierarchical chunking

Which model architecture is best suited to effectively learn hierarchical chunking representations in natural language processing?

AHierarchical Transformers that process data at multiple levels of granularity
BConvolutional Neural Networks (CNNs) with fixed-size filters only
CRecurrent Neural Networks (RNNs) with simple sequential processing
DLinear regression models without hidden layers
Attempts:
2 left
💡 Hint

Consider models that can capture relationships at different scales.

Hyperparameter
advanced
2:00remaining
Hyperparameter affecting hierarchical chunking depth

In a hierarchical chunking model, which hyperparameter directly controls the depth of chunking layers?

ABatch size
BLearning rate
CNumber of hierarchical layers or levels
DDropout rate
Attempts:
2 left
💡 Hint

Think about what controls how many nested chunks the model creates.

Metrics
expert
2:00remaining
Evaluating hierarchical chunking model performance

You trained a hierarchical chunking model for text segmentation. Which metric best measures how well the model identifies correct chunk boundaries?

ATraining loss value after the first epoch
BMean squared error of token embeddings
CPerplexity of the language model on the training data
DAccuracy of predicted chunk boundaries compared to true boundaries
Attempts:
2 left
💡 Hint

Focus on how well the model finds the right places to split the text.