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

AI 资讯

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

15794
篇文章

共 15794 篇 · 第 664/790 页

Reddit r/artificial

What tools can generate output from two inputs independent of the order?

I'd like to perform the typical operation of giving an AI some text to review and asking it to give me feedback, summarize the document, evaluate the content etc. Except, I want to give it two pieces of text, perhaps two sides of a debate, and I don't want the output to depend on the order of the two inputs. My naive idea is to do it both ways in two separate contexts, then feed those results to each other with a request for convergent results, and repeat until they converge. However, this seems like it would be rather slow and expensive. Are there any existing tools that enable this sort of task without extra tooling and iterative attempts at convergence? submitted by /u/sparr [link] [留言]

/u/sparr 2026-06-05 08:43 👁 8 查看原文 →
Dev.to

Web Security: OWASP Top 10 and How to Fix Them (2026)

Web Security: OWASP Top 10 and How to Fix Them (2026) Security isn't a feature you add later — it's built into every layer. Here's how the top 10 vulnerabilities work and how to prevent them. #1 Broken Access Control // ❌ Vulnerable: User can access anyone's data app . get ( ' /api/users/:id ' , ( req , res ) => { const user = await db . users . findById ( req . params . id ); res . json ( user ); // No check if requester owns this data! }); // ✅ Secure: Always verify ownership app . get ( ' /api/users/:id ' , async ( req , res ) => { // Check: Is the logged-in user requesting their OWN data? if ( req . params . id !== req . user . id && req . user . role !== ' admin ' ) { return res . status ( 403 ). json ({ error : ' Access denied ' }); } const user = await db . users . findById ( req . params . id ); res . json ( user ); }); // ✅ Better: Use middleware for all protected routes const requireOwnership = ( resourceType ) => async ( req , res , next ) => { const resource = await db [ resourceType ]. findById ( req . params . id ); if ( ! resource ) return res . status ( 404 ). json ({ error : ' Not found ' }); if ( resource . userId !== req . user . id && req . user . role !== ' admin ' ) { return res . status ( 403 ). json ({ error : ' Access denied ' }); } req . resource = resource ; // Attach for route handler next (); }; app . get ( ' /api/posts/:id ' , auth , requireOwnership ( ' posts ' ), ( req , res ) => { res . json ( req . resource ); }); #2 Cryptographic Failures // ❌ Storing passwords in plain text or weak hashing const password = " password123 " ; db . users . insert ({ email , password }); // NEVER DO THIS! // ✅ Proper password hashing with bcrypt const bcrypt = require ( ' bcrypt ' ); const SALT_ROUNDS = 12 ; // Higher = slower = more secure (12 is good balance) async function hashPassword ( password ) { return bcrypt . hash ( password , SALT_ROUNDS ); } async function comparePassword ( password , hash ) { return bcrypt . compare ( password , hash ); /

Alex Chen 2026-06-05 08:43 👁 8 查看原文 →
Dev.to

Web Security Basics: Every Developer Must Know (2026)

Web Security: OWASP Top 10 and How to Fix Them (2026) Security isn't a feature you add later — it's built into every layer. Here's how the top 10 vulnerabilities work and how to prevent them. #1 Broken Access Control // ❌ Vulnerable: User can access anyone's data app . get ( ' /api/users/:id ' , ( req , res ) => { const user = await db . users . findById ( req . params . id ); res . json ( user ); // No check if requester owns this data! }); // ✅ Secure: Always verify ownership app . get ( ' /api/users/:id ' , async ( req , res ) => { // Check: Is the logged-in user requesting their OWN data? if ( req . params . id !== req . user . id && req . user . role !== ' admin ' ) { return res . status ( 403 ). json ({ error : ' Access denied ' }); } const user = await db . users . findById ( req . params . id ); res . json ( user ); }); // ✅ Better: Use middleware for all protected routes const requireOwnership = ( resourceType ) => async ( req , res , next ) => { const resource = await db [ resourceType ]. findById ( req . params . id ); if ( ! resource ) return res . status ( 404 ). json ({ error : ' Not found ' }); if ( resource . userId !== req . user . id && req . user . role !== ' admin ' ) { return res . status ( 403 ). json ({ error : ' Access denied ' }); } req . resource = resource ; // Attach for route handler next (); }; app . get ( ' /api/posts/:id ' , auth , requireOwnership ( ' posts ' ), ( req , res ) => { res . json ( req . resource ); }); #2 Cryptographic Failures // ❌ Storing passwords in plain text or weak hashing const password = " password123 " ; db . users . insert ({ email , password }); // NEVER DO THIS! // ✅ Proper password hashing with bcrypt const bcrypt = require ( ' bcrypt ' ); const SALT_ROUNDS = 12 ; // Higher = slower = more secure (12 is good balance) async function hashPassword ( password ) { return bcrypt . hash ( password , SALT_ROUNDS ); } async function comparePassword ( password , hash ) { return bcrypt . compare ( password , hash ); /

Alex Chen 2026-06-05 08:42 👁 6 查看原文 →
Dev.to

Amazon S3 Doesn't Hope Hardware Won't Fail. It Assumes It Already Has.

Most engineers build distributed systems hoping nothing breaks. Amazon S3 was engineered under the opposite assumption: that something is already broken, right now, and the system needs to be fine with that. That one mindset shift explains almost everything about how S3 works — and why it's one of the most reliable pieces of infrastructure on the planet. I went through a deep-dive conversation with Mai-Lan Tomsen Bukovec, VP of Data and Analytics at AWS, and extracted the engineering philosophy underneath the product. Not the marketing version. The real one. Here's what actually matters. 1. Hardware failure is not an emergency. It's Tuesday. S3 manages hundreds of exabytes of data across tens of millions of hard drives, spread across 120 Availability Zones in 38 AWS Regions. It currently stores over 500 trillion objects. At that scale, something is always failing. A disk here. A rack there. An availability zone every now and then. The math is unforgiving. So the S3 team made a deliberate architectural decision early: stop treating failure as an exception. Design it into the system as the baseline state. This means dedicated auditor and repair microservices run continuously in the background — not when something goes wrong, but always. They scan the entire fleet, inspect every byte of data, detect discrepancies, and trigger repairs automatically. No human in the loop. No incident ticket. No war room. There's also a specific property they engineer for called crash consistency — the system is designed so that after any fail-stop event, it automatically returns to a valid state without manual intervention. The failure happens. The system continues. Those two things are not in conflict. The system heals itself because it was designed to assume it's already sick. If you're building distributed systems and your failure handling is reactive — you only respond after something breaks — you've already lost. Design the repair loop as a first-class citizen, not an afterthought.

Olawale Afuye 2026-06-05 08:37 👁 12 查看原文 →
HackerNews

Yon – a topos-oriented language with a content-addressed lattice heap

Hello everyone. In the last two years I spent, as a dev, part of my free time stretching the limits of my knowledge. Not being a mathematician myself, I discovered that formalizing concepts in mathematical language could nonetheless be useful to improve symbolic reasoning about the concepts themselves. I made use of both books and AI, and I followed the development of the latter, mainly with a critical eye. I have several open projects, and from some observations and explorations on one of them

amenn 2026-06-05 08:28 👁 3 查看原文 →
Dev.to

BurnCPU's First 100 Users: The Most Expensive Mistake of My Career

The most expensive mistake of my career wasn't a line of code; it was a 'yes'. That 'yes' not only cost me money but also severely damaged my reputation, which I had built over years. This was a turning point I experienced when my personal project, which I proudly worked on and named "BurnCPU," reached its first 100 users. Today, with 20 years of system architecture and operations experience, I can clearly see the decisions I made back then and the lessons I've learned since. This post is not just a technical error analysis; it's also an intention to share a pragmatic decision-making process, trade-offs, and the courageous stance of an expert. My goal is to spark discussion, encourage thought, and perhaps help you avoid similar mistakes. When Did That 'Yes' Come? BurnCPU was initially a tool I developed for my own needs, aimed at optimizing server resources. The goal was to reduce costs by efficiently utilizing idle CPU time. The development process was enjoyable and, over time, exceeded expectations. When the first beta users started giving positive feedback, my excitement was at its peak. And then the moment arrived; an investor, during this period when my project reached its first 100 users, offered financial support for a major scaling and marketing push. The offer was tempting. It presented an opportunity to reach wider audiences, add more features, and perhaps even commercialize the project. The person opposite me was introduced as a recognized and successful name in the industry. Without delving too deeply into the details of the offer, I said "yes." This simple word marked the beginning of the most expensive mistake of my career. ⚠️ A Risky 'Yes' When making this decision, I did not sufficiently analyze the technical maturity of the project or whether my infrastructure could handle such a load. I overlooked the chasm between the marketing power promised by the investor and my technical infrastructure. After the First 100 Users: Unexpected Problems When we re

Mustafa ERBAY 2026-06-05 08:25 👁 15 查看原文 →
Dev.to

What barcode scanning taught me about AI food logging UX

I used to think the best AI food logging flow would be simple: Take a photo, let the model identify the meal, confirm it, done. That works surprisingly well for a lot of meals. But while building MetricSync, I learned the awkward product truth: the best input method changes depending on what is in front of the user. A photo is great for a plate. A barcode is better for packaged food. Text is better when the user already knows what they ate or wants to fix one detail quickly. The mistake is treating one input mode like the whole product. Photos feel magical until the meal gets messy Photo logging is the most impressive demo because it removes the blank search box problem. The user does not need to know the exact database name for “rice bowl with chicken and avocado.” They can just show the app what they ate. But meals are messy. A photo might miss the sauce. It might not know if the drink is diet or regular. It might confuse a small serving with a large one. It might identify the food category correctly but still need a portion correction. That does not make photo logging bad. It just means the UX cannot end at “AI guessed something.” The real product is the correction loop. Can the user fix the meal without starting over? Barcode scanning is boring in the best way Barcode scanning is not as exciting as AI, but it is often the right tool. If someone is logging a protein bar, yogurt, cereal, or a packaged drink, asking an image model to infer the nutrition facts is silly. The barcode is more direct. That changed how I thought about the app. AI should not be the star of every interaction. Sometimes AI should get out of the way. The goal is not “use AI everywhere.” The goal is “make logging the thing in front of me take the least effort.” For packaged foods, that means barcode first. For mixed plates, that means photo first. For quick edits, that means text. Text still matters The more AI features you add, the easier it is to forget text input. But text is still the fas

John 2026-06-05 08:25 👁 9 查看原文 →
Reddit r/artificial

I am now negotiating with AI as part of my job, and it's going like you would expect. How can I circumvent it to speak to a representative?

TLDR - auto lenders are using AI bots to negotiate insurance settlements with inaccurate information. How can I Captain Kirk them and get a live person on the phone? I am an insurance claims adjuster. Recently, several high-interest auto loan lenders have begun using AI (both through email and phone calls) to dispute the total loss values for our claims. For those of you that have never dealt with a total loss - the value of a vehicle is (usually) determined by seeing what comparable vehicles are selling for on the market, and making adjustments based on the condition, mileage, etc. between those vehicles and the totalled vehicle. If a customer disagrees, they can hire an appraiser and the company will hire an independent appraiser, and the two will come to an agreement. The lender gets paid the amount minus the customer's deductible, and if it doesn't fully pay off the loan, unfortunately the customer will be responsible for the balance. Lately, AI calls and emails have been coming from these lenders disputing the amounts, and often based on egregiously incorrect information. They provide cherry picked comparisons to try to boost the vehicle values, and sometimes they aren't the same year, make, or model. Sometimes mileage and condition isn't factored in, sometimes they are tricked-out show cars someone advertised on a FSBO site. The real problem is, we have to waste our time researching all of this to see if any of the data is correct. When we respond pointing out the flawed comparisons, they only come back with more flawed comparisons. If we argue long enough, they will invoke the appraisal clause on the customer's behalf. Their appraiser is another AI system with a cutesy name. All efforts to reach humans at these lenders are essentially turned away - we are told we need to deal with the system. I am open to any advice you folks have - how can we get these AI systems to basically give up and get us in touch with a real person? I'm not trying to screw anyone out

/u/FunyunGrundy 2026-06-05 08:15 👁 6 查看原文 →
Dev.to

Building a Real-Time Chat Feature with Django Channels and React

Building a Real-Time Chat Feature with Django Channels and React Real-time features have become table stakes for modern web applications. Whether it is a customer support widget, a collaborative tool, or a social platform, users expect instant communication without page refreshes. In this article, I will walk through how we built a production-ready real-time chat feature using Django Channels and React at UCDREAMS. Why Django Channels? Django is traditionally synchronous. It handles one request at a time per worker. This works fine for standard HTTP requests, but WebSocket connections require persistent, bidirectional communication. Django Channels extends Django to handle WebSockets, background tasks, and asynchronous protocols alongside traditional HTTP. The beauty of Channels is that it does not replace Django. It layers on top, letting you keep your existing models, ORM, authentication, and admin panel while adding real-time capabilities. For a team already invested in Django, this is a massive advantage over introducing an entirely separate real-time server. Setting Up the Backend Start by installing Django Channels and a channel layer. Redis is the recommended backend for production use: channels == 4.0 . 0 channels - redis == 4.2 . 0 daphne == 4.0 . 0 Configure your Django settings: INSTALLED_APPS = [ ... " channels " , ] ASGI_APPLICATION = " your_project.asgi.application " CHANNEL_LAYERS = { " default " : { " BACKEND " : " channels_redis.core.RedisChannelLayer " , " CONFIG " : { " hosts " : [( " 127.0.0.1 " , 6379 )], }, }, } Building the WebSocket Consumer The consumer handles WebSocket connections: import json from channels.generic.websocket import AsyncWebsocketConsumer class ChatConsumer ( AsyncWebsocketConsumer ): async def connect ( self ): self . room_name = self . scope [ " url_route " ][ " kwargs " ][ " room_name " ] self . room_group_name = f " chat_ { self . room_name } " await self . channel_layer . group_add ( self . room_group_name , self . cha

Uchit Chakma 2026-06-05 08:10 👁 10 查看原文 →
Dev.to

Modern AI Landscape - My Understanding

Lets start our discussion from 2010 . Timeperiod 2010 - 2020 we have predictive AI models such as Recommendation systems , customer segmentation etc .. From 2020 the when the generative models were introduced to the world then the landscape was completely changed . We have this generative era till 2022 . Then industry was stepped into a new era called "Augumentation" models like AI Copilot . This was continued from 2022-2024 . Then came AI Agents—one of the most transformative innovations of the modern AI era. Unlike traditional AI systems that primarily generate responses, agents can reason, plan, use tools, and execute tasks autonomously. Today, the industry is rapidly evolving toward Autonomous Systems, where multiple specialized agents collaborate through orchestration frameworks to solve complex real-world problems. The best AI Timeline : Traditional ML ↓ Deep Learning ↓ Transformers (2017) ↓ Foundation Models ↓ LLMs (GPT Era) ↓ Prompt Engineering ↓ Embeddings ↓ Vector Databases ↓ RAG ↓ Function Calling ↓ AI Agents ↓ Agent Frameworks ↓ Multi-Agent Systems ↓ MCP ↓ Agentic AI ↓ Autonomous AI Organizations Just in the span of 6 years we saw a drastic change in the evolution of AI. Can't imagine how this AI is going to be in the next few years. ai #machinelearning #python

Saranya Madala 2026-06-05 08:08 👁 6 查看原文 →
Dev.to

From Blood Tests to Meal Plans: Building a Self-Correcting Health Agent with LangGraph

Ever felt like your fitness app is just a fancy spreadsheet? You log a high uric acid result from your latest blood test, yet it still suggests a high-protein steak dinner for "gains." In the world of AI Agents , we are moving past static prompts. Today, we’re building a Self-Correcting Health Agent using LangGraph , LangChain , and OpenAI . This agent doesn't just chat; it monitors laboratory biomarkers like cholesterol and uric acid, maintains a long-term memory via SQLite , and dynamically rewrites your lifestyle plan using advanced OpenAI Function Calling . If you've been looking to master autonomous health agents and complex state management, you're in the right place. Let's dive into the future of personalized wellness. The Architecture: State-Driven Personalization Unlike a standard linear chain, a health agent needs to "loop" and "reason." If the agent detects an abnormal lab value, it must trigger a specific logic branch to revise existing plans. Here is how the data flows through our LangGraph system: graph TD A[User Input/Lab Report] --> B{Analyze Biomarkers} B -- Abnormal Found --> C[Tool: Plan Rewriter] B -- All Normal --> D[Tool: Maintenance Plan] C --> E[Update SQLite Memory] D --> E[Update SQLite Memory] E --> F[Output Final Recommendation] F --> G[Wait for Next Input] G -- New Data --> B Prerequisites To follow along, you'll need: LangGraph & LangChain : For orchestration. OpenAI API : For the reasoning engine (GPT-4o recommended). SQLite : To handle persistent state and "memory" of your health journey. Step 1: Defining the Agent State In LangGraph, the State is the source of truth. We need to track the user's current health metrics and their active diet plan. from typing import Annotated , TypedDict , List from langgraph.graph import StateGraph , END import operator class HealthState ( TypedDict ): # We use operator.add to keep a history of logs logs : Annotated [ List [ str ], operator . add ] biomarkers : dict current_diet_plan : str revision_req

Beck_Moulton 2026-06-05 08:08 👁 7 查看原文 →
Dev.to

AWS Types of Databases: The Complete 2026 Guide for Developers

If you’re building a generative AI chatbot, global e-commerce platform, or industrial IoT solution in 2026, picking the wrong database can sink performance, blow your budget, or delay your launch. For years, teams relied on one-size-fits-all relational databases for every workload, but modern applications demand specialized tools for specific use cases. AWS solves this challenge with 15+ purpose-built database engines across 8 distinct categories, optimized for performance, scalability, and cost efficiency for every imaginable workload. This guide breaks down every AWS database type, its core features, real-world use cases, and 2026 best practices to help you choose the right tool for your next project. Table of Contents Why Purpose-Built Databases Are the Standard in 2026 AWS Database Categories: A Deep Dive 2.1 Relational Databases 2.2 Key-Value Databases 2.3 In-Memory Databases 2.4 Document Databases 2.5 Graph Databases 2.6 Wide Column Databases 2.7 Time-Series Databases 2.8 Data Warehouse 2026 AWS Database Best Practices Common Mistakes to Avoid When Choosing AWS Databases Conclusion References Why Purpose-Built Databases Are the Standard in 2026 Modern workloads have vastly different requirements: a generative AI RAG system needs fast vector search, an IoT fleet needs high-throughput time-series data ingestion, and a global SaaS platform needs multi-region consistency with zero downtime. A single relational database cannot meet all these needs without tradeoffs. AWS purpose-built databases eliminate these tradeoffs by: Supporting open standard APIs to avoid vendor lock-in Offering serverless deployment options for all major engines Including built-in AI/ML and vector search capabilities Delivering up to 99.999% availability for mission-critical workloads Reducing TCO by 25-48% compared to self-managed or generic alternatives (per IDC) AWS Database Categories: A Deep Dive Relational Databases Relational databases store data in structured tables with fixed schema

Andrew 2026-06-05 08:07 👁 7 查看原文 →
Dev.to

The problem with my memory and why I stopped trusting myself to remember things

I work on a computer all day. Multiple projects, lots of switching, constant interruptions. A while back I noticed I was losing track of my own work. Not really the big things but mostly the small stuff. The decision I made on Tuesday about why I structured something a certain way. The thing I was halfway through when a Slack message pulled me away. The task that never made it onto any list because it felt too small to write down (but I ended up forgetting about after lunch until 2 days later). By Friday I'd look back at the week and genuinely struggle to piece together everything I actually did. I tried obsidian (and still actively use it). I also tried just being more disciplined. None of it fully stuck because the friction of capturing things manually meant I only ever captured the stuff I already remembered. The messy ad-hoc stuff that actually eats a lot of my time never made it anywhere. I'm curious if other people deal with this. Not the big project management stuff because that's mostly solved, but rather, the stuff in between. The context that lives in your head and disappears the moment you get interrupted. How do you handle it?

Toluwa Jibodu 2026-06-05 08:05 👁 16 查看原文 →
Dev.to

Build Your Own MCP Server from Scratch

Every AI agent ships with the same bottleneck: it can only reason over what it can reach. MCP servers dissolve that boundary. They expose tools, resources, and prompts to any compliant client over a JSON-RPC wire format so lean you can implement it in an afternoon. Yet most developers grab a framework, copy a template, and ship something they can barely debug. Forge starts differently. You will build an MCP server from the bare protocol up, understand every byte on the wire, and gain the mental model that makes every future server trivial. The Idea (60 Seconds) MCP is a JSON-RPC 2.0 protocol. A client sends a request. Your server returns a response. Three request types power the core loop: initialize , handshake. Client and server exchange capabilities. tools/list , discovery. Server returns every tool it offers, each with a JSON Schema describing its inputs. tools/call , execution. Client names a tool and passes arguments. Server runs the handler and returns structured content. Transport is either stdio (JSON-RPC over stdin/stdout) or HTTP (Streamable HTTP). Stdio is the simplest place to start: read a line from stdin, parse it, dispatch, write a line to stdout. That is the entire architecture. Everything else is error handling, schema validation, and ergonomics. Why This Matters MCP servers are the new APIs. Where REST gave machines endpoints, MCP gives agents tools with typed inputs and structured outputs. Every integration layer from IDE assistants to autonomous workflows converges on this protocol. The standard is young. The primitives are stable. The surface area is small enough to hold in your head all at once. Knowing the wire format gives you three advantages frameworks obscure: Debugging , when a tool call fails, you can read the raw JSON-RPC message and pinpoint the fault in seconds. Portability , any language, any runtime, any transport. Write a server in Bash if you want. The protocol is the contract. Evolution , MCP will add capabilities. Understanding

Michal Szalinski 2026-06-05 08:04 👁 9 查看原文 →
Reddit r/webdev

How would you handle 80+ color palettes + granular customization without overwhelming users?

I've been working on a map poster editor as a side project. You pick a location, choose a style and color palette, and export a print-quality map. The tricky part is that each palette controls 15+ individual colors (road hierarchy from motorway down to service roads, water, terrain, buildings, text, etc.) and there are 80+ palettes organized into three categories. Current flow in screenshots: Full editor, style controls in the left sidebar Entry point with active palette preview + Browse and Fine Tune buttons Category picker (Terrain / Urban / Balanced), these are basically folders describing what the palette emphasizes Palette grid within a category, around 10 per category with swatch thumbnails Fine Tune panel with every individual hex color, grouped by section (Base, Roads, Water & Land, Buildings, Terrain) The tension is that casual users want "pick a palette, done" in one or two clicks. But power users want to tweak individual road colors or swap the water tone. Right now these are two completely separate flows and I'm not sure either one is great. Things bugging me: Two-click drill-down (category then palette) before anything changes. Is that necessary organization or just unnecessary friction? Fine Tune is hidden behind a button. People who find it love it, but is it too buried? 15+ hex inputs grouped by label. It works but feels intimidating. Are there better patterns for this? The preview problem. Right now palettes show diagonal color swatches, which are compact but pretty abstract. A mini-map preview showing each palette applied would be way more useful, but then I'd basically be replacing a clean card grid with a wall of tiny maps that are probably too small to actually read. Would a hover preview work? A single shared preview pane that updates as you browse? Or are swatches actually fine and I'm just overthinking this? If you landed on this editor cold and wanted to change the color scheme, what would you expect to see? What would you change? React + Ma

/u/kkingsbe 2026-06-05 08:02 👁 6 查看原文 →
Reddit r/webdev

Best & Cheap way to track trending TikToks, Reels, and Shorts?

Does anyone know a cheaper way to track trending TikToks, Instagram Reels, and YouTube Shorts? I’ve already looked at Apify and Virlo, but they seem too expensive for what I need right now. I’m mainly trying to find viral formats, hashtags, sounds, creators, and short-form trends without spending a lot on scraping tools. Are there any cheaper tools, APIs, open-source projects, or manual/automated workflows people recommend? submitted by /u/InternalGrab3189 [link] [留言]

/u/InternalGrab3189 2026-06-05 07:59 👁 6 查看原文 →
HackerNews

Ask HN: What was your "oh shit" moment with GenAI?

Most of us were amused when DALL-E and its peers went mainstream, and we were quick to point out the obvious flaws. Then ChatGPT hit the scene and again, many of us dismissed it as a parlor trick that would never amount to much. Using LLMs for coding initially was a only small step up from basic code completion, and a welcome farewell to Stack Overflow. I am curious: what was the specific moment that you went from those quaint, dismissive observations to a slightly panicked, "Uh Oh" realization

andrehacker 2026-06-05 07:42 👁 3 查看原文 →