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

标签:#ai

找到 4670 篇相关文章

AI 资讯

Building Hermes Financial Agent: An Explainable AI Copilot for EGX Investors

Overview I built Hermes Financial Agent — an AI-powered financial assistant for investors in the Egyptian Exchange (EGX). The goal: not just calculate portfolio value, but explain risks in a transparent, auditable way. Features Real EGX market data via Yahoo Finance Portfolio tracking and valuation Daily financial reports Telegram-user portfolio isolation Cached quote fallback for resilience Explainable risk insights Explainable Risk Intelligence Unlike traditional trackers, Hermes surfaces: Portfolio concentration risk Stale market data exposure Quote coverage percentage Valuation gaps from unavailable data Users understand confidence level behind their valuation — not just the number. Technical Stack Hermes Agent framework Python GitHub Actions (automated smoke testing) Offline-safe quote fallback architecture Repository 🔗 GitHub Repository Future Roadmap News sentiment analysis Investment thesis tracking Market briefing generation Advanced financial reasoning agents hermeschallenge

2026-06-01 原文 →
AI 资讯

I built an n8n MCP Server so Claude can list, run, and monitor my workflows in plain English

I got tired of opening the n8n dashboard every time I needed to check on a workflow. You know the drill: open browser → navigate to executions → find the right workflow → check status → close. Five clicks for something that should be instant. So I built a 9-node n8n workflow that exposes my entire n8n instance to Claude Desktop via the Model Context Protocol (MCP) . Now I just type: "Did my backup automation run successfully last night?" And Claude calls my real n8n API and responds with the execution status. No browser. No clicking. What is MCP? MCP (Model Context Protocol) is an open standard from Anthropic that lets AI assistants connect to external tools and data sources. Instead of just answering questions from training data, Claude can call real APIs, read live data, and take actions. n8n already has an MCP Server Trigger node (available in 1.70+). I used it to expose 4 tools to Claude: Tool What it does list_workflows Returns all active workflows with IDs and names run_workflow Triggers any workflow by ID get_executions Pulls recent execution history with status search_workflows Keyword filter across all workflow names How it works The architecture is simple: Claude Desktop → mcp-remote → n8n MCP Server Trigger → Code nodes → n8n REST API Each of the 4 tools is a Code node that calls the n8n REST API internally using X-N8N-API-KEY authentication. The workflow: MCP Server Trigger — SSE endpoint that Claude connects to list_workflows — GET /api/v1/workflows?active=true run_workflow — POST /api/v1/workflows/{id}/run get_executions — GET /api/v1/executions?workflowId={id}&limit=N search_workflows — keyword filter on workflow names Credentials are stored in n8n Variables ( $vars.N8N_BASE_URL and $vars.N8N_API_KEY ) — never hardcoded. The Claude Desktop config { "mcpServers" : { "n8n" : { "command" : "npx" , "args" : [ "mcp-remote" , "https://your-n8n-instance.com/mcp/your-webhook-id/sse" ] } } } Restart Claude Desktop. Claude now has access to your n8n instance. R

2026-06-01 原文 →
AI 资讯

Your MCP servers can read your SSH keys. Anthropic just fixed that.

Every MCP server you run locally executes with your full filesystem and network permissions. That means the GitHub MCP server, the Slack one, that third-party tool you installed from npm last week — all of them can read your SSH keys, .env files, and credential stores by default. Anthropic just open-sourced the fix: sandbox-runtime , the sandboxing layer they built for Claude Code. One-line wrap, no Docker, OS-level enforcement. What actually changed srt (the Sandbox Runtime CLI) enforces filesystem and network restrictions on any process using native OS primitives: macOS : Uses sandbox-exec with dynamically generated Seatbelt profiles Linux : Uses bubblewrap for containerization + network namespace isolation Network filtering : HTTP/HTTPS traffic routes through an HTTP proxy; other TCP goes through SOCKS5 — both enforce your domain allowlists Install it: npm install -g @anthropic-ai/sandbox-runtime Wrap an MCP server in your .mcp.json — change command from npx to srt , move the rest to args : { "mcpServers" : { "filesystem" : { "command" : "srt" , "args" : [ "npx" , "-y" , "@modelcontextprotocol/server-filesystem" ] } } } Then configure what the process is actually allowed to touch in ~/.srt-settings.json : { "filesystem" : { "denyRead" : [ "~/.ssh" ], "allowWrite" : [ "." ], "denyWrite" : [ "~/sensitive-folder" ] }, "network" : { "allowedDomains" : [ "api.github.com" , "*.npmjs.org" ] } } The result: the MCP server can work in your project directory, talk to the domains it needs, and nothing else. Why this matters The threat model is real. An MCP server running compromised code — or simply a server with more ambient access than it needs — can exfiltrate your SSH keys, read your .env files, or phone home to arbitrary hosts. This isn't theoretical; it's the same class of supply-chain risk that exists for any untrusted npm package, except MCP servers are typically long-running processes with broad system access. srt is designed secure-by-default : processes start wit

2026-06-01 原文 →
AI 资讯

Novelty by AI ที่มา Disproved Erdős Planar Unit Distance Problem

AI จะครองโลก เป็นคำที่ได้ยินมานาน เท่าที่ผู้เขียนจำความได้ก็มี Judgement Day ยุคหนัง Terminator แต่หากจะจริงจังขนาดโยงเข้าความเป็นจริงก็ยังไม่มีอะไรชัดเจน แต่วันนี้เรามีหลักฐานพิสูจน์ได้จริงแล้ว ด้วยความ Novelty จาก OpenAI ที่สามารถค้นพบความรู้ใหม่ที่ไม่เคยมีมนุษย์ค้นพบมาก่อน หักล้างความเชื่อที่ว่า AI ทำได้เพียงนำสิ่งที่มนุษย์ค้นพบแล้วมาเรียงต่อกัน ในเดือนพฤษภาคม 2026 reasoning model ภายในของ OpenAI ได้ disprove Erdős Planar Unit Distance Problem ซึ่งเป็นปัญหาและข้อคาดการณ์ทาง Combinatorial geometry ที่ Paul Erdős ตั้งไว้ตั้งแต่ปี 1946 โจทย์ระบุว่า เมื่อวางจุด nn n จุดบนระนาบ จำนวนของคู่จุดที่ห่างกันพอดี 1 หน่วยจะมีได้มากที่สุดเท่าใด Erdős แสดงความเป็นไปได้ผ่านการจัดเรียงแบบ grid ว่าได้จำนวนคู่ที่เติบโตเหนือเส้นตรงเพียงเล็กน้อย และตั้งข้อคาดการณ์ว่าไม่มีโครงสร้างใดทำได้ดีกว่านี้อย่างมีนัยสำคัญ ข้อคาดการณ์นี้ได้รับการยอมรับในวงกว้างตลอด 80 ปีที่ผ่านมา และยังไม่มีข้อคาดการณ์ที่ดีกว่านี้ จนกระทั่ง OpenAI ได้เผยแพร่ Chain of Thought (CoT) เรียบเรียงความยาว 125 หน้า ซึ่งบันทึกลำดับการให้เหตุผลของโมเดลไว้ทั้งกระบวนการว่าโมเดลไปถึงคำตอบอย่างไร กรอบของคำตอบ: lower bound กับ upper bound ก่อนเข้ากระบวนการทำงานของโมเดล ขออธิบาย "กรอบ" ของคำตอบของปัญหานี้ก่อน เพราะคำตอบถูกล้อมไว้ด้วย lower bound จำนวนที่สร้างได้จริงแล้ว อย่างน้อยเท่านี้ และ upper bound เพดานที่พิสูจน์แล้วว่าเกินไม่ได้ ด้าน lower bound นั้น Erdős เอง (1946) ใช้การจัดเรียงแบบ grid แสดงว่าสร้างได้ถึง n1+Ω(1/log⁡log⁡n)n^{1+\Omega(1/\log\log n)} n 1 + Ω ( 1/ l o g l o g n ) ซึ่งมากกว่าเส้นตรงเพียงเล็กน้อย และเข้าใกล้ศูนย์เมื่อ nn n ใหญ่ขึ้น ส่วนด้าน upper bound นั้น Erdős พิสูจน์เพดานแรกไว้ที่ O(n3/2)O(n^{3/2}) O ( n 3/2 ) จากวงกลมหนึ่งหน่วยสองวงตัดกันได้ไม่เกินสองจุด โดยต่อมา Spencer–Szemerédi–Trotter (1984) บีบเพดานนี้ลงมาเป็น O(n4/3)O(n^{4/3}) O ( n 4/3 ) ซึ่งเป็น upper bound ที่ดีที่สุดจนถึงปัจจุบัน และยังคงอยู่หลังการค้นพบของ OpenAI model วิธีเก่าของ Erdős: วงกลมรัศมีเลือกมาลากผ่านจุด grid หลายจุดพร้อมกัน ทำให้ระยะซ้ำมีมาก สิ่งที่ Erdős คาดการณ์คือ คำตอบจริงของ Planar Unit Distance Problem ควรอยู่ชิดด้าน lower

2026-06-01 原文 →
AI 资讯

Feeble Little Horse leans into digital weirdness on bitknot

From the opening moments of bitknot, it's obvious that Feeble Little Horse has found an entirely new gear. Where on Girl with Fish the blown-out textures were more '90s indie rock and shoegaze, on their latest LP, there's a more modern edge to the distortion and the riffs cut cleaner. Similarly, where the digital glitchiness […]

2026-06-01 原文 →
AI 资讯

Token Budgeting

Token Budgeting: Optimizing Generative AI Costs and Performance Modern generative AI applications offer unprecedented capabilities, yet their operational costs can quickly escalate. The primary driver of these costs, alongside computational resources, is token consumption . Understanding and implementing effective token budgeting strategies is not merely an optimization; it is fundamental to building scalable, efficient, and economically viable AI systems. The Economics of Tokens Tokens are the atomic units of text that large language models (LLMs) process. Whether you're sending a prompt (input tokens) or receiving a response (output tokens), each token incurs a cost. This cost varies by model, but the principle remains: more tokens mean higher expenses and often, increased latency due to longer processing times. Efficient token management directly impacts your application's bottom line and user experience. Strategic Pillars of Token Efficiency Optimizing token usage requires a multi-faceted approach, focusing on both input and output, as well as the underlying model choices. 1. Input Optimization: Crafting Smarter Prompts The most direct way to save tokens is to be judicious with the information sent to the model. Every word in your prompt counts. Concise Prompt Engineering : Avoid verbose instructions or unnecessary conversational filler. Get straight to the point. Instead of: "Hey AI, I was wondering if you could please help me summarize this really long article I have here. It's about quantum computing. Could you make it brief, maybe just a few sentences?" Opt for: "Summarize the following article about quantum computing in three sentences: [Article Text]" This significantly reduces input tokens without sacrificing clarity. Context Window Management : LLMs have a finite context window , the maximum number of tokens they can process at once. Sending an entire document when only a specific section is relevant is wasteful. Employ techniques like: Summarization : P

2026-05-31 原文 →
AI 资讯

A .NET Dinosaur in Web3. Day 18 - Automated Market Maker

🏦 Day 6 of 7: Building a Mini Uniswap in 80 Lines of Solidity Imagine a vending machine. It has 1,000 coffee beans and 1,000 coins. No menu, no cashier — just one iron rule: the product of the two numbers inside must never decrease. That's it! This is how Uniswap works — and this is what I built on Day 6, coming from .NET. Here's how, why it's elegant, and where you can step on a rake. Why an Order Book Doesn't Work on a Blockchain Traditional exchanges — Binance, NYSE, any CEX — run on an order book . Market makers post bids and asks. A matching engine pairs them. Millions of updates per second, all in a centralised database. In a blockchain, this is impossible. Transactions take 12 seconds. Every state change costs gas. Storing millions of constantly changing orders would eat all the profit before a single trade completes. Uniswap's solution: replace the order book with a liquidity pool — a smart contract holding two tokens — and replace the matching engine with pure math. Just a formula — below. x · y = k — The Formula That Broke Finance The Constant Product Invariant : x · y = k Where x is the reserve of Token0, y is the reserve of Token1, and k is a constant that must never decrease during swaps. When a trader sells Token0 into the pool, x increases. To keep k constant, y must decrease — the contract sends out Token1. The price is determined automatically by the ratio of reserves. Live example with numbers: Pool: 1,000 Token0, 1,000 Token1. k = 1,000,000. Trader sells 100 Token0: amountOut = (reserveOut × amountIn) / (reserveIn + amountIn) amountOut = (1000 × 100) / (1000 + 100) amountOut = 100,000 / 1,100 amountOut ≈ 90.9 Token1 The trader gets ~90.9, not 100. That gap is slippage — and it's not a bug. It's the formula protecting the pool. The more you buy relative to pool size, the worse your price gets. Naturally. Mathematically. After the swap: pool has 1,100 Token0 and ~909.1 Token1. k ≈ 1,000,000. Invariant holds. The Contract: SimpleAMM Three functions.

2026-05-31 原文 →
AI 资讯

From Specs to Tickets: Automating Jira Setup with Node.js and the Jira API

The plan was simple Take the specs we'd written, turn them into Jira epics, stories and subtasks, and start sprinting. It took longer than expected. Here's what actually happened — and what I learned. Why automate Jira setup at all? HandyFEM has 8 epics, 37 stories and ~160 subtasks. Creating that manually would take a full day and be error-prone. More importantly: the specs were already written in a structured format. Translating structured data into Jira issues is exactly the kind of repetitive task that should be automated. So I wrote a Node.js script to do it via the Jira REST API. Problem 1 — Jira Spaces ≠ Jira Classic My account uses Jira Spaces — Atlassian's newer interface. The classic Jira has CSV import built in. Jira Spaces doesn't. This isn't documented anywhere obviously. You discover it by looking for the import option and not finding it. Lesson: always check which version of Jira you have before planning your workflow. The API still works, but some endpoints behave differently. Problem 2 — The API token wasn't the issue (until it was) First attempt: connection error. I assumed it was the token. It wasn't — it was an expired token from a previous session. Regenerating it fixed the connection. The real lesson: curl -u email:token https://your-domain.atlassian.net/rest/api/3/myself is the fastest way to verify auth before running any script. Problem 3 — customfield_10014 doesn't exist in team-managed projects In classic Jira, linking a story to an epic uses a field called customfield_10014 (Epic Link). In team-managed projects (Jira Spaces), this field doesn't exist. You use parent instead. The error was clear once I saw it: "customfield_10014" : "Field cannot be set. It is not on the appropriate screen, or unknown." Fix: remove customfield_10014 , keep only parent: { id: epicId } . Problem 4 — Board search doesn't work for team-managed projects The Agile API endpoint /rest/agile/1.0/board?projectKeyOrId=HFM returns empty for team-managed projects, even

2026-05-31 原文 →
AI 资讯

Notes on Federated Learning and Differential Privacy

Notes on Federated Learning and Differential Privacy 2026-05-31 · privacy-preserving ML Working notes on building federated learning (FL) from scratch, what actually breaks under Non-IID data, and how differential privacy (DP) and secure aggregation fit on top — including the honest negative results that the marketing slides leave out. They follow the implementation in federated-learning-lab (FedAvg / FedProx / SCAFFOLD, DP-SGD, secure aggregation; 33/33 tests, literature cross-validated). 1. What federated learning actually is The data never moves. Instead of pooling everyone's data on one server, each client trains locally and sends model updates to a server that aggregates them. The canonical loop ( FedAvg ) is: Server broadcasts the global model. Each client does a few local SGD epochs on its own data. Each client sends back its updated weights. Server averages the weights (weighted by client data size) → new global model. That's it. The elegance is that raw data stays on-device; the difficulty is that the clients' data distributions are not identical. 2. The Non-IID problem (where FedAvg starts to hurt) FedAvg implicitly assumes every client sees roughly the same distribution. Real clients don't — one hospital sees different cases than another, one phone's keyboard sees different language. Under Non-IID data, each client's local optimum pulls in a different direction, so averaging their updates produces client drift : the global model lands somewhere none of them wanted. Two well-known fixes, both implemented and measured in the lab: FedProx — add a proximal term that penalises drifting too far from the global model. Stabilises training when clients are heterogeneous. SCAFFOLD — track control variates (correction terms) that estimate and subtract the drift direction. More state to communicate, but corrects the bias FedProx only damps. The honest finding worth repeating: on a strongly Non-IID split (e.g. label-skewed MNIST), the fancy methods don't always beat p

2026-05-31 原文 →
AI 资讯

0% vs 50%: Making a RAG Agent Refuse to Hallucinate

0 % vs 50 %: making a RAG agent refuse to hallucinate 2026-05-31 · LLM / RAG A retrieval-augmented agent is only as trustworthy as its behaviour on questions whose answer isn't in the corpus . The failure mode is quiet: instead of saying "I don't know," the model invents a confident, well-formed, wrong answer. This post shows a single guardrail that takes that from common to never — and, crucially, measures it. Reference architecture: nim-agent-blueprint — agentic RAG on the NVIDIA NIM stack with a built-in eval harness. The ablation The agent loop is plan → retrieve → generate → validate . The interesting variable is the generation prompt's contract with the retrieved context: Configuration Out-of-corpus hallucination rate Generate freely from context ~50 % Guarded prompt (answer only from context; otherwise abstain) 0 % Same model, same retriever, same questions. The only change is a prompt that makes "I can't answer that from the provided sources" a first-class, rewarded output — plus a validate step that checks the answer is grounded in retrieved spans before returning it. On in-corpus questions, retrieval recall@3 stayed at 94–100 % , so the guardrail buys safety without costing coverage. Why "just prompt better" isn't the lesson The lesson isn't the prompt — it's that the difference between 50 % and 0 % is invisible without an eval harness . A demo that only asks in-corpus questions looks perfect in both configurations. You only see the 50 % when you deliberately ask things the corpus can't answer and score groundedness . So the blueprint ships with: retrieval hit-rate (is the answer even retrievable?), answer groundedness via LLM-as-judge (is the answer supported by what was retrieved?), latency , and OpenTelemetry traces per agent step. That's the difference between "it works on my five questions" and "here is the number a partner can hold me to." Takeaway For enterprise RAG, abstention is a feature, not a failure. Make "I don't know" a rewarded output, vali

2026-05-31 原文 →
AI 资讯

Moving Beyond the Context Window: The Agentic Memory Architecture

I’ve spent a lot of time lately thinking about why some LLM agents feel "intelligent" while others just feel like chatbots with a slightly better prompt. It almost always comes down to how the system handles memory. When we treat the context window as the only place for state, we hit a ceiling very quickly. To build an actual agent, we have to move away from "one big prompt" and toward a layered memory architecture. Agentic Memory can be categorized in 4 layers by their function: Working Memory: The current context window. It's our RAM—fast, essential, but wiped clean after every session. Semantic Memory: The Vector DB or knowledge base. This is where the "world rules" and global conventions live. It’s the reference manual the agent checks to stay aligned. Procedural Memory: The "how-to" layer. Instead of stuffing every tool description into the prompt, the agent maintains a lean index of skills and pulls in the full implementation only when a specific task triggers it. This keeps the context window clean. Episodic Memory: This is the hardest part. It's the ability to distill a past interaction into a reusable insight. The real engineering challenge here isn't storage—it's the "forgetting" logic. Deciding what is noise and what is a core pattern is where most frameworks still struggle. Depending on the use case, the architecture changes: Reflex Agents: Just Working Memory. Support Agents: Working + Procedural. Coding Agents: The full stack. The gap between a demo and a production-ready agent is usually the distance between simple RAG and a functioning episodic memory. The ability to compress experience into a usable state is still a significant hurdle. Which of these layers are you currently implementing, and how are you handling the "forgetting" logic in your episodic memory?

2026-05-31 原文 →
AI 资讯

Progressive Distillation

Now that almost everyone has thought about or is actively integrating AI workflows into their projects, some might ask is this all worth the cost? Many think the current economics of the AI space don't scale and that there will be upward price movement. Others still might not be comfortable with sending their data to remote services for processing. Then there is the crowd that wants to deploy models in small spaces with limited compute. Are there ways we can deploy small models locally and run at a lower cost? Yes with Knowledge Distillation . Knowledge distillation can get a bad rap due to it's questionable use in training some Large Language Models (LLMs). But it's a perfectly valid way to transfer performance from a larger model to a smaller one. Especially when both models are yours and/or open. This article will explore progressive distillation which is a technique to incrementally transfer knowledge from a series of larger teacher models into a smaller student. Install dependencies Install txtai and all dependencies. pip install txtai [ pipeline - train ] datasets Setup the Training Pipeline The first step we need to do is setup up the training pipeline. We'll use the Hugging Face Training framework to build a series of models. The following code establishes a train method, test method and loads the classification training data. from datasets import load_dataset from transformers import AutoModelForSequenceClassification , AutoTokenizer from txtai.pipeline import HFTrainer , Labels def train ( teacher , student , distillation , ** kwargs ): trainer = HFTrainer () model = AutoModelForSequenceClassification . from_pretrained ( student , trust_remote_code = True ) tokenizer = AutoTokenizer . from_pretrained ( student , trust_remote_code = True ) return trainer ( ( model , tokenizer ), ds [ " train " ], columns = ( " sentence " , " label " ), maxlength = maxlength , teacher = teacher , distillation = distillation , ** kwargs ) def test ( model ): labels = Labels (

2026-05-31 原文 →
AI 资讯

# Agentic AI: Architecture of Autonomous Systems

"A language model that answers questions is a tool. A language model that decides which questions to ask and then acts on the answers is something else entirely." Introduction: When Models Started Deciding For the first several years of modern NLP, the task was always the same: given input, produce output. One forward pass. One completion. Done. In 2022, a paper from Google Brain asked a different question. What if, instead of producing an answer directly, a model could reason about what information it needs, act to retrieve it, and revise its thinking based on what it found? The paper was ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al., 2022). Applying it to an LLM created something qualitatively different: a model that could take real-world actions and adapt its reasoning based on what came back. A completion model is a calculator. An agent is a process: it has a goal, takes steps toward it, and updates when things go wrong. This week I went deep on the architecture behind these systems, the frameworks that define them, and what the open problems look like from a research perspective. Part 1: What Makes a System "Agentic"? The word "agent" gets used loosely in current literature. A clean definition comes from Russell and Norvig's Artificial Intelligence: A Modern Approach : An agent is anything that perceives its environment through sensors and acts upon that environment through actuators. For an LLM-based system, this is a loop: perceive an observation, reason about what to do, act via a tool call or output, observe the result, and loop again. But not every loop qualifies as agentic. Three properties distinguish genuinely agentic systems from tool-augmented chatbots: Property What It Means Goal persistence Maintains the original goal across multiple steps without re-prompting Adaptive planning Revises its approach based on intermediate results Tool autonomy Decides when and which tools to use, not just how to use one it was told to call Mos

2026-05-31 原文 →