forked from rohitg00/ai-engineering-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.json
More file actions
90 lines (90 loc) · 3.31 KB
/
Copy pathquiz.json
File metadata and controls
90 lines (90 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
"lesson": "09-hybrid-memory-mem0",
"title": "Hybrid Memory: Vector + Graph + KV (Mem0)",
"questions": [
{
"stage": "pre",
"question": "Which query class does a KV store handle best?",
"options": [
"Semantic similarity over long conversations",
"Direct fact lookup keyed by (user, type, entity)",
"Reachability across customers sharing a billing entity",
"Temporal queries valid-at-time"
],
"correct": 1,
"explanation": "KV is O(1) on exact keys; vector is for similarity, graph is for relationships."
},
{
"stage": "pre",
"question": "What are the three stores Mem0 writes in parallel on each add()?",
"options": [
"Vector, KV, graph",
"Cache, queue, log",
"Postgres, Redis, ClickHouse",
"Embedding, attention, FFN"
],
"correct": 0,
"explanation": "Mem0 fans every write out to vector, KV, and graph stores."
},
{
"stage": "check",
"question": "What three dimensions feed Mem0's fusion score?",
"options": [
"Relevance, importance, recency",
"Precision, recall, F1",
"Latency, throughput, cost",
"Confidence, perplexity, BLEU"
],
"correct": 0,
"explanation": "Score is a weighted sum of relevance, importance, and recency; weights tune per product."
},
{
"stage": "check",
"question": "What does Mem0g do when an incoming fact contradicts an existing edge?",
"options": [
"Deletes the edge",
"Marks the existing edge invalid but does not delete it, so temporal queries can still traverse",
"Raises an exception",
"Rewrites the user_id"
],
"correct": 1,
"explanation": "Soft invalidation preserves history for temporal (valid-at-time) queries."
},
{
"stage": "check",
"question": "Why does the lesson recommend tuning fusion weights per product?",
"options": [
"Providers require it",
"Recency dominates for chat agents while importance dominates for compliance agents and relevance dominates for retrieval agents",
"Vector libraries reject equal weights",
"It is required by Apache 2.0"
],
"correct": 1,
"explanation": "Different products want different bias on relevance/importance/recency; one set of weights does not fit all."
},
{
"stage": "post",
"question": "What is the scope taxonomy Mem0 uses?",
"options": [
"Public, private, secret",
"User, session, agent",
"Local, regional, global",
"Read, write, admin"
],
"correct": 1,
"explanation": "Scopes are user (cross-session), session (one thread), agent (per-instance state)."
},
{
"stage": "post",
"question": "What is embedding drift in this pattern, and how does the lesson recommend mitigating it?",
"options": [
"Vectors get encrypted; rotate keys",
"Vector retrieval quality degrades as the corpus grows; periodically re-embed the top-N most used records",
"Embeddings overflow integers; switch to float64",
"The embedding API changes URL; pin a domain"
],
"correct": 1,
"explanation": "Periodic re-embedding of hot records keeps retrieval quality steady as the corpus grows."
}
]
}