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

标签:#ai

找到 7757 篇相关文章

AI 资讯

I Added a Fourth Model Mid-Run. It Changed What My Field Test Could Prove.

Latest release: v0.2.2 — Aug 29, 2026 I did something I usually try hard not to do in a field test. I changed the design after it had already started. Halfway through validating AdversarialDebate, I realized the model set was too narrow to answer the most important question in the project. So I added a fourth model in the middle of the run. That was messy. It wasted work. It made the corpus inconsistent for a while. It also turned out to be one of the best decisions in the whole release. This post is about a lesson I trust far more now than I did before building this project: a field test is not just there to produce numbers. It is there to reveal whether your experiment can actually answer the question you think it is answering. The Setup I Started With I began with three models: GPT-4o-mini, Gemini 2.5 Flash, and DeepSeek-V3. That gave me three useful pairings — GPT + Gemini, Gemini + DeepSeek, and GPT + GPT as a homogeneous control. Three labs, two regions, one same-model control. Reasonable spread. I ran the small corpus first, just 3 PRs, to validate the pipeline. Pair Small-corpus score Verdict rate Gemini + DeepSeek 0.835 33% GPT + GPT 0.667 33% GPT + Gemini 0.148 0% The diverse pair was ahead. The weak pair was struggling. The homogeneous control was doing something interesting. If I had stopped there, I would have told a clean story — and it would have been the wrong one. The Problem Was Not The Data. It Was The Coverage. The issue was not that the first three models were bad. The issue was that the experiment could only see part of the diversity spectrum. With those three models, the farthest useful pairing I had was US + China. I did not have a genuinely cross-continent pair that could show what happened at the far end of diversity. The test could suggest whether diversity helped. It could not show whether maximum diversity behaved differently from moderate diversity. That is a major blind spot when the whole thesis is about pairing behavior. I needed a f

2026-08-31 原文 →
AI 资讯

Adam and AdamW: The Optimizer That Made Modern LLM Training Possible

Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product. Most people learn neural networks by staring at the model. Weights. Attention. MLPs. LayerNorm. Tokenizers. Context windows. But when you actually train an LLM, there is another piece of machinery making billions of decisions every second: the optimizer. A 70-billion-parameter model does not "learn" because gradient descent tells it which direction is better. It learns because an optimizer turns an enormous, noisy stream of gradients into parameter updates that are small enough not to explode, large enough to make progress, and adaptive enough that different parameters can move at radically different effective rates. For the last decade, the dominant answer has largely been some form of Adam , and increasingly AdamW . The interesting part is that Adam is not some mysterious LLM-specific invention. The original Adam paper was submitted in December 2014 by Diederik Kingma and Jimmy Ba, before the Transformer, before GPT, and before the modern LLM era. Kingma was working on scalable machine learning and generative models; Ba was then a PhD student working with Geoffrey Hinton at Toronto. Three years later, the Transformer paper used Adam directly in its training recipe. Then came AdamW, which fixed a subtle but important problem in how regularization interacted with adaptive optimization. By 2025, Adam was sufficiently influential to receive an ICLR Test of Time award. So what exactly is Adam doing? And why is AdamW usually what you actually want when training a Transformer? 1. First, forget Adam: what problem is the optimizer solving? Suppose your neural network has parameters theta = [theta_1, theta_2, ..., theta_N] and your training batch produces a loss L . Backpropagation gives you g = dL/dtheta The simplest possibl

2026-08-31 原文 →
AI 资讯

Verifying $0.05 USDC Payments On-Chain in 40 Lines of Python — No Stripe, No SDK, No KYC

Last week I wrote about the French voiceover API that only accepts payment from robots . Today: the part people actually asked me about — how do you verify a $0.05 payment on-chain with zero payment processor, zero SDK, and zero KYC? The answer: one Python function, ~40 lines, stdlib only. Here's the real production code. The setup My endpoint sells French neural TTS voiceovers for $0.03–0.05 USDC. At that price, Stripe is a non-starter (their floor is ~$0.50 per charge) and any processor's KYC kills the "robots welcome" model. So payments go through the x402 pattern: client pays USDC on Base, sends me the transaction hash, I verify it myself against a public RPC before delivering. The verification function import json , os , urllib . request WALLET_BASE = " 0x3f97...D074 " # where I receive USDC_BASE = " 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 " # USDC on Base BASE_RPC = " https://mainnet.base.org " TRANSFER_TOPIC = " 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef " def rpc ( method , params ): req = urllib . request . Request ( BASE_RPC , data = json . dumps ({ " jsonrpc " : " 2.0 " , " id " : 1 , " method " : method , " params " : params }). encode (), headers = { " Content-Type " : " application/json " }) with urllib . request . urlopen ( req , timeout = 30 ) as r : return json . load ( r ). get ( " result " ) def verify_payment ( tx_hash , min_usdc ): # 1. format sanity if not tx_hash . startswith ( " 0x " ) or len ( tx_hash ) != 66 : return False , " bad hash format " # 2. anti-replay: one hash = one delivery if tx_hash . lower () in load_used_txs (): return False , " tx already used (replay) " # 3. fetch the receipt receipt = rpc ( " eth_getTransactionReceipt " , [ tx_hash ]) if not receipt : return False , " tx not found on Base " if receipt . get ( " status " ) != " 0x1 " : return False , " tx failed on-chain " # 4. scan logs for a USDC Transfer TO my wallet want_to = WALLET_BASE . lower (). replace ( " 0x " , "" ) for log in receipt

2026-08-31 原文 →
AI 资讯

We put an MCP endpoint in 49 business apps. Here is what a read-only key can and cannot do to an invoice register.

We build small self-hosted business tools, and since our 3.0 release every one of them except our AI client answers the Model Context Protocol at POST /mcp . Forty-nine of them. That was a large enough change, applied uniformly enough, that the interesting engineering question stopped being "how do we add MCP" and became "what should a language model be allowed to do to a live invoice register." This post is about the second question, because it is the one that actually matters and the one most MCP integrations answer by accident. The boring part first: the handshake There is nothing vendor-specific in it. Three facts: The address. https://your-install/mcp - your server, your domain. The key. An Authorization: Bearer apk_... header. The transport. MCP over streamable HTTP, stateless. One request in, one response out. That is the whole contract. In Claude it is one CLI line: claude mcp add --transport http invora https://your-install/mcp \ --header "Authorization: Bearer apk_xxxx" In the OpenAI Responses API it is one entry in the tools array: { "type" : "mcp" , "server_label" : "invora" , "server_url" : "https://your-install/mcp" , "authorization" : "apk_xxxx" , "require_approval" : "never" } Clients that keep servers in a config file take the same three fields under a different set of key names. n8n's MCP Client node takes the URL and the same Authorization header. And if you would rather not use a client at all, it is plain JSON-RPC 2.0 over one POST: curl -X POST https://your-install/mcp \ -H "Authorization: Bearer apk_xxxx" -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' We implemented the protocol rather than an integration with a particular vendor, which means clients that do not exist yet will work too. That is the main argument for MCP over building N bespoke connectors, and it is a good one, but it is not what this post is about. The part that took the actual thinking Once your invoice register speaks a protocol tha

2026-08-31 原文 →
AI 资讯

Time‑Based Public Access for the `/tv` Route in a Next.js App

Time‑Based Public Access for the /tv Route in a Next.js App TL;DR: I added a temporal gate that lets anyone hit /tv without a session cookie between 9 am‑6 pm America/Cancun. Outside that window the request falls back to the normal auth middleware. The change lives in src/lib/auth.ts and src/middleware.ts and required proper timezone handling and a tiny refactor of the auth flow. The Problem Our TV dashboard ( /tv ) is meant to be displayed on a wall screen in the office lobby. The screen should be visible to anyone during office hours, but it must stay protected after hours. The original middleware ( src/middleware.ts ) forced a session cookie ( AUTH_COOKIE_NAME ) on all routes, including /tv . The result was a “401 Unauthorized” on the lobby screen after 6 pm, which broke the intended user experience. The symptom was simple: GET /tv → 401 Unauthorized The error came from the auth middleware that blindly redirected unauthenticated requests to the login page. We needed a conditional bypass that only applied to the /tv path and only during the defined business hours. What I Tried First My first instinct was to add a quick if (request.nextUrl.pathname === "/tv") return NextResponse.next(); at the top of the middleware. That let the request pass, but it also opened the route for the whole day, ignoring the time constraint. I tried to read the server’s local time ( new Date() ) and compare the hour, but the server runs on UTC, so the check was off by 5 hours for the America/Cancun zone. The result was that the route was either always open or always closed, depending on where the CI runner was located. I also considered using a third‑party library like moment-timezone , but pulling in a heavy dependency for a single hour check felt overkill. The Implementation 1. Add a tiny time‑window helper I created a pure function isWithin in src/lib/auth.ts . It receives a start hour, an end hour, and a timezone identifier, then returns a boolean indicating whether the current momen

2026-08-31 原文 →
AI 资讯

AI Innovation in Open-source Platforms 2026: Real Data & Costs

Originally published at nlocoding.com 94% of Fortune 500 companies now contribute to open-source AI projects (GitHub Octoverse, 2026). Not just using them. Actually building the future, brick by brick. Open-source AI isn’t a fringe experiment anymore. It’s the backbone of 2026’s digital economy. The same survey shows 77% of SaaS startups use at least one open-source AI model in production. Power, flexibility, and price—pick all three. Here’s why this trend breaks everything you thought you knew about innovation. Open-source AI dominates enterprise adoption in 2026 Open-source AI platforms are now the default for 62% of enterprises (Gartner, 2026), surpassing proprietary AI for the first time. The data says it: vendor lock-in is dead. Microsoft, Google, and Amazon all run open-source LLMs internally—Meta’s Llama 3 powers 85% of their internal NLP workflows at zero license cost. Why? Transparency. Control. Faster bug fixes. The average company adopting open-source AI saves $1.2M per year on licensing alone (RedMonk, 2026). 62%of enterprises now default to open-source AI (Gartner, 2026) Actionable takeaway: If you’re still stuck on locked-down SaaS AI, run a pilot with open-source alternatives (Llama 3, Mistral, Falcon). Measure cost, speed, and model control. You’ll never look back. 💡 Pro Tip: Pair open-source AI with cloud credits (AWS, GCP) to minimize infra costs in early pilots. Model quality is now open-source’s real advantage The data shows open-source AI models outperform closed models at 73% of NLP benchmarks (Stanford HELM, 2026). This wasn’t true two years ago. Mistral Medium, for example, beats OpenAI’s GPT-4 Turbo at summarization, retrieval, and code generation—free, unrestricted, and running locally. HuggingFace’s leaderboard is led by open models in 18 of 24 tracked domains. You’ll notice something: innovation outpaces regulation. With open weights, anyone can fine-tune or inspect for bias. The top Kaggle winner in 2026 used Falcon 2B, trained on $40 wo

2026-08-31 原文 →
AI 资讯

2026 Trends: AI-Driven Software Testing Stats, Tools & ROI

Originally published at nlocoding.com 92%of regression bugs in SaaS platforms go undetected until production without AI-based testing (Source: Capgemini World Quality Report 2026) Most companies spend more on fixing bugs post-release than on their entire automated testing stack. According to the Testing Intelligence Survey 2026, the average cost to fix a bug in production is $3,800—triple what it costs to catch it during automated testing. This is why 2026 trends in AI-driven software testing matter: the cost of ignoring them is rising fast. AI-driven test coverage is replacing manual scripts in 2026 AI-driven test coverage now exceeds traditional manual scripting by 64% in efficiency (SmartBear State of Quality 2026). Companies like Atlassian cut manual test creation time by 71% after switching to AI-powered tools such as Testim and Mabl, which both cost around $100/user/month. Manual testers are not obsolete, but they are now orchestrators, not script jockeys. 💡 Pro Tip: Start by identifying repetitive UI tests. AI tools excel at these and deliver instant ROI. Self-healing tests are solving flaky pipelines Self-healing tests reduce flaky test failures by 83%, according to Sauce Labs' 2026 industry report. This matters: Netflix slashed CI/CD pipeline downtime from 14 hours/month to under 2 by using Functionize, which auto-fixes selectors and waits for dynamic elements. The technology isn't magic, but it is relentless. 83%fewer flaky failures with self-healing AI (Sauce Labs 2026) You’ll notice fewer midnight Slack panics. Give your team back their weekends. Adopt a self-healing platform with robust change detection. GenAI is writing—and maintaining—test cases in 2026 Generative AI wrote 54% of all new test cases at Fortune 500 companies in Q1 2026 (TestOps Pulse). Copilot for Test Automation, released by GitHub in February 2026, costs $19/month and supports Cypress, Playwright, and Selenium. The result? Test coverage expands, but more importantly: maintenance shrin

2026-08-31 原文 →
AI 资讯

ACAI — Adaptive Cognitive AI Architecture

Chapter 1 — Core Foundation 1.1 Objective The first version of ACAI should begin with a small, working core rather than attempting to implement the entire architecture at once. The Chapter 1 pipeline is: User ↓ FastAPI ↓ ACAI Orchestrator ↓ Model Service ↓ AI Model ↓ Response The first implementation uses a Mock Model so the system can be tested without requiring an external API key. 1.2 Project Structure ACAI/ └── backend/ ├── app/ │ ├── __init__.py │ ├── main.py │ ├── config.py │ ├── schemas.py │ ├── orchestrator.py │ └── services/ │ ├── __init__.py │ └── model_service.py │ ├── tests/ │ └── test_api.py │ ├── .env.example ├── requirements.txt └── README.md 1.3 Environment Setup mkdir ACAI cd ACAI mkdir backend cd backend python -m venv . venv Activate the virtual environment: . \.venv\Scripts\Activate.ps1 If PowerShell blocks the activation script: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned Then activate again: . \.venv\Scripts\Activate.ps1 1.4 Dependencies Create requirements.txt : fastapi uvicorn[standard] pydantic pydantic-settings python-dotenv httpx pytest Install: pip install -r requirements.txt 1.5 Configuration Create app/config.py : from pydantic_settings import BaseSettings , SettingsConfigDict class Settings ( BaseSettings ): app_name : str = " ACAI " app_version : str = " 0.1.0 " environment : str = " development " model_provider : str = " mock " model_name : str = " acai-demo-model " api_key : str | None = None model_config = SettingsConfigDict ( env_file = " .env " , env_file_encoding = " utf-8 " , extra = " ignore " , ) settings = Settings () 1.6 Environment Variables Create .env.example : APP_NAME=ACAI APP_VERSION=0.1.0 ENVIRONMENT=development MODEL_PROVIDER=mock MODEL_NAME=acai-demo-model API_KEY= Create the local environment file: copy . env . example . env 1.7 API Schemas Create app/schemas.py : from pydantic import BaseModel , Field class ChatRequest ( BaseModel ): message : str = Field ( ..., min_length = 1 , max_length = 10000 , descr

2026-08-30 原文 →
AI 资讯

Building My First RAG System: Deriving the Architecture from First Principles - Part One

Intro I recently read an article about a VC who uses AI to boost his productivity. He described building a knowledge base using NotebookLM, and one point that stuck with me was: Every time I read something online that I thought I wanted to remember, I'd copy and paste it into that repository. Whenever I wanted to write a blog post, I could query it and retrieve all the information I needed. Like him, I have knowledge and resources scattered across Logseq, Gmail, Notion, ADR documents, Slack, project readmes, Markdown files, Twitter, and more. That made me wonder: how could I build my own system? Tools like NotebookLM exist, but I want a single knowledge layer across all my sources—not isolated, manually managed workspaces. NotebookLM’s model requires creating a workspace, adding sources, and asking questions about them, but separate notebooks mean separate contexts. As an experienced engineer who’s never built a Retrieval-Augmented Generation (RAG) system, I saw this as an opportunity to learn and share. I’ll approach it from first principles, and in this series, we’ll: Architect a RAG system from the ground up. Break its subsystems down and clarify their responsibilities. Identify architectural decisions and tradeoffs. Integrate the RAG system with an LLM to create something like a personal Google Search for your whole digital life. Use Case Two years ago, I read an article about a man with ADHD. The post stayed with me, but for over a year I couldn’t find it again, even after searching bookmarks and Googling "article about a guy with ADHD". I finally found it because the author emailed it to his mailing list. Without that email, I might never have seen it again. With a personal knowledge base (RAG system), I could have simply asked for "an article about a guy with ADHD" and quickly found it. Let’s dive into how such a system works. What is Retrieval-Augmented Generation (RAG)? Retrieval-Augmented Generation is the process of supplementing LLM (Large Language Model

2026-08-30 原文 →
AI 资讯

Texas Governor Abbott blocks funding for more Flock cameras

As backlash grows over Flock's AI surveillance cameras, Texas Governor Greg Abbott has frozen state spending on them. The move came just ahead of the publication of a Texas Tribune investigation that revealed the state spent over $30 million on Flock cameras. That money was primarily raised by tacking a $1 fee onto insurance policies, […]

2026-08-30 原文 →
AI 资讯

How I track new AI model drops without refreshing five changelogs

Changelogs and pricing pages ship the model. Your feed just argues about it later. I used to treat AI Twitter like a release channel. Bad idea. The timeline is commentary. The drop is usually a quiet line on a docs page. Last month a new model ID showed up on an API pricing table before anyone I follow wrote a thread. I was not clever. That URL was already on a watch. The feed still spent the afternoon debating vibes. What belongs in a real brief When a lab ships, I want five boring facts: The model name and the ID your code will call Price per million tokens (input and output) Context window and any rate-limit changes Deprecations or aliases that reroute old names Where it lives (API only, chat app, open weights, or all three) A launch blog is optional. Those five lines are the brief. Where the news actually appears Social posts trail the docs. I keep pages, not accounts. OpenAI: API changelog, deprecations, pricing. Anthropic: news, platform release notes, pricing. Google: Gemini API changelog and pricing. Open weight: Hugging Face org pages I actually deploy from. Discord is faster for some open-weight labs. Fine. I still want the model card and the price before I rewrite a prompt. Monday rituals die by Tuesday I tried opening three changelogs every Monday. Skim. Close tabs. Feel responsible. It works until a midweek price cut or a silent alias change. Then you learn from an invoice spike or a broken eval. Google Alerts on "new GPT" or "Claude release" is noise. You get essays, not the SKU. Screenshot watchers catch layout shifts on marketing pages. Sometimes useful. I usually need the sentence that changed on the pricing table. What I leave running I paste the docs URLs I already trust into a website change alert and ask for a one-line brief: new models, price cuts, deprecations, alias moves. AyeWatch is what I use for that. Free Preview is $0 (3 topics, 6 lifetime runs). Pro is $9 a month. When something fires, I get a short summary, open the page, and copy the

2026-08-30 原文 →
AI 资讯

Standard RAG vs. Agentic RAG: Moving Retrieval From Pipeline Stage to Runtime Decision

The assumption every RAG demo makes Standard RAG assumes the user's question maps onto one vector search. One query in, one embedding, one top-k lookup, one answer. That assumption holds up in demos, because demos ask demo questions. "What's our parental leave policy?" is one document. Retrieve it, stuff it into the prompt, done. Then you ship, and a real user types: "Did the carrier rate change we approved in Q2 actually reduce our cost per shipment in the Northeast, and does that hold if I exclude the Boston depot?" That question needs a policy document, a rate table, a transactional aggregate, and a filtered re-computation. Your retriever will embed the whole sentence, find the three chunks nearest to it in vector space, and hand the model text that is topically adjacent and factually useless. The model, being a good sport, will answer anyway. The problem isn't the embedding model or the chunk size. You hardcoded how many times to retrieve, and where to retrieve from, at design time, for a question you hadn't read yet. Agentic RAG moves that decision to runtime. Planners, memory, MCP servers, sub-agents: all of it is implementation detail hanging off that one change. Architecture 1: standard RAG is a straight line STANDARD RAG — fixed pipeline, one pass ┌──────┐ 1. prompt+query ┌─────────────┐ │ User │ ───────────────────► │ Chat UI │ └──────┘ └──────┬──────┘ ▲ │ 2. query │ 6. response ▼ │ ┌─────────────┐ │ │ Retriever │ │ └──────┬──────┘ │ │ 3. fetch (top-k, one shot) │ ▼ │ ┌───────────────────────────┐ │ │ Knowledge Sources │ │ │ docs · PDFs · code · DB │ │ │ APIs · web index │ │ └───────────┬───────────────┘ │ │ 4. chunks │ ┌──────▼──────┐ └──────────────────────────│ LLM │ └─────────────┘ 5. prompt + query + enhanced context The defining property is that the model is never consulted about retrieval. It receives context and produces text, and retrieval already finished by the time it runs. That's a design choice with real advantages. One embedding call plus on

2026-08-30 原文 →
AI 资讯

Build a Tested Agent Skill with SKILL.md and Python Scripts

AI agents are good at interpreting goals, but prose instructions are a weak place to enforce exact rules. If a skill says "keep the commit subject short" or "never commit without approval," an agent can still misunderstand the boundary. The open-source how-to-create-a-skill-tutorial shows a practical split: let the agent make judgments, and let small local scripts validate repeatable rules. This tutorial builds the smallest useful version of that pattern: a commit-crafter skill with a SKILL.md file, a Python validator, and tests that run with the Python standard library. TL;DR An Agent Skill is a directory containing at least SKILL.md . Put the workflow and safety boundaries in that file. Put exact validation in a script. Keep the script deterministic, return meaningful exit codes, and run it before presenting the result to a user. The finished repository's example skill validates Conventional Commit messages. You can copy the same structure for release notes, config generation, research reports, or any other workflow with rules that can be checked mechanically. Prerequisites You need: Python 3.12 or newer for the repository's CI example. Git if you want the skill to inspect staged changes. An agent that supports the Agent Skills directory convention. A shell. The commands below use POSIX syntax; the files themselves are also designed for Windows. The project has no stable release tag at the time of writing. The examples and commands below are checked against the current main branch. Read the Agent Skills specification if your client uses a different discovery directory. 1. Create the skill directory The repository documents two useful scopes. A personal skill belongs in your user skills directory. A project skill belongs in the repository so a team can review and install it with the project. mkdir -p .agents/skills/commit-crafter/scripts mkdir -p .agents/skills/commit-crafter/references The required layout is simple: commit-crafter/ |-- SKILL.md |-- scripts/ | `--

2026-08-30 原文 →
AI 资讯

Live API specs for coding agents

Live API specs for coding agents An agent writing frontend code has to know the backend's API. It has three options. It can read the backend source and work out from scratch what the service already publishes. It can ask you, which promotes you to API documentation. Or it can swallow the entire OpenAPI document in order to use one route out of it. Then it does the same thing again tomorrow, against a stale swagger.json you exported last week. docs-mcpserver takes the spec straight from the running service, caches it, and serves it one operation at a time. The config { "cacheDir" : "./cache" , "libraries" : [ { "name" : "orders-api" , "description" : "Order handling service" , "sources" : [ { "type" : "url" , "origin" : "https://localhost:5001/openapi/v1.json" , "kind" : "schema" , "name" : "orders" } ] } ] } npm install -g docs-mcpserver claude mcp add docs -- docs-mcpserver --config /path/to/dev-docs.json That is the whole setup. One operation, not the whole spec The agent lists the definitions in orders , picks the one it needs, and fetches that. For an OpenAPI document the path operations are exposed as definitions named GET /orders/{id} , so it can also search by keyword. A few hundred tokens for the operation it is writing against, instead of the entire document. That keeps working as the service grows, which a pasted spec does not. The backend does not have to be running Every call is answered from the cached spec, never from the network. The fetch happens on startup and then in the background while you work, so an endpoint you added 20 seconds ago is already visible. Start the backend once, shut it down, and keep building the frontend. The agent still has real routes and real payload shapes. If the service is down, or answers with something that is not a spec, the last known-good copy keeps being served. Code and issues: github.com/jgauffin/dev-docs-mcp . On npm as docs-mcpserver .

2026-08-30 原文 →