0
0
Prompt Engineering / GenAIml~20 mins

Parent-child document retrieval in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Parent-Child Retrieval Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Parent-Child Document Relationships
In a parent-child document retrieval system, what is the main purpose of establishing a parent-child relationship between documents?
ATo randomly assign documents to unrelated categories
BTo merge all documents into a single flat list for faster search
CTo prevent any document from being indexed in the system
DTo enable efficient retrieval of child documents based on parent document queries
Attempts:
2 left
💡 Hint
Think about how grouping related documents helps in searching.
Predict Output
intermediate
2:00remaining
Output of Parent-Child Query in Elasticsearch
Given the following Elasticsearch query to find child documents with a parent of type 'article' having title 'AI Basics', what is the expected output count?
Prompt Engineering / GenAI
POST /my_index/_search
{
  "query": {
    "has_parent": {
      "parent_type": "article",
      "query": {
        "match": { "title": "AI Basics" }
      }
    }
  }
}
ANumber of child documents whose parent article's title matches 'AI Basics'
BNumber of parent documents with title 'AI Basics' only
CAll documents in the index regardless of parent-child relation
DZero, because 'has_parent' queries are invalid
Attempts:
2 left
💡 Hint
Focus on what 'has_parent' query does in Elasticsearch.
Model Choice
advanced
2:30remaining
Choosing the Best Model for Parent-Child Document Retrieval
Which model architecture is best suited for learning hierarchical relationships in parent-child document retrieval tasks?
ARecurrent Neural Networks (RNNs) without attention mechanisms
BGraph Neural Networks (GNNs) that model document nodes and edges
CConvolutional Neural Networks (CNNs) designed for image data
DSimple feedforward neural networks ignoring document structure
Attempts:
2 left
💡 Hint
Consider models that can represent relationships between entities.
Metrics
advanced
2:30remaining
Evaluating Retrieval Performance for Parent-Child Queries
Which metric best measures the quality of retrieving child documents given a parent document query in a parent-child retrieval system?
AMean Average Precision (MAP) to evaluate ranking quality of retrieved child documents
BRoot Mean Squared Error (RMSE) used for regression tasks
CBLEU score used for machine translation quality
DConfusion matrix used for classification accuracy
Attempts:
2 left
💡 Hint
Think about metrics that evaluate ranked retrieval results.
🔧 Debug
expert
3:00remaining
Debugging a Parent-Child Retrieval Query Returning No Results
You run a parent-child query in your system but get zero results, even though you know matching documents exist. Which is the most likely cause?
AThe system automatically merges parent and child documents, so separate queries are invalid
BThe query syntax is correct but the documents have no fields
CThe parent and child documents are indexed in different indices without a proper join setup
DThe child documents are always returned regardless of parent query
Attempts:
2 left
💡 Hint
Consider how parent-child relationships depend on indexing structure.