Skip to content
Clairos Learn

Retrieval and embeddings · Lesson 12 of 16 · 7 min

Review metadata filters

Metadata filters are part of retrieval correctness and access control. A relevant passage from the wrong tenant is not an acceptable result.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated AI Ops lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Metadata filters are part of retrieval correctness and access control. A relevant passage from the wrong tenant is not an acceptable result.

Interpret the evidence

Reject the cross-tenant result even though its text is relevant.

A tempting mistake

Relevance is more important than the tenant boundary.

All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.

Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-retrieval-embeddings-012.json
{
  "fixture": "Fictional training data; not a live measurement.",
  "request_tenant": "a",
  "result_tenant": "b",
  "text_relevant": true
}

Exit status: 0. The command completed successfully in the training fixture.

$ jq .result_tenant /opt/ai-lab/cases/aiops-retrieval-embeddings-012.json
"b"

Exit status: 0. The command completed successfully in the training fixture.

$ printf '%s\n' 'enforce-tenant-filter' > /home/learner/lab/aiops-retrieval-embeddings-012-decision.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Name the assumption that would have to change for “enforce-tenant-filter” to stop being the justified action. Do not silently replace missing evidence with a guess.

Explain it

What does the evidence in “Review metadata filters” justify?

Apply it elsewhere

A colleague concludes: “Relevance is more important than the tenant boundary.” What should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Compare retrieval configurationsTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Inspect duplicate chunksDuplicate chunks can crowd a result list and reduce source diversity. Review stable document/chunk identifiers before deciding whether two similar passages are redundant.Practice
  2. 02Compare retrieval configurationsCompare retrieval configurations on the same query set, corpus and relevance judgments. Otherwise a score change may come from different evidence rather than a better retriever.Practice
  3. 03Prepare an index rebuild planA safe index rebuild stages a candidate, validates counts and retrieval, and retains the current index until the candidate is accepted. Do not delete the only working index first.Practice