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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

15136
篇文章

共 15136 篇 · 第 496/757 页

Dev.to

I Moved Everything to a $4.50 Hetzner Box. Here's What Broke and What Didn't.

Last year my side project was running on AWS. A t3.small EC2 instance, an RDS PostgreSQL db.t3.micro, an S3 bucket, and a CloudFront distribution. Total bill: $47/month for an app with 200 daily users. Then someone on Reddit told me to look at Hetzner. I now run the same stack on a single CAX21 (4 vCPU ARM, 8GB RAM, 80GB SSD) for €5.49/month. Here's exactly what happened. The Migration What I was running on AWS: Node.js API (Express) PostgreSQL database Redis for sessions Nginx reverse proxy Static files on S3 + CloudFront What I moved to Hetzner: Same Node.js API PostgreSQL installed directly on the server Redis installed directly on the server Nginx + Certbot for SSL Static files served by Nginx Total migration time: one Saturday afternoon. The hardest part was setting up automated backups (solved with a cron job + Hetzner's snapshot API). What Broke Nothing critical, but: No managed database failover. On RDS, if the database crashes, AWS restarts it automatically. On Hetzner, if PostgreSQL crashes at 3 AM, I'm the one fixing it. In 8 months, this has happened zero times. But it could. No CDN by default. My static assets now serve from a single Hetzner datacenter in Germany. For my EU-heavy userbase, this is actually faster than CloudFront. For US users, it's about 50ms slower. I added Cloudflare (free tier) in front and the problem disappeared. Deployment changed. No more eb deploy or push-to-deploy. I wrote a 12-line bash script that SSHs in, pulls from git, runs migrations, and restarts PM2. Takes 8 seconds. Honestly prefer it — I know exactly what's happening. The Cost Comparison at Every Scale This is what surprised me most. The gap isn't just at my small scale — it gets wider as you grow: SpecAWSDigitalOceanVultrHetzner2 vCPU, 4GB$30/mo$24/mo$24/mo€4.50/mo4 vCPU, 8GB$61/mo$48/mo$48/mo€8.50/mo8 vCPU, 16GB$122/mo$96/mo$96/mo€16/mo Hetzner is roughly 5-7x cheaper than AWS at every tier. DigitalOcean and Vultr sit in the middle. 👉 Calculate your exact costs When

Muhammed ali Ceylan 2026-06-16 23:55 👁 11 查看原文 →
Dev.to

From Invoice to Owner: A Practitioner's Guide to Request-Level AI Cost Attribution

TL;DR Provider invoices aggregate by model and billing period. They cannot tell you which team, product, or agent caused a cost spike. Request-level AI cost attribution links every API call to structured owner metadata (team, product, environment, trace ID) so investigations take minutes, not days. Three approaches exist: provider dashboard, gateway log enrichment, and application trace attribution. They differ sharply in setup cost and query granularity. Gateway log enrichment is the highest-leverage first step for most teams. It requires no changes to application code and covers all traffic behind the gateway. Real example: a platform team at a 60-person AI company discovered that 31% of their $18k/month spend came from a misconfigured retry loop in a background job, identified in under 20 minutes once request-level logs were searchable. Why Your Invoice Is Lying to You Your OpenAI invoice for last month shows $22,400. Your Anthropic invoice shows $6,800. Total: $29,200. Your CFO wants to know which business unit owns each line. You forward the invoices to your finance partner, who forwards them to three engineering managers, who reply with estimates that sum to $24,000 and do not match any real allocation. This is the standard state of LLM spend governance at companies between $5k and $50k per month in AI API costs. The invoices arrive, the spend is real, and attribution is a spreadsheet exercise done with guesses. The problem is structural. Provider billing aggregates by model and by billing period. It has no concept of your internal ownership model, your product boundaries, your tenant hierarchy, or your agent topology. A single gpt-4o line in your invoice might represent spend from a customer-facing chat feature, an internal summarization service, a nightly batch job, and three developers running experiments against production endpoints. You get one number. You have four or more owners. Request-level AI cost attribution is the practice of enriching every API c

Void Stitch 2026-06-16 23:54 👁 13 查看原文 →
Dev.to

The Reference Check Questions Nobody Asks AI Vendors

I have done this process wrong more times than I would like to admit. You call the references the vendor sends you. Three customers, all happy, all articulate, all saying roughly the same things. You hang up feeling good. You sign. Six months later you are dealing with a support team that responds every 72 hours and a renewal quote that is 40% higher than year one. The reference check told you nothing useful. Not because the customers lied. Because you asked the wrong questions. Here is what I ask now. "How many people at the vendor have you spoken to in the last six months?" One contact who handles everything and is sometimes slow — that tells you something. A team of people across sales, technical support, and leadership — that tells you something different. Enterprise AI vendors with thin account teams show their limitations at exactly the moment you need them most: when something breaks at the worst possible time. "Tell me about the last time something broke in production." Not IF something broke. Something always breaks. I want to know what happened next. Did the vendor show up? Did they communicate clearly while the issue was live? Did they follow up after closing the ticket, or did they close it and disappear? The answer to this question tells me more about a vendor than any product demo. "What do you know now that you wish you had known before signing?" This question works because it is framed as advice, not criticism. Reference customers who would never say "this product has problems" will happily answer this one honestly. Listen for anything about pricing surprises, scope limitations that only appeared after deployment, or feature gaps the sales team glossed over. "When you renewed, did you evaluate alternatives?" Renewal is the honest signal. A customer who renewed without looking elsewhere is genuinely satisfied. A customer who looked at three other options and came back is someone who chose this vendor over real competition. A customer who is approachin

Sumas Keller 2026-06-16 23:53 👁 11 查看原文 →
Dev.to

Mid-Conversation System Prompts: Steering an Agent Without Breaking the Cache

Here is a problem I hit building a long-running agent: I needed to inject a new instruction partway through a session ("the project is Go, write Go") but editing the top-level system prompt to add it invalidated my entire prompt cache. Every cached turn got reprocessed at full price. The fix is a feature that landed in the current Claude models: mid-conversation system messages. Here is what it is and when to use it. The setup that breaks A long agent session has a large, stable system prompt and a growing message history, and you cache the prefix so each turn reuses the prior work cheaply. That works until you learn something mid-session that the agent needs to know: a mode toggled, the user delivered async context, files changed on disk, the token budget dropped. The naive move is to edit the system prompt to include the new fact. But the system prompt sits at the front of the cached prefix. Change one byte there and you invalidate everything after it. Your whole conversation history reprocesses at full input price on the next request. For a long session, that is expensive and slow. The fix: a system message in the messages array The current models let you put a system -role message directly in the messages array, after the history, instead of editing the top-level system : const response = await client . messages . create ( { model : " claude-opus-4-8 " , max_tokens : 16000 , system : [ { type : " text " , text : STABLE_SYSTEM , cache_control : { type : " ephemeral " } }, ], messages : [ ... history , // cached prefix, untouched { role : " user " , content : latestUserMessage }, // @ts-expect-error: role:"system" SDK types may still be landing { role : " system " , content : " This project is Go. Write all code in Go. " }, ], }, { headers : { " anthropic-beta " : " mid-conversation-system-2026-04-07 " } }, ); Because the new instruction sits after the cached history, it invalidates nothing before it. The cached prefix stays intact, you pay full price only for the

Pavel Espitia 2026-06-16 23:46 👁 7 查看原文 →
Dev.to

I built an Aadhaar QR reader that works 100% offline — no server, no data leak

Every time I handed my Aadhaar card to someone for KYC, one thought kept nagging me: Where is this data actually going? Most "digital Aadhaar verification" tools out there silently upload your card details to their servers. You have zero visibility into what gets logged, stored, or sold. For something as sensitive as a national biometric ID, that's a pretty terrible default. So I built AadhaarQRCodeReader — a web app that scans the Secure QR on any Aadhaar card, decodes all the identity details, and does the entire thing inside your browser . No backend. No API calls. No data leaves your device. Ever. PtPrashantTripathi / AadhaarQRCodeReader 🇮🇳 Offline Aadhaar QR Reader — scan or upload any Aadhaar card, no server, no data leak. 🇮🇳 Aadhaar QR Code Reader Scan the Secure QR on any Aadhaar card to instantly verify identity details — 100 % offline, no server, no data leaves your device. ✨ Features Feature Details 📷 Live camera scan Uses the rear camera on mobile, front on desktop 🖼️ Image upload Pick any photo containing an Aadhaar QR from your gallery 🔒 100 % offline All decoding happens in the browser — zero network requests 🪪 Full card details Name, DOB, gender, address, mobile last-4, email (if present), issue date 🃏 3D card flip Front (personal) ↔ Back (address) card flip animation 🔗 Shareable URL Result is encoded in ?data= so links can be bookmarked 📱 Mobile-first Works on iOS Safari, Android Chrome, and desktop browsers 📸 Screenshots Scanner Verified Result (Front) Verified Result (Back) Point camera at any Aadhaar QR Personal details on the front face Address & reference date on … View on GitHub 🤔 Wait, what even is the Aadhaar Secure QR? UIDAI added a Secure QR Code to modern Aadhaar cards (and letters) — it's that big QR, not the small one. It's essentially a compressed, binary-encoded snapshot of your Aadhaar record containing: Name, DOB, gender Full address (house no., street, locality, district, state, PIN) Last 4 digits of your linked mobile Email (if yo

Pt. Prashant tripathi 2026-06-16 23:45 👁 7 查看原文 →
HackerNews

Show HN: BlitzGraph – Supabase for graphs, built for LLM agents

Hello HN After becoming allergic to SQL, I opened 120+ issues in Dgraph, Typedb and surrealdb looking for the perfect graphDB. None of them was built for agents nor were they the perfect fit for what we wanted to achieve: fully ditching the SQL legacy to properly model reality. So we decided to build BlitzGraph In BlitzGraph, records (units) can belong to multiple types (kinds) and evolve through time. Also polymorphic relations are first class and multiple kinds can play the same role. This des

lveillard 2026-06-16 23:41 👁 3 查看原文 →
Dev.to

Skills.sh Is the npm Moment for AI Agents (And Most Developers Haven't Noticed)

I started building AI agents about two years ago. Not toy demos, actual production features inside a health-tech product. And every single project started the same way. Write the tool-calling wrapper. Handle the edge cases in structured output. Figure out how the agent should read a PDF without hallucinating page numbers. Build the retry logic. Wire up the logging. Same boilerplate. Every time. From scratch. The frustrating part is that every developer building agents is doing this too. Quietly. In their own repo. And nobody shares it. That is the real infrastructure problem in the agent space right now. Not the model. The model is fine. The problem is everything in between the model and a working agent. Skills.sh is trying to solve that. And after spending time with it, I think it has a real shot. What is the "agent infrastructure gap"? When npm launched, developers were already writing JavaScript. The language was not the bottleneck. The bottleneck was that every team was reinventing the same utilities and then never sharing them. npm gave the ecosystem a way to publish, discover, and install reusable logic. Agent development is in that same phase right now. The LLMs are capable enough. Claude, GPT-4, Gemini, they can all do the work. But the procedural knowledge layer, the "how to actually do this specific thing correctly," lives inside private codebases, personal notes, and Slack messages. How do you reliably parse a multi-page PDF inside an agent? How do you get consistent structured output from a chain of tool calls? How do you write a SKILL.md that actually teaches the agent something useful instead of being ignored? Everyone figures this out on their own. Nobody publishes it in a way other agents can consume. What Skills.sh actually is Skills.sh is an open ecosystem from Vercel for discovering, installing, and sharing reusable capabilities for AI agents. A skill is a SKILL.md file. It is a markdown document with a small YAML frontmatter block at the top: ---

Majid Allahverdi 2026-06-16 23:40 👁 4 查看原文 →
Dev.to

Fast Automatic ML Hyperparameter tuning Using Optuna (w. MLflow model registry and IRIS DB)

This article presents a straightforward approach to automatically and efficiently tune hyperparameters for machine learning models using Optuna as the optimisation framework. We explore how to use both Optuna’s native storage options and InterSystems IRIS as a database backend to track the progress of hyperparameter searches. We also show how MLflow can be used to monitor experiments and manage models through its tracking and model registry UI. This article is based on this Kaggle Notebook , which you can run and directly edit yourself. When training ML models, the choice of hyperparameters can strongly influence performance. They are not the only factor, but they can significantly affect both convergence and generalisation. Tuning hyperparameters manually takes a lot of effort. This is especially true because hyperparameters interact with each other, so tuning them independently is usually not enough. For example, higher regularisation may require a lower learning rate for more stable optimization. A more complex model may require stronger regularization to avoid overfitting, but at the same time, a very small learning rate on a complex model can make learning too slow. Optuna is an MIT-licensed open source library, which allows commercial use, that automates hyperparameter search for ML models developed with the most popular frameworks such as scikit-learn, PyTorch, TensorFlow, and LightGBM. It works by defining a search space and an objective metric to either minimize or maximize. Optuna then explores the search space efficiently to find well-performing configurations. Here we use Optuna to tune a LightGBM model on a dummy dataset and show how to scale the search using shared database storage. We will also use MLflow for experiment tracking and model registry, and IRIS DB as a possible Optuna storage backend for concurrent studies. We will use the California Housing dataset, commonly used in ML examples, to populate IRIS tables and run the tuning workflow. Note:

InterSystems Developer 2026-06-16 23:37 👁 12 查看原文 →
Dev.to

Building an Instagram-powered app without managing scraping infrastructure

When I started building , I needed reliable access to Instagram data. Like many developers, my first instinct was to use a self-hosted solution such as instagrapi. It worked for experimenting, but once I started depending on it for production workflows, I spent more time maintaining the scraper than building features. Eventually I switched to HikerAPI, a hosted REST API for Instagram. This post isn't about saying one approach is universally better—it's about why it ended up being the better fit for my project. My use case I needed to fetch Instagram profile data for . The requirements were fairly simple: Look up public profiles Process structured JSON Integrate the results into my backend Avoid spending time maintaining login sessions I wasn't interested in reverse engineering Instagram every time something changed. Getting started One thing I liked was that it behaves like a normal REST API. Authentication is done through an x-access-key header, so integrating it into an existing Python backend took only a few minutes. import requests headers = {"x-access-key": "YOUR_KEY"} r = requests.get( " https://api.hikerapi.com/v2/user/by/username?username=instagram ", headers=headers, ) print(r.json()) That's enough to start requesting data and integrating it into your own application. If you want to explore the API, you can find it at HikerAPI. Why I moved away from self-hosted scraping I originally tried , including instagrapi. There wasn't a single issue that made me switch—it was the accumulation of small operational problems: Login sessions expiring Accounts getting challenged Temporary bans Instagram changing internal behavior Regular maintenance after updates None of those problems are impossible to solve. The question became whether solving them was the best use of my time. For my project, the answer was no. I'd rather focus on shipping features than maintaining scraping infrastructure. Tradeoffs Using a hosted API isn't free. Pricing starts at $0.001 per request, wi

Fun With Python 2026-06-16 23:37 👁 11 查看原文 →
Dev.to

Comparable vs Comparator in Java

In Java, sorting is an important operation when working with collections such as ArrayList, LinkedList, and other data structures. For primitive data types, Java already knows how to sort values. However, for custom objects like Student, Employee, or Product, Java needs instructions on how objects should be compared. To achieve this, Java provides two interfaces: Comparable – Used for natural sorting. Comparator – Used for custom sorting. Comparable Interface Comparable is an interface available in the java.lang package. It is used to define the natural ordering of objects. The sorting logic is written inside the class itself using the compareTo() method. Method int compareTo(T obj) Return Values Negative - Current object comes before the given object Zero - Both objects are equal Positive - Current object comes after the given object When to Use Comparable? Use Comparable when: A class has one default sorting order. The sorting logic is a natural property of the object. The sorting criteria rarely change. Comparator Interface Comparator is an interface available in the java.util package. It is used to define custom sorting logic outside the class. Multiple comparators can be created for the same class. Method int compare(T o1, T o2) Return Values Negative - First object comes before second object Zero - Both objects are equal Positive - First object comes after second object When to Use Comparator? Use Comparator when: Multiple sorting criteria are required. You don't want to modify the original class. Different sorting orders are needed at different times.

Harini 2026-06-16 23:36 👁 9 查看原文 →
Dev.to

Working With AI: What Actually Works For Me

I think a lot of people still imagine AI coding as opening ChatGPT, asking for code, and copy-pasting the result. That's not really how I work anymore. The biggest shift for me is that planning matters far more than coding. Earlier, execution was expensive, so most of the effort went into writing code. Now execution is cheap. I can have an agent implement something in minutes. The hard part is making sure the plan is correct. Most of my effort goes into thinking through the architecture, edge cases, failure modes, test strategy, and how the change fits into the broader system. If the plan is vague, the agent will confidently implement the wrong thing. The quality of the result is mostly determined by the quality of the plan. Once I have a plan, I break it into small independent pieces. Each piece should be executable without additional clarification. If an agent needs to stop and ask questions, the task probably isn't broken down enough. Those pieces become tickets. Then an agent picks up a ticket and implements it. The important thing is that the agent isn't operating in a vacuum. I try to give it a good environment to work in: Clear architectural rules Reusable skills and workflows Guardrails Hooks for things that must always happen One lesson that really stuck with me is that instructions are guidance, not guarantees. At one point I had "always use a git worktree" written in AGENTS.md. The model still ignored it occasionally. When I dug into it, the answer was simple: models can drift from instructions. So if something absolutely must happen, don't rely on instructions. Enforce it. Put it in a hook, script, validation step, CI check, or some other deterministic mechanism. If it is important, make it impossible to skip. Once the implementation is done, the agent opens a PR. This is where another useful pattern comes in: don't let the same model review the code it wrote. I usually have one model implement and another model review. Different models catch different t

Mitesh Sharma 2026-06-16 23:36 👁 9 查看原文 →
Dev.to

Discovering PII Inside InterSystems IRIS

Data privacy regulations such as GDPR, LGPD, and HIPAA demand that organizations know exactly where Personally Identifiable Information (PII) lives inside their databases. Yet in practice, most teams rely on manual inventories, tribal knowledge, or external scanning tools that require data to leave the database engine — a process that itself creates privacy and security risks. This article presents an MVP that takes a different approach: it runs PII detection inside InterSystems IRIS using Embedded Python, analyzing data where it lives and never exporting it to an external process. The result is a lightweight, non-intrusive utility that scans your tables, identifies PII using AI, and produces a structured CSV report — all without data ever leaving the IRIS process. The Problem: PII You Don't Know You Have Organizations today face a painful blind spot. A typical IRIS instance may contain hundreds of tables across dozens of schemas, some holding decades of accumulated data. Columns named ContactInfo , Notes , or Description might silently contain social security numbers, email addresses, or government IDs — sometimes intentionally, sometimes as a side effect of free-text fields that capture whatever users type in. Traditional approaches to PII discovery share a common flaw: they require data extraction. You export samples, send them to an external service, or pipe them through a standalone tool. Every step in that pipeline is an additional attack surface and a potential compliance violation. The principle of data sovereignty — keeping data within its jurisdiction and under controlled access — suggests a better path: bring the analysis to the data, not the data to the analysis. This is not just a technical preference; it is a governance requirement: GDPR (EU) — Article 28 requires that any processing of personal data by a third-party processor be governed by a binding contract covering subject-matter, duration, purpose, data types, and obligations [ Art. 28 GDPR ]. Art

InterSystems Developer 2026-06-16 23:34 👁 10 查看原文 →
The Verge AI

We now know how DJI’s dual camera Osmo Pocket 4P compares to Insta360’s

After a brief debut at the Cannes film festival last month, DJI announced all the details of its Osmo Pocket 4P stabilized camera today as part of its initial launch in China. While it doesn't match the 8K capabilities of the Insta360 Luna Ultra, the Pocket 4P features a new 1-inch sensor with improved dynamic […]

Andrew Liszewski 2026-06-16 23:25 👁 9 查看原文 →