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

标签:#rag

找到 169 篇相关文章

AI 资讯

Building an AI Question Paper Generator: Conquering Google Cloud Document AI, Firestore Vector Search, and Gemini

As part of the Gen AI Academy APAC , I set out to solve a major pain point for educators: manually sifting through textbooks to create grade-appropriate question papers. I built an automated Question Paper Generator using a Serverless Next.js stack, a Retrieval-Augmented Generation (RAG) architecture, and the complete Google Cloud AI suite. Teachers simply upload a textbook chapter (PDF), specify the grade and subject, and let the AI generate a fully formatted assessment quiz. While the architecture sounds straightforward, orchestrating these enterprise-grade APIs in a serverless environment presented several intense technical hurdles. Here is a deep dive into the architecture, the specific roadblocks I hit, and how I ultimately solved them. 🏗️ The RAG Architecture The application is built on Next.js 15 and deployed to Google Cloud Run . The pipeline flows as follows: Document Extraction : The PDF is uploaded and sent to Google Cloud Document AI (Document OCR Processor) to extract the raw text. Chunking & Embeddings : The text is chunked into logical paragraphs and sent to Vertex AI ( text-embedding-004 ) to generate dense vector embeddings. Vector Database : The embeddings and metadata (Grade, Subject) are stored seamlessly in Firestore using native VectorValue support. Retrieval & Generation : When a teacher requests a quiz, the query is embedded, and a findNearest Vector Search runs on Firestore. The retrieved context is passed to Google Gen AI ( gemini-3.5-flash ) to synthesize the structured question paper. 🐛 The Technical Challenges & How I Solved Them Building an end-to-end pipeline using cutting-edge SDKs often means dealing with strict schema validations and opaque error codes. Here are the major technical gotchas I faced. 1. The Document AI Region Endpoint Mismatch The Challenge: I provisioned a Document OCR processor in the asia-south1 region. However, when my Node.js client attempted to send a processing request using the processor's full resource name,

2026-08-29 原文 →
AI 资讯

Building a Hybrid RAG System with FAISS, BM25, and Agentic AI

As part of my AI Engineering journey, I recently worked on a project that helped me understand how Retrieval-Augmented Generation (RAG) works in practice. I built a Hybrid RAG system that combines FAISS vector search and BM25 keyword search to retrieve relevant information from a knowledge base and use it to generate grounded answers. In this post, I’ll briefly share what I built, how the system works, and some of the things I learned along the way. Why RAG? Large Language Models are great at generating natural-language responses, but they may not have access to information contained in a specific document or knowledge base. RAG addresses this by first retrieving relevant information from an external knowledge base and then providing that information to the LLM as context. The basic workflow is: User Query ↓ Retrieve Relevant Information ↓ Provide Context to LLM ↓ Generate Answer For my project, I wanted to take this a step further by combining semantic search and keyword search. 🔍 Hybrid Retrieval The system uses two retrieval methods: Vector Search with FAISS Document content is divided into smaller chunks and converted into vector embeddings. These embeddings are stored in a FAISS index, which is used to find documents that are semantically similar to the user’s query. This is useful even when the query and the document use different wording. Keyword Search with BM25 The second retrieval method is BM25. BM25 focuses on the occurrence and importance of terms in the query and documents. This makes it useful for exact terminology, technical terms, names, and identifiers. Instead of depending on only one retrieval method, both approaches are combined. User Query │ ┌──────────┴──────────┐ ↓ ↓ FAISS Search BM25 Search Semantic Search Keyword Search │ │ └──────────┬──────────┘ ↓ Hybrid Ranking ↓ Relevant Context ↓ LLM ↓ Final Answer The FAISS and BM25 scores are normalized and combined using weighted scoring. The results are then ranked, and the highest-ranked chunks ar

2026-08-29 原文 →
AI 资讯

Mind Discipline: Why Our AI Advisor Only Reads Hand-Crafted Contracts

In my first post, I wrote about why I spent my first week writing zero business logic and instead built rig - our lightweight, POSIX-compliant local provisioning tool. It was my way of rejecting "wiki-ops" and applying Infrastructure-as-Code (IaC) discipline to our local environments so that a hardware failure means minutes of downtime, not a week. But as I transitioned into Week Two, I was hit by a different kind of operational reality check. For years, I had been building a comprehensive repository of system architecture, design decisions, and guidelines on Confluence. It was my digital home. So, knowing I would be creating a startup, I set to work writing my documentation in my spare time in preparation. But during a brief hiatus of inactivity, the space was silently, unceremoniously deleted. It was gone. Late nights of ideas, patterns, templates, and reference materials vanished into the cloud ether. That loss was a violent reminder of a lesson I thought I'd fully mastered: if your documentation doesn't live alongside your code, you don't truly own it. Relying on third-party SaaS wikis to store the soul of your system architecture is just another form of "click-ops". It creates an artificial separation between the craftsmen writing the logic and the documentation that defines it. But rather than mourning my lost Confluence space, I treated it as a catalyst. I decided that our young startup would not have a bloated, detached corporate wiki. Instead, we would treat Documentation as a Contract - a unified, git-backed human-and-machine contract that serves as the precise, zero-maintenance boundary for our AI systems. Here is how losing my documentation led to a new architectural philosophy, and how we built a zero-overhead, "Anti-AI AI Strategy" that uses GitLab CI/CD and Google Workspace to run a secure, managed RAG pipeline. The Anti-AI Strategy: Why We Refuse to Let AI Write Our Code Walk into almost any tech startup today, and you’ll find developers blindly feed

2026-08-28 原文 →
AI 资讯

Self-Hosting S3-Compatible Storage on Bare Metal

You self-host S3-compatible storage on bare metal by installing a single Rust binary on a Linux server and pointing any S3 client at it. RustFS installs with one script, listens on port 9000 (S3 API) and 9001 (console), and is Apache 2.0 licensed. Single-node mode is production-ready today; multi-node clustering is still under testing. Every command below is copied verbatim from the official source cited beside it. This sandbox has no Docker daemon, so none of the commands were executed here; they are marked accordingly. Key Stats Fact Source RustFS installs with one command and runs as a systemd service on x86_64 or aarch64 Linux RustFS docs (Linux quick-start) Default S3 API port is 9000; console port is 9001 RustFS GitHub README Default credentials are rustfsadmin / rustfsadmin and must be changed RustFS README + docs RustFS is Apache 2.0 licensed and S3-compatible RustFS GitHub README Single-node mode is production-ready; distributed mode is still under testing RustFS README Feature & Status What is self-hosted S3-compatible storage? A self-hosted S3-compatible storage server is a program you run on your own hardware that speaks the Amazon S3 API. Applications using AWS SDKs, the aws CLI, or MinIO's mc can talk to it without code changes, because the bucket, object, and credential model matches S3. The difference from a cloud bucket is ownership: the disks, the network path, and the uptime are yours. RustFS is one such server, written in Rust and licensed under Apache 2.0. It exposes the S3 API on port 9000 and a web console on 9001, and it stores objects on the local filesystem. Because it is S3-compatible, the same client code that targets AWS S3 also targets a RustFS node. That compatibility is the whole point of self-hosting here: you get an S3 endpoint without renting one. Why run object storage on bare metal? Running object storage on bare metal means installing the server directly on a Linux machine instead of in a container or a managed cloud. The appeal

2026-08-27 原文 →
AI 资讯

Using SynapCores as a LlamaIndex Vector Store + Property Graph Store

Most LlamaIndex setups end up with two separate backends once you go beyond plain vector search: a vector store for VectorStoreIndex , and a separate graph database for PropertyGraphIndex when you need relationship-aware retrieval (GraphRAG). Two services, two connection strings, two things to keep in sync. This is a walkthrough of backing both index types with SynapCores instead — one engine, one connection, both index types. Setup docker run -d --name synapcores -p 8080:8080 \ -e AIDB_ACCEPT_LICENSE = 1 \ -v synapcores-data:/var/lib/synapcores \ ghcr.io/synapcores/community:latest pip install llama-index llama-index-vector-stores-synapcores llama-index-graph-stores-synapcores Both integration packages are independently published on PyPI: llama-index-vector-stores-synapcores llama-index-graph-stores-synapcores Vector store — standard RAG from llama_index.core import VectorStoreIndex , StorageContext , Document from llama_index.vector_stores.synapcores import SynapCoresVectorStore vector_store = SynapCoresVectorStore ( uri = " http://localhost:8080 " , embedding_dim = 1536 ) storage_context = StorageContext . from_defaults ( vector_store = vector_store ) docs = [ Document ( text = " SynapCores runs vector search, graph traversal, and SQL in one engine. " )] index = VectorStoreIndex . from_documents ( docs , storage_context = storage_context ) query_engine = index . as_query_engine () response = query_engine . query ( " What does SynapCores combine into one engine? " ) print ( response ) The vector store implements the full BasePydanticVectorStore ABC — add , delete , query , delete_nodes , clear , plus the async surface. Metadata filtering supports the full MetadataFilters grammar: all 12 operators ( EQ , NE , GT / GTE / LT / LTE , IN , NIN , TEXT_MATCH , TEXT_MATCH_INSENSITIVE , CONTAINS , IS_EMPTY ) with AND / OR / NOT and nested groups — so you're not giving up filtering power by moving off a dedicated vector DB. If you already have data in SynapCores from a prev

2026-08-27 原文 →
AI 资讯

OCI Log Retention Validation: Moving Load Balancer Logs to Object Storage with Connector Hub

A practical checklist for confirming logs are collected, routed, stored, and reviewable Logs are useful only if they are available when the team needs them. In OCI, it is possible to enable service logs, route them through Connector Hub, and store them in Object Storage for later review. Connector Hub is also referenced in some Oracle material as Service Connector Hub. The setup can look simple on the surface. But from a delivery point of view, the important question is not whether the connector was created. The important question is: Can we prove that the logs are being collected, routed, stored, retained, and reviewed when needed? This article is written from a practical validation point of view. It uses a simple example: moving OCI Load Balancer logs from OCI Logging to Object Storage using Connector Hub. Scope note: this is an independent review and validation exercise. It is not a client implementation, and no production environment, customer data, or confidential information is referenced. All names, prefixes, and identifiers below are placeholders. Console labels, defaults, and behaviour can change between releases and regions, so every value should be confirmed in your own tenancy and current Oracle documentation. The goal is not to describe every possible logging design. The goal is to give a clear checklist that helps confirm the flow is working end to end. Why log retention needs validation Enabling a log is not the same as retaining a log. A team may be able to show that logging was switched on. That does not automatically prove that the data still exists for the period being questioned, that it landed where it was supposed to land, or that someone can retrieve and read it when needed. There is one detail worth stating early. There are two retention clocks, not one. Clock What it controls Where it is set Logging retention How long the log data stays inside OCI Logging On the individual log Object Storage lifecycle How long the exported copy stays in the

2026-08-27 原文 →
AI 资讯

How to Build an Agentic RAG Pipeline with Real-Time Web Search

TL;DR An agentic RAG pipeline treats retrieval as a tool the AI agent can call, evaluate, and call again rather than as a fixed step. The pipeline can search an internal knowledge base first, then use real-time web search when the available evidence is missing, weak, or outdated. Internal documents and web results should be converted into a shared evidence format before the model generates an answer. A reliable system must preserve URLs, publication dates, document identifiers, and the claims supported by each source. Retrieval quality, web-search precision, citation correctness, latency, cost, and stopping behaviour should all be evaluated. A basic RAG pipeline works well until the answer is not in the knowledge base. Imagine an enterprise copilot that can answer questions about internal product documentation. It performs semantic search against a vector database, retrieves several relevant passages, and passes them to a language model. For questions covered by the indexed documents, the system may work remarkably well. Then a user asks about a release announced yesterday, a recently changed regulation, or how the company’s product compares with a new competitor. The vector database cannot retrieve information it has never indexed. A conventional pipeline may return no answer, but it may also produce a confident response from incomplete or outdated context. Adding a Web Search API helps solve the freshness problem, but it introduces another decision: when should the system trust its internal knowledge, and when should it search the open web? An agentic RAG pipeline places that decision inside the retrieval workflow. What Makes a RAG Pipeline Agentic? A traditional RAG pipeline usually follows a fixed path: transform the question into a search query, retrieve the most similar passages, add those passages to the prompt, and generate an answer. An agentic RAG pipeline allows the model to make decisions between those stages. Retrieval becomes a tool rather than a manda

2026-08-26 原文 →
AI 资讯

Build a Local RAG Chatbot for Trading Research Using Ollama + Termux (Zero API Cost)

Why a Local RAG Chatbot for Trading Research Most "AI trading assistant" products are black boxes: your notes, strategy docs, and market notes get shipped to a third-party API, billed per token, and stored who-knows-where. For a retail NIFTY trader or a quant researcher, that is the worst of all worlds — you pay continuously, you leak your edge, and you cannot audit what the model actually read. This guide shows how to build a Retrieval-Augmented Generation (RAG) chatbot that runs 100% locally on an Android phone using Termux + Ollama. It ingests your own research (PDFs, markdown notes, option-chain exports) and answers questions grounded only in that data. No OpenAI key. No Anthropic key. No monthly bill. No data leaving the device. OBSERVED: Running ollama run llama3.2 on a mid-range phone inside Termux is slow but usable for document Q&A (3–8 tokens/sec). On a laptop it is smooth. SOURCE: Local testing on Termux 0.118, Ollama 0.3.x, Android 14. DERIVED: For production research volumes, run Ollama on a spare x64 machine and point Termux at it over LAN. What You Will Build A four-part pipeline: Ingest — load your research docs (markdown, PDF, CSV) into chunks. Embed — turn chunks into vectors with a local embedding model. Store — keep vectors in a local file-based index (no server needed). Answer — retrieve top-k chunks and ask a local LLM to answer strictly from them. The whole thing is ~200 lines of Python. No paid APIs. Prerequisites Android phone with Termux installed (F-Droid version, not Play Store). ~2 GB free storage. Basic Python comfort. pkg update && pkg upgrade -y pkg install python clang ffmpeg -y pip install ollama numpy Install Ollama inside Termux: curl -fsSL https://ollama.com/install.sh | sh NOTE: The official install script targets Linux. On Termux you often need the community build. If the script fails, install the ollama package via a Termux-compatible binary or run Ollama on a LAN machine and use ollama serve remotely. Pull a small model and a

2026-08-25 原文 →
AI 资讯

I Almost Shipped a RAG Assistant That Lied About APIs That Don't Exist

I wrote this on X a few weeks ago: I just had a very bad reminder as to the fact these LLMs are statistical parrots, I let it write code I normally wouldn't trust it to write (infra code, lots of unique behaviours) and damn I wasn't talking about my own project when I wrote that. Then StacksNG proved me right, on its own corpus, in a hackathon I'm trying to win. Ask my RAG assistant to verify an Interswitch webhook signature, and it didn't say "not in my knowledge base." It wrote a full authentication flow — real-looking endpoint, real-looking headers — and cited a source URL. The URL wasn't in my corpus. It wasn't anywhere. The model invented a citation for content it also invented, with zero hedging. I'm building StacksNG for the Africa Deep Tech Challenge 2026 — an offline coding assistant scoped to the African fintech stack: Paystack, Flutterwave, Monnify, Termii. Before I submitted, I ran a 20-prompt adversarial batch against my own pipeline. Category A (in-corpus baseline) and D (phrasing brittleness) came back clean. Category B — five prompts asking about payment providers I deliberately never scraped into the corpus, Kuda, PalmPay, Interswitch, Paga, OPay — did not. Three of five ignored a system prompt that already said, in plain language, "if the context doesn't contain enough information, say so." That's the failure mode that zeroes out half the score in a hackathon where accuracy is 50% of the total. My first theory was wrong, and I could prove it My instinct was: this is a retrieval-confidence problem. Set a similarity threshold, refuse to answer below it, done. I checked the actual numbers before writing that fix. Top-1 similarity What happened Correct in-corpus answer 0.718 correct Worst fabrication (Interswitch) 0.712 fully invented, fake citation Correct decline (out-of-domain topic) 0.691 "not in my knowledge base" The worst hallucination had higher retrieval similarity than the cleanest correct decline. There's no threshold that lets the good case

2026-08-24 原文 →
AI 资讯

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏 开场钩子: 你在网上看到的多数「AI Agent」都是 demo。它们之所以上不了生产,原因往往 只有一个 —— 而下面这个开源的小脚手架,专门解决它。 我们已经过了「能调通大模型」就算赢的阶段。现在真正难的是那没人讲的 10%: 是什么阻止 Agent 做出伤害性的事? 我在微软跑过一套约 25 个 Agent 的生产平台,现在也帮团队把 Agent 从笔记本推进到真实用户面前。两边的体会是一致的。 一个不太舒服的真相:能调 5 个工具的聊天机器人, 不是产品 。周末项目和你敢放到客户面前的 系统之间,差的只有三件事 —— 而且全都是不酷、不性感的工程: 你怎么给输出质量打分 (质量门)。 你怎么决定什么时候必须人签字 (审批门)。 你如何让整套东西模型无关 ,不被某个厂商锁死。 所以我写了一个很小的 harness,把这三件事摆在最显眼的位置。它故意做得很小 —— 一小时能 读完 —— 因为价值不在「框架」,在 模式 本身。 仓库: github.com/zhasun0818/ai-agent-scaffold 1. 质量门:别发布你无法打分的东西 Agent 的输出是「预测」不是「承诺」。上线前它必须过一道 检查 :是否达到你的标准。脚手架里 这是一个可插拔的 QualityGate ,你可以换成 LLM 裁判或测试套件: # agent_harness/eval.py @dataclass class EvalReport : passed : bool score : float checks : List [ str ] class QualityGate : def grade ( self , proposal : str , context : str = "" ) -> EvalReport : return self . grader ( proposal , context ) 循环在门没过之前拒绝执行: result . report = self . quality . grade ( proposal , f " state= { state } " ) if not result . report . passed : self . approval . log ( " quality-gate " , " blocked " , result . report . __str__ ()) return result 注意它 把拦截记录下来了 。生产里你会想把这些被拦的尝试都进可观测性系统。「这周我们拦下 了 12% 的 Agent 提议」是个真实 KPI —— 它说明门在工作。 2. 审批门:所有人都忘掉的那一步 这才是让企业真正点头说「可以」的东西。当 Agent 想加急订单、取消订阅、或动钱的时候,它应该 停下来问人 。沉默不等于同意。 # agent_harness/approval.py class ApprovalGate : def request ( self , action : str , detail : str ) -> bool : # 生产里:推一条通知到 Teams / Slack / 邮件,然后等待。 decision = input ( f " Approve { action } ? [y/N] " ). strip (). lower () self . audit . append ( AuditEntry ( time . time (), action , " human-reviewer " , decision , detail )) return decision . startswith ( " y " ) 在脚手架里,标记 needs_approval=True 就够了: @tool ( " expedite_order " , " Mark an order as expedited. " , needs_approval = True ) def expedite_order ( order_id : str ) -> str : return f " PO { order_id } : marked expedited " 而且因为有 审计链 ,你永远能回答「谁改的、为什么」—— 这通常是合规团队问的第一个问题。 3. 模型无关的 provider:别跟一个厂商结婚 模型每几周就变,价格也是。你的 Agent 循环不该知道自己在对谁说话: # agent_harness/providers.py class ModelProvider ( Protocol ): def

2026-08-23 原文 →
AI 资讯

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship Hook: Most "AI agents" you see on the internet are demos. Here's the single most common reason they never reach production — and a small, open-source harness that gets past it. We are past the phase where the hard part of building an AI agent was calling the model. The hard part now is the 10% nobody talks about: what stops the agent from doing something harmful? I've seen this from both sides — I built and ran a ~25-agent platform in production at Microsoft, and now I help teams take agent ideas from a notebook to real users. The uncomfortable truth: a chatbox that can call 5 tools is not a product. The difference between a weekend project and a system you can put in front of customers is three things — and they're all boring, non-glamorous engineering: How you grade output quality (the quality gate). How you decide when a human must sign off (the approval gate). How you make the whole thing model-agnostic so you're not locked into one vendor. So I wrote a tiny harness that keeps these front and center. It's intentionally small — small enough to read in an hour — because the value isn't in a framework, it's in the pattern . Repo: github.com/zhasun0818/ai-agent-scaffold 1. The quality gate: don't ship what you can't grade An agent's output is a prediction, not a promise. Before it ships, you need a check that it passes your bar. In the harness this is a pluggable QualityGate — a rule of thumb you swap with an LLM judge or a test suite: # agent_harness/eval.py @dataclass class EvalReport : passed : bool score : float checks : List [ str ] class QualityGate : def grade ( self , proposal : str , context : str = "" ) -> EvalReport : return self . grader ( proposal , context ) The loop refuses to execute if the gate fails: result . report = self . quality . grade ( proposal , f " state= { state } " ) if not result . report . passed : self . approval . log ( " quality-gate " , " blocked " , result

2026-08-23 原文 →
AI 资讯

OVHcloud Raises Prices as AI Memory Demand Reprices Non-AI Infrastructure

OVHcloud will raise prices from September, with 2026-edition gaming servers up 87 percent and other recent servers 40 to 59 percent. Founder Octave Klaba says memory cost six times more in June than a year earlier, as RAM suppliers shifted capacity toward high-bandwidth memory for AI. AWS, buying years ahead, has repriced one reserved GPU product. By Steef-Jan Wiggers

2026-08-23 原文 →
AI 资讯

A Developer's Checklist for Every RAG Lifecycle (Beyond Chunk-Embed-Search)

If your mental model of RAG is "chunk → embed → search → LLM," you're missing about 80% of what actually makes a RAG system production-ready. Here's a practical checklist across all 10 lifecycles I ran into while building one. Full technical breakdown with diagrams is on Hashnode (linked above) — this is the condensed, "what to actually check" version. ✅ Document lifecycle [ ] Can you update a single document without a full re-index? [ ] Do you have a deletion path (not just an addition path)? [ ] Are you deduplicating before you embed? ✅ Embedding lifecycle [ ] Do you know what happens if you switch embedding models? [ ] Are you tracking dimensions and normalization consistently? [ ] Can you re-embed the whole store without downtime? ✅ Retrieval lifecycle [ ] Are you tuning Top-K, or using a default and hoping? [ ] Do you have metadata filtering before similarity search? [ ] Have you tried hybrid (keyword + semantic) search yet? ✅ Inference lifecycle [ ] Do you know your cold-start latency vs. warm inference? [ ] Are you tracking tokens/sec as a real metric, not a vibe? [ ] CPU or GPU — did you choose, or did it choose you? ✅ Prompt lifecycle [ ] Are you compressing context, or dumping everything retrieved? [ ] Do you track input vs. output tokens separately? [ ] Is your system prompt fighting your retrieved context? ✅ Request lifecycle [ ] Can you see latency broken down by stage (embed / retrieve / generate)? [ ] Do you know which stage is your actual bottleneck? ✅ Cache lifecycle [ ] Are you caching query embeddings? [ ] Are you caching full responses for repeated questions? ✅ Evaluation lifecycle [ ] Can you measure retrieval precision/recall? [ ] Do you have a faithfulness or answer-relevance check? [ ] If you "improved" something, can you prove it? ✅ Production lifecycle [ ] Health checks, retries, rate limiting — in place or assumed? [ ] Are secrets actually out of your codebase? [ ] Do you have CI/CD, or are you deploying by hand? ✅ Cloud lifecycle [ ] Do y

2026-08-23 原文 →
AI 资讯

483 tests passed, but Vestibule RAG framework wasn't installable — lessons from building with AI agents

I spent two months building Vestibule, an open-source Python framework for the boring layer of RAG ingestion — stable document IDs, a state ledger, error classification, per-vertical governance. The parts every team struggles with once the demo works and production doesn't. Most of the code wasn't typed by me. Four AI agents did the work — one wrote designs, one reviewed them, one implemented, one reviewed the code — all through real GitHub pull requests, with me signing off at every gate. The result: twelve components, three releases, 878 tests. Two moments defined the whole experience. When the process caught what I couldn't The trickiest component provisions vector indexes on first use, safely even when workers race each other. Its design was rejected and revised five times before any code existed. In the first round, the reviewer agent found a genuine race condition: a worker still inside a slow index-creation call (~390 seconds with retries) would look stale (the threshold defaulted to 300 seconds), lose its claim to a waiting worker, and now two workers create the same index. A production race, in the default configuration, spotted by one AI reading another AI's design — before a single line was written. When green tests lied to me After v0.2 shipped, I wrote a quickstart script and ran the pipeline the way a stranger would — for the first time. pip install didn't work. At all. A packaging conflict made the whole framework uninstallable, while 483 tests sat green. An hour of actually using it turned up two more: a default model name that had never once worked against the real SDK, and an import that took down an entire package when an optional dependency was absent. What went wrong wasn't the tests — it was what they measured. They proved the code agreed with itself: same working tree, same mocked seams. Nothing ever checked the world a user lives in: clean machine, real install, real SDK. Passing tests and a working product turn out to be two different claims

2026-08-23 原文 →
AI 资讯

ai agents vs automations: When to build an autonomous agent and when a simple workflow suffices

What's the difference? An AI agent is a loop-driven system that can decide which tool to call next, keep state across interactions, and adapt its behaviour. An automation is a fixed sequence of steps that runs the same way every time. In this guide you'll build both a plain n8n workflow that sends a prompt to OpenAI and stores the answer, and a full RAG-enabled AI agent that decides when to fetch documents, when to query the LLM, and when to respond. By the end you'll see why most teams over-engineer, and you'll have a production-ready example you can ship tomorrow. Key insight: If your use-case requires conditional tool use, memory, or dynamic goal-setting, you need an AI agent; otherwise a straight automation is cheaper, faster, and easier to maintain. What you need Tool Plan / Price Role n8n (open-source workflow engine) Community edition (self-hosted, free) - see https://n8n.io/pricing for hosted options Orchestrates both automation and agent pipelines OpenAI API (ChatGPT/GPT-4) Pay-as-you-go - see https://openai.com/api/pricing Generates natural-language responses Pinecone (vector store) Free tier or paid plan - see https://www.pinecone.io/pricing Holds document embeddings for RAG Docker (container runtime) Free Runs n8n locally or in CI Git (version control) Free Stores workflow definitions Estimated build time: ~4 hours for a complete agent (including embedding documents) and ~1 hour for the plain automation. Step-by-step build 1. Set up n8n locally # Pull the official n8n Docker image and start it on port 5678 docker run -d --name n8n \ -p 5678:5678 \ -e N8N_BASIC_AUTH_ACTIVE = true \ -e N8N_BASIC_AUTH_USER = admin \ -e N8N_BASIC_AUTH_PASSWORD = secret \ n8nio/n8n What this does: launches a self-hosted n8n instance with basic auth. After a few seconds open http://localhost:5678 and log in with the credentials above. 2. Create the plain automation workflow In the n8n UI, click New Workflow . Add a Webhook node (trigger URL: /automation ). This receives a JSON

2026-08-22 原文 →
AI 资讯

RAG vs MCP in AI Testing: Stop Treating Them as Competitors

If you are building AI-powered test automation, you may eventually run into this question: Should we use RAG or MCP? The question sounds reasonable, but it is slightly misleading. RAG and MCP solve very different problems. In testing, you will probably need both. The Problem With AI-Generated Tests LLMs can already generate Selenium, Cypress, and Playwright tests from natural-language prompts. Ask: Test the login flow with valid credentials. and an AI can produce a reasonable script. But there is a problem. The AI does not automatically know: Your actual business rules Existing test cases Previous defects Test data API behaviour High-risk workflows Team-specific automation standards It knows how testing works , but not necessarily how your product works . That is where RAG becomes useful. What RAG Actually Solves RAG gives the AI access to project-specific information. Instead of working from a generic prompt, the model can retrieve relevant: Requirements Test Cases API Docs Bug History Business Rules Existing Automation Test Data Now consider the same request: Test the checkout flow. Without RAG, the AI may create a fairly standard checkout process. With RAG, it could first learn: Which payment methods are supported Whether guest checkout is allowed Which validations are required Which checkout bugs appeared previously Which scenarios already exist The generated test becomes much more relevant. But there is still a limitation. Knowing what should happen does not mean the AI can actually test it. That Is Where MCP Comes In MCP gives an AI system access to external tools. For browser testing, that could mean allowing an AI agent to use Playwright capabilities to: Open Page ↓ Inspect UI ↓ Enter Data ↓ Click ↓ Observe Result ↓ Validate So the difference is simple: RAG gives the AI context. MCP gives the AI capabilities. Or even shorter: RAG = What does the AI know? MCP = What can the AI do? Why This Matters for Test Automation Imagine an AI receives this instruction: C

2026-08-21 原文 →
安全

S3 Compatibility Doesn't Guarantee S3-Level Security

Security researchers at Wiz recently examined S3-compatible object storage services across six popular neoclouds, revealing significant security gaps compared to Amazon S3. While S3 has become the de facto standard for object storage, most services lack several of AWS's security protections. By Renato Losio

2026-08-21 原文 →
AI 资讯

Why Hitting Your Coverage Target Is Making Your Tests Worse

I had 87% coverage, and we still broke the billing flow on launch day. Not because of a gap in the percentage. Because 87% was covering the wrong things. The tests were written to pass a gate, not to catch a failure. That is a more common story than most teams admit. And the reason it keeps happening is not that engineers are careless. It is that the incentive structure you created made it the rational outcome. The series checkpoint The first three articles in this series built the investment case for testing and then dismantled the received wisdom about how to execute it. We've made the economic argument for automation. We've restructured when quality checks happen across the SDLC. We've replaced the pyramid model with something shaped by risk rather than by code hierarchy. Now, when someone asks: how do you know if it is working? The answer most teams give is their coverage percentage. This article is about why that answer is structurally broken, and why fixing it is a management decision before it is a tooling decision. What coverage percentage actually measures Coverage percentage tracks which lines of your code were executed during a test run. If a line ran, it counts as covered. That is the complete definition. It does not measure whether the test asserted anything meaningful about that line. It does not measure whether both branches of a conditional were exercised. It does not measure whether the specific inputs that cause failures were ever tried. A test that calls a payment function and checks assert response is not None covers the same lines as a test that validates the transaction ID, amount, currency, error code, and retry behaviour. The coverage tool treats them identically. The research on this is unambiguous. A 2017 study by Kochhar et al. examined the correlation between code coverage and actual bug rates across 100 large open-source Java projects. The finding: the coverage of existing test suites has an insignificant correlation with the number of b

2026-08-21 原文 →
AI 资讯

Chapter 2 (Part 2) Knowledge Retrieval Engine

2.6 Why Retrieval Is Necessary A Large Language Model only knows what was available during its training. If the user asks about something that changed after the model was trained, the model may not know the latest information. Instead of forcing the language model to guess, ACAI first determines whether external information is required. User Prompt │ ▼ Need External Knowledge? │ ┌────┴────┐ │ │ No Yes │ │ ▼ ▼ Continue Search Engine │ ▼ Document Ranking │ ▼ Source Selection │ ▼ Context Builder Internal Workflow The Retrieval Engine performs several sequential operations: Stage 1 — Query Generation The original user prompt is transformed into one or more optimized search queries. Example User Prompt Explain quantum computing. Generated Queries Quantum computing basics Quantum computing architecture Quantum algorithms Quantum hardware Instead of searching only once, multiple optimized queries increase the chance of retrieving relevant information. Stage 2 — Source Collection The retrieval system collects candidate documents. Possible sources include: • Internal Knowledge Base • Company Documentation • Scientific Papers • Technical Documentation • API Documentation • User Files • Vector Database Stage 3 — Ranking Not every document is equally useful. The Ranking Engine assigns a relevance score. Document A Score 96% Document B Score 91% Document C Score 72% Document D Score 44% Only the highest-quality documents move to the next stage. Stage 4 — Filtering The system removes: • Duplicate documents • Low-quality sources • Irrelevant information • Outdated documents The objective is to reduce noise before reasoning begins. 2.7 Context Optimization Layer One of the largest limitations of LLMs is the context window. Suppose the retrieval engine returns 500 pages. The model cannot efficiently process every page. Therefore ACAI introduces a Context Optimizer. Workflow 500 Pages ↓ Ranking ↓ Filtering ↓ Compression ↓ Important Facts ↓ LLM Instead of sending every token, only the

2026-08-20 原文 →