今日已更新 298 条资讯 | 累计 42709 条内容
关于我们

标签:#ai

找到 7754 篇相关文章

AI 资讯

AI Writes, You Verify: A Documentation Review Pipeline for Skeptics

Last week I deleted a function that had been "documented" by a comment explaining a behavior the function hadn't had in three versions. The comment was confident. The function was gone. This is the real failure mode of AI-generated docs: they can be fluent, plausible, and wrong. Not because the model is bad, but because no human verified what the text claims. The fix isn't to avoid AI. It's to build a checkpoint where the model drafts and the human signs off. The Ownership Split A model can summarize code, describe parameters, and turn commit messages into release notes. It cannot know why a decision was made, which edge cases are career-ending, or which comments are now dangerous. My rule of thumb: The model drafts: API descriptions, usage examples, parameter tables, changelog bullets from git history. A human owns: security implications, business rules, architectural trade-offs, deprecation warnings, anything tied to customer promises. The pipeline below makes that split explicit. It generates a draft, then forces a review issue with a checklist that separates the two categories. The Pipeline I run this as a GitHub Actions workflow on every merged PR that touches src/ . It takes the diff, sends it to a language model with a strict output schema, and opens a documentation review issue. Here's a condensed version of the workflow YAML: name : docs-draft on : pull_request : types : [ closed ] branches : [ main ] jobs : draft : runs-on : ubuntu-latest steps : - uses : actions/checkout@v4 with : fetch-depth : 0 - name : Generate doc draft env : API_BASE : ${{ secrets.MONKEYCODE_API_BASE }} API_KEY : ${{ secrets.MONKEYCODE_API_KEY }} run : | git diff origin/main HEAD -- src/ > diff.txt python draft_docs.py diff.txt - name : Open review issue uses : actions/github-script@v7 with : script : | const body = require('fs').readFileSync('review_body.md', 'utf8') await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: `Docs review: ${context.

2026-09-01 原文 →
AI 资讯

On-Device AI in React Native & Expo

In this Expo & React Native tutorial, you’ll learn how to run a large language model (LLM) directly on a user’s device: no server, no API key needed. We’ll start from scratch with a simple chat exchange, and progressively introduce more advanced features: multimodal input, speech-to-text, text-to-speech, voice activity detection, tool calling and RAG. Each concept is explained before the code, so you can follow along whether you're new to on-device AI. Why run AI On-Device? Most AI features rely on a cloud API: you send a request to a remote server, it runs the model, and sends a response back. That works well, but it comes with tradeoffs. Running the model directly on the device avoids all of them: Works offline — no internet connection required Privacy by design — user data never leaves the device Low latency — no network round-trip No cloud costs — inference is free The tradeoff is raw capability: on-device models are smaller and less powerful than frontier cloud models. But for many use cases like summarization, chatbots, or local search, they're more than good enough. About NobodyWho We'll use the NobodyWho library throughout this tutorial. It wraps llama.cpp in Rust and exposes a clean React Native API for running locally any model in .gguf format. Install it with npm install react-native-nobodywho or npx expo install react-native-nobodywho for Expo. Loading a Model NobodyWho can download a GGUF model for you directly from Hugging Face, cache it, and reuse it on every subsequent launch. That means you don't need to bundle anything into your app or manage downloads yourself: import { Chat } from " react-native-nobodywho " ; const chat = await Chat . fromPath ({ modelPath : " huggingface:NobodyWho/Qwen_Qwen3-0.6B-GGUF/Qwen_Qwen3-0.6B-Q4_K_M.gguf " , }); The first time this runs, the model is downloaded to the app’s cache directory. Every call after that loads the model directly. modelPath accepts a few different forms: Form Example Notes HuggingFace reference hf

2026-09-01 原文 →
AI 资讯

My multi-agent coding system proves its PRs are correct before I see them — and I'm opening it to contributors this Hacktoberfest

I maintain no_human . It's open source, and this month I'm getting it ready for outside contributors, so this post is part announcement, part ask. What it does: no_human proves the code it wrote is correct. You drop a ticket on the board (or point it at Jira or Linear) and it plans, writes the code, and opens a pull request. Before that PR reaches you, the work is checked by a second model that never saw the coder's session and is told to assume the job is not done. You get a pass/fail checklist that cites files and lines, not a score. If the agent deleted or weakened a test, a tamper guard stops the attempt. For bug fixes, the tests offered as proof have to fail on the old code and pass on the new. It's free and open-source, on your machine. If you're thinking about contributing, here's what you'd be walking into. You don't need a Claude account to work on it. The test suite is hermetic: uv sync --frozen && uv run pytest -q -n 4 runs all ~2,980 tests without ever calling a model. A credential only comes into play if you want to run the product end to end. The good first issues are scoped down to file and line, each with a repro and the command that verifies the fix. Past those, the one I most want help with is backend adapters . The implementer runs behind a narrow protocol, and I want adapters for more coding agents: opencode, Aider, Goose, Crush, Amp, Qwen Code, and a longer list in the issue. One agent per PR, and comment before you build. Some of these tools have no headless mode, and I'd rather tell you that before you spend a weekend finding out. Not everything needs Python, either. There are open invitations for UX polish on the web board — frontend and design contributions, with the rule that a sketch or screenshot comes before code — and for making the PRs the agent opens read better : the PR body is the artifact a human judges, and right now it's information-dense but plain. Fair warning about scope: only the coder seat is swappable. The reviewer, planner

2026-09-01 原文 →
AI 资讯

Context Slicing: A Free-Tier Workflow for AI-Assisted OSS Patch Review

A maintainer once watched an AI assistant confidently recommend merging a pull request that deleted a test file. The prompt had included the entire issue thread, the last three commits, and a README from another branch. The model trusted every word because the prompt gave it no reason to filter. The result was a confident but false analysis. The root cause was not a bad model. It was context pollution: unrelated diffs, stale comments, and duplicate code snippets pushed the actual change below the model's attention threshold. For open source reviewers on a free tier, every wasted token also makes the loop slower. The fix is not a bigger context window. It is a smaller, better one. Why Full Context Collapses AI Reviews Long paste sessions fail for reasons that have little to do with model quality. The following failure modes appear regularly in OSS review flows when someone dumps everything into a chat: Issue threads contain outdated suggestions that contradict the current implementation. Full-file dumps include boilerplate that drowns the one-line semantic change. Old test output from another environment appears as evidence even when it no longer applies. Models weigh every token relatively evenly, so irrelevant lines consume attention that the diff deserves. Earlier articles on this account covered the reproduce-patch-test loop, but the missing discipline is context slicing. Slicing means choosing exactly which lines the AI sees, and nothing more. The Three Layers of Slicing The practice breaks into three layers, each with a clear source for truth: Patch layer — the diff and commit message only, not the full conversation history. Code layer — the definitions and tests touched by the diff, not every import in the project. Environment layer — exact commands and expected outputs, not historical logs from an old CI run. Together those layers describe "what changed, what it touches, and how to prove it works." That is enough for a reviewer model to produce a focused anal

2026-09-01 原文 →
AI 资讯

A real model's write, escrowed before it landed

A real model's write, escrowed before it landed What I can honestly claim here, and only this: I put an escrow membrane in front of a real OpenClaw gateway as a before_tool_call plugin, watched a real LLM's tool call go through it, and confirmed the whole loop end to end, escrow, admit, commit, undo, with a byte-for-byte restore. That's it. I've read 0.077 percent of the OpenClaw source (29 of 37,659 files, counted cumulatively across three separate rounds of this work), the Escalate branch has never fired in a real run, and I haven't found one confirmed example of a ClawHub-distributed plugin using this hook. None of that changes what happened on 2026-09-01. All of it belongs in the same paragraph as the claim, not three screens down where nobody reads it. The project behind this is gx (TraceFold, Apache-2.0), a layer that treats every effect an agent produces as something you escrow, gate, and can invert, rather than something you log after the fact and hope you can undo by hand. OpenClaw is steipete and vincentkoc's agent runtime, MIT-licensed, npm-distributed (204.8 MB unpacked at 2026.8.1), with a plugin hook called before_tool_call that fires before a tool's execute() runs and can block it outright. Four ways to fail before you fail correctly I want to write the failures first, because they're the part that actually shows how the system works. The id was a filename, not an identifier. gx writes receipts to disk with underscores in the filename ( gx1_smxcmcdm...json ), because colons aren't safe in filenames on every platform. The identifier gx undo actually wants uses colons ( gx1:smxcmcdm... ). I copied the filename straight into the undo command and got VALIDATION_ERROR: not a gx1: id . The right string was sitting in an index file two directories over. I hadn't checked. I trusted --offline to mean less than it means. I wanted a verification that touched nothing but the receipt itself, so I ran gx receipt verify --offline --project <bed> and got back valid:f

2026-09-01 原文 →
AI 资讯

A memory server remembers your conversation. That is not the same as knowing your code.

Before publishing: set published: true , and check canonical_url — the article must exist at that URL on the site first. Without it this competes with the original in search instead of pointing at it. Tags are from the verified top-1,000 list; mcp was not in that cache and is not used here. A session ends. Your agent had worked out, over forty minutes, that the retry logic lives in one service and the thing that gives up on it lives in another, that the queue name is spelled two different ways, and that the person to ask about any of it left last year. Tomorrow you open a new session and it knows none of that. Neither does your colleague's session. Neither does the agent reviewing the pull request that comes out of it. It is the same forty minutes a new engineer spends in week one, and the same forty minutes the README would have saved if it were still true. It is why a manager asking "where is this up to" has to interrupt someone who knows. The knowledge exists; it has nowhere to live but in people and chat logs. The reflex is to reach for memory. That reflex is worth interrogating, because there are two different problems hiding under one word, and only one of them is what memory servers are for. What MCP actually specifies It helps to be exact, because "MCP memory" gets said as though it were a feature of the protocol. It is not — and the current revision makes that harder to miss rather than easier. Read the base protocol's own three-line summary in revision 2026-07-28 : JSON-RPC message format, stateless, self-contained requests , per-request capability negotiation. Servers offer three features — Resources, Prompts and Tools. Clients offer one: Elicitation. Sampling and Roots, which used to make that three, were deprecated in this same revision under SEP-2577, along with Logging and Dynamic Client Registration; the migration note against Sampling reads "integrate directly with LLM provider APIs". There is no memory primitive and no persistence primitive. There

2026-09-01 原文 →
AI 资讯

Before You Paste Into a Free Model: Draw the Trust Boundary First

Last week a colleague pasted a production config.yml into an AI chat, asked why the connection kept dropping, and got a working fix in three minutes. The file also contained a client secret. Now that secret sits in a model provider's logs. Maybe training data, too. You don't know. That's the problem. Disclosure: This article was prepared as part of MonkeyCode's product outreach. The opinions are mine. I've written here about repo quarantine and dependency triage. This post is narrower: where do you draw the line between your code and a free model? Free model access and a free server are real options, but they shift trust boundaries. MonkeyCode, the open-source platform, offers both. I'm not going to quote quotas or hardware specs — they change faster than blog posts. The question is what you should send in the first place. The Trust Boundary Nobody Draws Think of your AI-assisted workflow as four zones: Zone 0: your terminal / IDE Zone 1: the agent or CLI process Zone 2: the platform API and its logs Zone 3: the model provider's infrastructure Every hop expands the attack surface. Zone 0 is yours. Zone 1 is mostly yours — unless the tool phones home. Zone 2 is someone else's server. "Free server" means Zone 2 is external by default. "Free model access" means your prompt leaves your network and lands in Zone 3. The trust boundary isn't the API call. It's the paste. Three Things That Should Never Cross the Boundary Secrets and credentials. API keys, passwords, tokens, private keys. Obvious, still happens daily. File paths and internal IPs. A stack trace like /srv/customer-42/checkout.py:314 reveals product structure, hostnames, and environment info. Unreleased code structure. AI models may memorize and regurgitate patterns. If your code is patent-sensitive or under NDA, don't feed it the source. Describe the logic instead. A Reproducible Gate: boundary_check.sh Stop relying on discipline. Add a mechanical gate. #!/usr/bin/env bash # boundary_check.sh - blocks high-ris

2026-09-01 原文 →
AI 资讯

The Day My Lecture Notes Bot Contradicted Itself

I was up at 2 AM, staring at seventeen PDFs that refused to tell me anything. My midterm was in six days, and my notes were a mess of arrows, acronyms, and half-typed definitions. I wanted a chatbot that could answer questions about my own lectures. Not a fancy one. Just something that would take a question, find the relevant slide, and answer in plain language. So I built one. I used MonkeyCode for the free model access and free server space. Disclosure: This article was prepared as part of MonkeyCode's product outreach. Their open-source platform's free tier includes 10 million tokens and a server slot, which is enough for a weekend prototype. The “why not” won. The plan was simple: extract text from the PDFs, split it into chunks, retrieve the most relevant chunks with a dumb similarity search, then ask a model to answer from those chunks. No vector database. No fine-tuning. Just a few lines of Python and a POST request. The extraction step was almost too easy. from pypdf import PdfReader def extract_pdf ( path ): return " \n " . join ( page . extract_text () for page in PdfReader ( path ). pages ) Most of my slides were text-heavy, so it worked. One deck came out as garbage because the pages were rotated. That was my first warning: garbage in, confident nonsense out. Next, chunking. I set a chunk size of 1,200 characters with an overlap of a hundred. Small enough to be relevant, big enough to contain a complete idea. def chunk_text ( text , size = 1200 , overlap = 100 ): chunks = [] for i in range ( 0 , len ( text ), size - overlap ): chunks . append ( text [ i : i + size ]) return chunks I didn't use a vector database. My whole corpus was about two hundred chunks, so TF-IDF plus cosine similarity was enough. More importantly, it made every retrieval transparent. I could see exactly which chunks the bot pulled, and why. from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity def retrieve ( query , chunks

2026-09-01 原文 →
AI 资讯

Free AI Servers Drift. Here's a 6-Gate Fail-Closed Filter Before Merge

Last Tuesday, my free endpoint returned a valid JSON contract. The next call returned a summary. Same prompt. Same model label. No version bump. I almost merged code that expected a schema and instead got a paragraph. Free tiers are not the enemy. Silent drift is. When you wire a free AI server into your PR pipeline, you accept three facts: shared compute, changing model configs, and zero guarantee. So you need gates that fail closed. This is the checklist I now run before any AI-generated suggestion touches a merge branch. I built these gates against an open-source gateway called MonkeyCode. Why? It gives solo devs free model access and a free server for trial workloads. Disclosure: This article was prepared as part of MonkeyCode's product outreach. Convenient, yes. Safe by default? No. So I test every claim. Gate 1: Pin the response contract Your prompt must define an exact shape. For a bug triage task, I require a JSON object with severity , summary , and file fields. If the response is not parseable JSON, the gate fails immediately. { "severity" : "high" , "summary" : "Null pointer on empty input" , "file" : "src/parse.ts" } No fallback. No partial acceptance. Gate 2: Snapshot a baseline Run the same prompt ten times. Record output length, hashes, and tokens per call. Store those as baseline.json . Later, compare every new response against that range. for i in $( seq 1 10 ) ; do curl -s your-monkeycode-endpoint -d '{"prompt":"triage this bug"}' \ | jq -r '.output' | sha256sum done If the hash variance crosses an evidence threshold, the gate flags it. Gate 3: Time-box and cost-cap Free servers queue. You need a timeout and a token budget. I use 8 seconds and a hard cap of 600 tokens. The gate reads usage metadata from the response and rejects when either limit is hit. if response . elapsed > 8 or response . usage . total_tokens > 600 : reject ( " over budget " ) Track this weekly. Drift often starts as a slow climb. Gate 4: Apply semantic checks Gates are not jus

2026-09-01 原文 →
AI 资讯

Rewiring Democracy Series on The Renovator

Nathan E. Sanders and I are writing a series of essays on real-world examples of democratic technologies for The Renovator . I haven’t been posting the full text on the blog because they’re a bit long, but here are links. Part 1 is about the Japanese digital democracy party, Team Mirai. Part 2 is about the Swiss Public AI model, Apertus. Part 3 is about the civic technologists of Open Knowledge Brazil. And the new one, Part 4 , is about civic AI in Scotland.

2026-09-01 原文 →