Field-tested notes on robotics safety, ROS 2, embedded AI, AI agents, SaaS architecture and the practical systems that connect software to real-world outcomes.

Two paired encoder and document-index lanes with an incorrect cross-connection unplugged

RAG Embedding Migrations: Switch the Encoder and Index Together

The new embedding index is ready. Its document count matches production. Quality checks pass. An operator switches the search alias, and a request already in flight sends a vector from the old encoder into the new index. The database accepts it because the dimensions match. The assistant receives the wrong evidence without an API error.

An embedding-model migration must release the query encoder and its matching document-vector index as one retrieval configuration. Select that configuration once per request, before encoding, and keep it through search. Retain the previous configuration for in-flight work and qualified rollback. An atomic index-alias update is useful, but it cannot retroactively change a vector computed by another service.

AI evaluator sorting documents into pass, fail and human review trays

LLM Judge Calibration: Measure False Approvals Before Trusting Scores

An evaluator can agree with human reviewers on almost 97% of its decided cases while approving 40% of the outputs those reviewers consider unacceptable. The synthetic example below does exactly that. Nothing is wrong with the arithmetic; the headline metric answers the wrong operational question.

Before using an LLM judge to accept outputs or supply evidence for a release, measure its false approvals among unacceptable cases, the unacceptable share of its passes, and the cases it cannot decide. Qualify those measurements against a frozen, independently labeled sample. When the relevant sample is too small, the outcome is insufficient evidence, even if no errors were observed.

This is a narrower problem than designing an enterprise AI workflow evaluation gate. The gate consumes measurements. Here, the measurement instrument itself needs qualification.

Modular robot sensor boards on an I2C bus beside an oscilloscope

I2C Pull-Ups on Modular Robots: Check Every Sensor Configuration

A robot can pass its sensor checks with three breakout boards and fail with just one. Add two more boards and it can fail again, for a different electrical reason. Each module may bring both capacitance and another pair of pull-up resistors. Removing a module changes the circuit as surely as adding one.

Qualify I2C at the level of the supported assembly, separately for SDA and SCL. For every allowed combination, count the fitted pull-ups, bound the capacitance, and check both rise time and the current demanded from the weakest device pulling the line low. A clean trace from the fully populated prototype does not establish that the reduced configuration works.

The worked example below shows that failure pattern, then checks a different pull-up arrangement across all 31 nonempty combinations of five hypothetical boards. The calculations are executed synthetic examples, not measurements from a robot.

Server-side inspection holds a confidential response before releasing approved text to a browser

Streaming LLM Output: Put DLP Before the First Byte

A support assistant streams a case summary into a browser. Halfway through the answer, a data loss prevention scanner detects an internal identifier and replaces the message with a warning. The interface now looks clean. The identifier has already crossed the boundary: it may be in the network response, browser memory, a screen recording or a client-side telemetry event.

For an output channel that must not receive uninspected confidential text, hold model output on the server until the applicable inspection and authorization checks finish. A streaming model API can feed that buffer; it does not require the application to stream raw text to its user. Delayed detection can stop further disclosure, but cannot recall bytes already delivered.

The engineering decision is the unit of release: a whole answer, an independently authorized record, or a prefix that a narrowly defined detector can prove ready. Choose that unit before choosing the animation in the chat window.

Robot in a test cradle beside a CAN gateway, disconnected connector and diagnostic waveforms

CAN Bus-Off Recovery in Robots: Restart Without Replaying Motion

The CAN interface comes back. Telemetry starts moving again. A queued velocity command reaches a drive, and the robot resumes an action whose context disappeared during the outage. The interface recovery succeeded; the recovery procedure did not.

After CAN bus-off, restore communication with motion authority held closed. Invalidate commands from before the fault, establish fresh evidence from every required drive, reconcile their operating state, and require a new authorization to resume. A Linux interface reporting ERROR-ACTIVE is evidence about one CAN controller. It is not evidence that a wheel drive is ready, that a previous setpoint has been cleared, or that the robot should move.

Locked and accessible document folders on a ranked file rail above a partly filled results tray

RAG Retrieval Tests for Permission-Filtered Vector Search

A support engineer asks an internal assistant how to restore a replica. The assistant cites one general runbook. A platform administrator asks the same question and gets three detailed procedures. Both answers look plausible. Before anyone changes the prompt or grants the engineer broader access, the search team needs to answer a smaller question. Which chunks, if any, should the engineer’s search have returned?

To test the vector retriever in a retrieval-augmented generation (RAG) system, build a reference result by scoring every eligible chunk for the same query and identity, then taking the nearest k. Compare the production result at the point where evidence leaves the trusted retrieval service. Count forbidden chunks, missing slots and missed neighbors separately. A retriever can fill every slot while missing the closest eligible procedure. It can also return one hit and be exactly right.

Robot wheel encoder connected to a microcontroller and a two-channel oscilloscope

Encoder Velocity Estimation: Why Low-Speed Robots Jitter

A robot creeps toward its docking station. The velocity loop runs at 1 kHz, but its encoder produces only about 130 counts per second. Most iterations report zero speed. An iteration that sees one count reports more than seven times the intended speed. The controller can end up reacting to the measurement staircase as well as the actual wheel motion.

Before retuning the PID, check how velocity is estimated. Count differences over a fixed window work well when that window contains enough counts. Timing the interval between encoder edges is often more useful at low speed, provided the estimate carries its age and becomes invalid on timeout, capture faults, or direction changes. Neither method turns a sparse position sensor into a continuously observed velocity sensor.

This article develops that choice for a wheel drive, with a reproducible numerical example. The calculations and Python experiment are synthetic; they are not measurements from a robot or a validated motor controller.

Parallel AI requests passing through a budget gate before reaching model servers

AI Agent Cost Budgets: Reserve Spend Before Parallel Work Starts

An enterprise agent has eighty cents left in its task budget. Twenty-four workers read that balance, each decide that a ten-cent request fits, and dispatch together. Every worker followed its local rule. The shared budget still failed.

The control has to happen before dispatch: reserve the maximum permitted cost of each attempt against a shared ledger, carry that reservation through uncertain outcomes, and settle it only when reliable usage evidence arrives. All child agents and retries must draw from the same accountable budget hierarchy.

That design can bound admitted variable spending, but only when requests have defensible cost ceilings and every spending path passes through the control. A dashboard, an average cost estimate, or a warning in the system prompt cannot provide that guarantee.

Isolated code execution with blocked networking and inspected output files

Sandboxing AI-Generated Code: Egress, Secrets, and Artifact Release

An enterprise assistant receives two confidential CSV exports and writes Python to reconcile them. The script runs in a fresh container, finishes successfully, and returns a report. That looks like a contained computation. It may also have downloaded a package, inherited a cloud credential, contacted an external endpoint, or embedded active content in the report.

None of those failures requires a kernel escape.

Treat agent-generated code as untrusted execution, with separate controls for what enters the sandbox, what it can reach, and what leaves it. The isolation runtime protects the host. Network policy, credential placement, resource limits, and artifact release determine whether the computation stays inside its business authority.

Robot power distribution and edge computer beside an oscilloscope showing a voltage dip

Robot Power Integrity: Debug Jetson Brownouts and Motor Transients

A robot runs its perception model correctly on the bench. Once the wheels accelerate, the camera disappears, inference latency jumps, or the Jetson reboots. The failure lands in the software team’s queue because that is where the symptoms are visible. Yet a new model, a ROS 2 QoS change, or a longer watchdog timeout cannot repair a collapsing supply rail.

To diagnose this class of failure, measure voltage at the consuming device while recording motor current, compute load and reset events. Separate sustained power demand from short load steps, and test braking as well as acceleration. A supply’s wattage rating alone does not establish whether the robot’s compute and sensor rails remain usable through those events.

The central engineering question is: can the electrical system preserve the operating conditions assumed by the AI and control software, including when several loads change together? The useful deliverable is a power-domain map with measured limits and a reproducible fault test, not just a larger battery.