跳到正文
DEV Community· EazyHood·· 2026-10-20AI 評分48

Cambio: update the plan without losing its source

Cambio: update the plan without losing its source

AI 導讀

Cambio 將原始指示清單及後續更新整合為可審閲計劃,模型提出相關來源,由用戶決定取代、加入或忽略。它在瀏覽器本機執行 Xenova/all-MiniLM-L6-v2,毋須帳戶或 API key;20 組合成英文清單配對的保留測試中,模型排首位 18/21,低於 token overlap 的 19/21。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 3 — Slow and Steady.

What I Built

The plan says Room 4 at 10:00. A later message says Room 7 at 10:30. Another asks for an extension cable if you have one. Lunch has not changed.

Cambio turns an original instruction list and later updates into a reviewed plan. An open-weight model finds related instructions. The person chooses Replace, Add, or Ignore. The final plan keeps the exact selected wording.

The fictional workshop is included. Cambio supports low-stakes English plans: 20 instructions per list, 300 characters per line.

“Slow and Steady” shaped the interaction: bring likely source lines to the reviewer, saving a repeated search through the plan. Review stays deliberate. A brief highlight follows each changed line and respects reduced-motion preferences. Time saved has not been measured.

Demo

Try Cambio in your browser.

Cambio in a real browser: the original meeting time of 10:00 appears beside the 10:30 update, with the unchanged plan and review controls visible.

A suggested match, before any decision. The original plan remains unchanged.

Choose Try an example, then Find related instructions. In the workshop example:

  1. Check and replace the meeting time.
  2. Replace the room assignment.
  3. Add the cable instruction, preserving “if you have one.”
  4. Ignore the repeated lunch announcement.

Unaffected instructions stay intact. Revisit decisions or undo the last one, then export plain text or a JSON review record.

No account or API key is needed. After downloading its assets, the model runs locally. Matching failures leave manual review available. Reloading discards unsaved work.

Code

Source code and evaluation. The MIT-licensed repository includes tests, a dependency lockfile, and model provenance. Model weights are not committed; they retain their Apache-2.0 license.

How I Built It

Cambio runs a pinned Xenova/all-MiniLM-L6-v2 revision through Transformers.js 3.8.1, using q8 ONNX weights in a WebAssembly worker. Cosine similarity between normalized sentence embeddings ranks candidate source lines.

This is a matching model, not a contradiction detector. “Bring the charger” and “Do not bring the charger” concern the same thing; a strong similarity score cannot decide which instruction to follow.

The model can suggest a source but cannot apply a replacement. Weak or competing matches, duplicates, and some conditional or negative wording trigger closer review. These heuristics miss ambiguities; all original lines remain available for comparison.

The engine binds decisions to both exact input lists. Edited sources invalidate old decisions. Two updates cannot replace the same original. Export requires every update to have a decision; no paraphrase is generated.

What I tested and what remains unknown

The 32 automated tests passed locally, covering stale decisions, conflicting replacements, recovery, navigation, and exports. Some use DOM and Worker doubles; browser inference was checked separately.

GitHub Actions passed its checks and deployed the static demo from commit 7c6cc8d.

On the public demo in Edge, real inference and four review decisions produced six exact lines. The conditional cable update showed a warning without preselecting a source. The downloaded JSON identified the pinned q8/WASM model as executed. Manual fallback separately produced correct exports with no model execution. Review and completion had no horizontal overflow at a 390 × 844 viewport.

Separately, real CPU inference was evaluated on 20 synthetic English list pairs. An AI agent authored the labels before inference; they are not independent human validation. Ten pairs were reserved until the policy was fixed.

On the reserved split, MiniLM ranked the expected source first for 18/21 single-target updates; simple token overlap scored 19/21. MiniLM did not outperform it. The model highlighted an unrelated source for 3/6 new updates; heuristics warned on 5/8 ambiguous updates. These small, constructed counts cannot estimate real-world accuracy. Every prediction is in the evaluation report.

One successful browser example does not establish parity with the entire CPU evaluation or full offline operation. No user study or time-saving result is claimed.

Cambio cannot verify authority, omitted context, or dates. Avoid high-stakes instructions. Text stays off an application server, but hosting and asset downloads expose connection metadata. JSON contains both full inputs: check before sharing.

Why Does Open Innovation Matter?

Open weights make a small, local matching tool possible without a paid inference service. Open code makes the boundary between suggestion and action inspectable: the model ranks; the engine records a person's choices.

Others can replace the model or reuse the engine. Publishing the baseline comparison also makes weak results visible.

AI assistance: Jhonatan del Rio Mejia directed this project. OpenAI Codex generated the implementation, design, fixtures, tests, documentation, and this article under that direction. The workshop example is fictional; no real attendance or user feedback is implied.

Prize Categories

Best Use of GitHub Copilot, through the GitHub Actions option explicitly listed in this challenge. Actions runs the tests and production build, then deploys the static demo. The successful run is linked above. No GitHub Copilot tool was used to author the code.

來源:DEV Community · dev.to