h.jk

Glass to Silicon - Exposure Triangle

We've gone through the glass and silicon. Now, we finish off with a discussion about photography's exposure triangle and see whether we can draw comparisons with how agentic workflows make sense of the code repository.

The basic theory is that there are three controls determining the quantity of light exposed on the film or a digital image sensor. Going alphabetically, they are aperture, sensitivity, and shutter speed. The aperture is a physical property of the lens, the sensitivity of the medium, and shutter speed of the operation of capturing a photo. That implies three actors - the lens, the sensor, and the photographer - coming together to decide whether a photo's exposure is intended or not.

Aperture

We started with linking aperture to bokeh and the depth-of-field, and how those two control the perceived context window quality. At wider apertures, the bokeh is more pronounced, so the parts that are less important stay that way in the (greater) out-of-focus areas. On the other hand, sometimes it's warranted to ensure details are fully captured in the context window because it's a technical deep dive, which can be achieved through narrower apertures.

While it's easier to assume we always want the widest aperture to take in the biggest scope every time, we should be careful to consider the trade-off in the attentiveness that the model can give in that bigger scope.

Sensitivity

Now sensitivity is linked to the perceived context quality as well but in terms of how well the quality of light is captured, not so much the focus. Just in the previous part, we learned the different tricks that image sensors use to increase their sensitivities to perceive more light. We then drew parallels with the choice of the models and dynamic range - stronger models offer a wider dynamic range through reasoning on both highlights and shadows, but we also concluded that a high dynamic range look is not always the required look.

Shadow recovery is never free, and having to infer harder from weaker signals through higher sensitivity can lead to hallucinations. Under specific conditions, overly emphasizing either ends of highlights or shadows may unduly make the models settle for unintended consequences.

Shutter speed

The shutter speed is how the photographer chooses to freeze time. More often than not, a photo represents an instant of time so it's typically, fast. People do associate the sharpness of a photo with the absence of blurriness from movements, and that is often why widening the aperture or increasing the sensitivity are used to ensure shutter speeds stay fast.

However, sometimes the aperture is already locked in (or fixed - like almost all phone's lenses), or the sensor sensitivity is already at a threshold. For example, we have identified the areas of concern we want a particularly tuned model to size up, leaving us with a slower shutter speed as the only option.

This longer duration is not bad as one might think. If we consider faster shutter speeds to be pinpointing at the repository's current shape, a slower shutter speed heads the other way into its history - commits three months ago describing a production outage, the huge refactoring done last year that allowed for better scalability for current year's volumes, and so on.

A one-off major bug fix doesn't register as strongly as a series of minor time-related changes twice a year for daylights savings, over time. The latter's faint signals at an instant of the repository accumulate like star trails - beautiful to look at, but still, something worth fixing for good.

This motion blur effect should also be examined in relation to how fast the repository changes. On a fast-moving one, the models might end up reasoning over states that no longer exists - dead migrations, technical spikes that didn't mature due to the intern's departure, ghosts of renamed modules. Stable, legacy code repositories reward longer exposures. A slower shutter speed also requires a well-balanced image sensor, and a tripod of persisted decisions comes to mind that can hold the frame steady against the model's own drift.

Metering

Metering is the process that combines these three controls together, when striving for a given exposure:

One might then assume the following equivalence for our agentic workflows:

Picking the variation between aperture and shutter speed as an example, the metering is the same, but the model behavior is different: reading into the history for a single file can tell the model why the invariant exists but will fail to recognize the root cause a module apart, but flip that and the model trades for a broader perspective but loses the reason why the invariant. If the model keeps both constant and compensates with higher sensitivity, then it is just inventing signals.

The camera by their sides

Finally, there is also the focal length of the lens that we are scoping the reads with. Whether the team keeps to a bag of primes or leverages one encompassing superzoom influences how changes are intended and implemented.

In totality, we can predicate a team's agentic expertise on how they use the camera - from glass to silicon:

Layer Camera Agent Changes Gotchas
Optics Resolution vs focal length Context scoping, retrieval, orchestration What signals arrive Reading at the right resolution
Sensor Dynamic range vs base sensitivity Attention through highlights and shadows How signals process Loss-in-the-middle reads
Exposure Triangle Scope, history, hallucination Trade-offs Unintended motion blur

AI disclaimer: Have bounced ideas off, so while text is still my own, the way I arrived at some of them may contain minor influences from such interactions.

#glass-to-silicon