Mental model
Module 03: Turn files into usable evidence- Learn how files become trustworthy knowledge objects with identity, text, metadata and parsing status.
Learn how files become trustworthy knowledge objects with identity, text, metadata and parsing status.
Engineering focus: Turn files into usable evidence
Learn how files become trustworthy knowledge objects with identity, text, metadata and parsing status.
You are not expected to know the engineering vocabulary before using the idea. Formal terminology comes after the mental model.
Carry one evidence-grounded knowledge assistant through all 18 modules. Preserve source IDs, retrieval evidence, evaluation cases, authority decisions and security assumptions so every improvement is measurable.
Treat every source like evidence in a case file: it needs identity, origin, version and integrity—not just extracted text.
Bad ingestion silently creates bad retrieval later.
A useful knowledge object carries source ID, title, URI/path, timestamp, owner, access metadata and parser status alongside text.
Broken PDF extraction, lost headings or merged tables can make perfect embeddings useless because the searchable text no longer represents the source.
If source identity is lost during parsing, later citations cannot be defensible.
Documents can contain malicious or misleading instructions. Retrieval should treat them as data, not policy authority.
Module 03: Turn files into usable evidence{
"source_id": "runbook-001",
"version": "2026-10-01",
"status": "active",
"trust_zone": "internal-approved",
"sha256": "...",
"parser": "markdown-v2",
"text": "..."
}A known document is present but cannot be found reliably.
Debug ingestion before changing search.
Goal: Normalize Markdown and text files into JSON records with source IDs and checksums.
python3 - <<'PY2'
from pathlib import Path
import hashlib,json,tempfile
p=Path('/tmp/rag-source.md'); p.write_text('# Runbook\nRestart only after health checks.\n')
text=p.read_text(); rec={'source_id':'runbook-001','path':str(p),'sha256':hashlib.sha256(text.encode()).hexdigest(),'text':text}
print(json.dumps(rec,indent=2))
PY2Record the intermediate source IDs, ranks, metadata or state produced by the baseline. Explain which pipeline layer this evidence belongs to.
After computing the checksum, change the source file and recompute it. Confirm the knowledge record can detect that the underlying bytes changed.
Debug ingestion before changing search. State the failing layer, change only that layer, then repeat the verification checks.
Record: hypothesis → evidence → change → observed result → remaining limitation. Keep this note with the running Evidence Desk project.
Production RAG improves when every change can be traced to evidence at a specific pipeline layer. In production, retain the before/after evidence so the same failure can become a regression test.
Source identity/version/checksum retained
Parser failures observable
Trust/authorization metadata assigned
To identify the exact content version used for indexing or evidence.
Chunking and retrieval may lose important structure and relevance.
No. It is untrusted evidence data.
Preserving enough identity and metadata to trace a chunk back to its original source.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.