Skip to content

Tutorial Figures

Chris Sweet edited this page Jul 10, 2026 · 2 revisions

type: entity up: "Markov-Retrieval-Tutorial" tags: [figures, output, diagnostics] related: ["Path-Length-Decomposition"]

Tutorial Figures

Three PDF figures generated by run_tutorial.py and committed under docs/figures/ so the LaTeX tutorial compiles without first running the code.

The three figures

File What it shows
fig1_umap.pdf 2D UMAP projection of chunk and concept embeddings, with one query overlaid as a red star. Reveals the geometry of embedding space and how the query sits relative to entity clusters.
fig2_graph_schematic.pdf Hand-laid-out subgraph for the DLA query, showing the recovery path through HoosierMetals, the bridge entity.
fig3_path_decomposition.pdf Side-by-side bar charts contrasting one chunk that the chain successfully recovered against one it did not. See Path-Length Decomposition for what the bars mean.

Where the code lives

figures.py defines three independent figure functions. Changing one does not affect the others. UMAP is a soft dependency: if umap-learn is not installed, fig1 is skipped gracefully.

Two figure directories

Directory Role
figures/ (repo root) Regenerated by every run of run_tutorial.py
docs/figures/ Committed copies used by docs/tutorial.tex

After making figure changes, regenerate by running run_tutorial.py, then copy the new PDFs into docs/figures/ if they should appear in the tutorial. The writeup uses \graphicspath{{figures/}} to load from the docs copy.

Reproducibility

The tutorial cites specific stationary masses and ranks (for example HoosierMetals at 0.0315, ITAMCO at 0.013). Any change that moves these numbers should be intentional, and the writeup paragraphs in docs/tutorial.tex should be updated to match.

See also

Clone this wiki locally