Skip to content

22 items in AI

til Telling a skill exactly which files it may read

I keep literature notes on journal articles in my Obsidian vault, and I have a skill in Claude Code that writes them from the PDF. A skill is a folder with a file of written instructions in it, and Claude follows those instructions when I run the command. I drop PDFs into an inbox folder and run the command, and it writes a note for each paper that does not have one yet.

This time there was one new paper waiting, a 33 page review. Claude read the whole paper. Then it went through my vault to pull context for a Connections section in the note, and on wrap up it also added a dated entry to one of my hub notes and made a Log section there, because the hub did not have one.

I was watching the run and I noticed the agent reading a lot of files. Every file it reads costs tokens. I think a skill reads whatever it can reach unless its instructions say what to read. So I told Claude what I want from this skill. I just want it to extract the data from the PDF and make the Markdown file in the literature folder inside my vault. I do not want it to consume any more tokens than it absolutely has to to do the job accurately.

Claude rewrote the skill so that it reads only its own instructions, the note template and the text of the PDF. It also added a small script, extract.sh, that pulls the text out of the PDF, and it saved the rule to its memory.

It had tested the extraction step on the PDFs in the inbox but not the full rewritten skill. So I ran the command again, and it wrote a note from the one PDF that did not have a note yet. I did not measure the tokens before and after.

2026-10-04 / AI / series Tested on real work / , ,

til The first chart to learn is predicted against actual

I was practicing machine learning on my own computer in VS Code. I started with a script and then switched to Jupyter when I saw it would be easier cell by cell. The first figure that came out of the notebook was a parity plot, which is also called predicted against actual.

It is a simple chart. Each run is one point, with the measured value on the horizontal axis and the value the model predicted for that run on the vertical axis. Then you draw the 45 degree line. If the model predicted every run exactly, every point would sit on that line. It is the same chart you would draw to compare a flow meter against a reference, with the model in place of the meter.

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.scatter(y_measured, y_predicted)
ax.axline((0, 0), slope=1)   # the 45 degree line
ax.set_xlabel("measured")
ax.set_ylabel("predicted")
ax.set_aspect("equal")

axline draws a line through a point with a given slope, so you do not have to work out the axis limits first. The code above is a general version and not the cell from my notebook.

A score like R2 is one number for all the runs. On the plot you can see each run, so you can see which runs the model misses and in which direction. With these axes a point above the line is a run the model overpredicts. If the cloud of points is flatter than the line, the model is pulling everything toward the average, so the high runs are predicted low and the low runs high. If a group of points sits off the line together and they are all one feed or one reactor configuration, then I think the model has not learned that feed or that configuration. If there is one point far from the others, I would look that run up in the lab notebook first, before deciding anything about the model.

The predictions on the plot should come from runs the model was not fitted on. scikit-learn has its own version of the chart, PredictionErrorDisplay, and its documentation says to use it “preferably on held-out data points”. The axes are also not the same everywhere. With kind="actual_vs_predicted" scikit-learn puts the observed values on the vertical axis and the predicted on the horizontal, so above and below the line mean the opposite of what I wrote here.

2026-02-10 / AI / series From zero / , ,

[newer] page 1 of 2 [older] | [archive]