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

AI 资讯

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

15457
篇文章

共 15457 篇 · 第 568/773 页

Dev.to

How I Ship 10x Faster with Claude Code: The 5-Layer Workflow System

After 8 months of daily Claude Code use, I've distilled my workflow into a 5-layer system. Each layer builds on the previous one. Skip one, and the whole thing falls apart. The Problem with Most Claude Code Users Most people use Claude Code like ChatGPT — open terminal, ask a question, close, repeat. The next day, they explain their project from scratch. Again. The symptom: 20% of every session is wasted on context re-establishment. The root cause: No project memory, no workflow discipline. Here's the system that fixed it for me. Layer 1: CLAUDE.md — Your Project's Memory Anchor This is the foundation. Without it, nothing else works. CLAUDE.md is a file at your project root. Claude reads it automatically at the start of every session. It tells Claude: What this project is (one sentence) The tech stack (specific technologies, not "Python web framework") The architecture (the big picture you'd need 3 files to understand) Unique conventions (not generic advice like "write tests") Quality priorities Bad CLAUDE.md (you've probably written this): # My Project A web application built with Python and FastAPI. ## Development - Write clean code - Add unit tests - Use Git This tells Claude nothing it doesn't already know. Good CLAUDE.md: # CLAUDE.md ## Project Overview Internal RAG knowledge base serving 500+ employees. ## Tech Stack FastAPI + LangChain + Milvus + PostgreSQL + Redis ## Commands - Start: `uvicorn app.main:app --reload --port 8080` - Test: `pytest -x --cov=app --cov-report=term-missing` ## Architecture Request flow: router → service → retriever → Milvus → generator → LLM API Key directories: - app/router/ - API layer - app/service/ - Business logic orchestration - app/retriever/ - Retrieval strategies (vector/BM25/hybrid) - app/generator/ - LLM calls and prompt management ## Key Conventions - All APIs return `{"data": ..., "error": null}` - Retrieval results MUST include source field - Milvus collection naming: `{env}_{doc_type}` The rule: Only write what's uniq

马国锦 2026-06-11 11:37 👁 6 查看原文 →
Dev.to

Build Your RAG System Right the First Time: 6 Decisions That Make or Break It

After debugging 20+ broken RAG systems, I've identified the 6 decisions that determine whether yours works. Here's how to get each one right. The RAG Developer's Trap Every RAG developer falls into the same trap: you build the basic pipeline, it sort of works, and then you spend weeks tweaking prompt templates — while the real problem sits untouched in your indexing pipeline. The 80/20 rule: 80% of RAG problems come from indexing, not generation. But 80% of debugging effort goes into generation. Let's fix that. Decision 1: Embedding Model — The Single Biggest Lever The mistake: Using all-MiniLM-L6-v2 for Chinese documents because it's the default in every tutorial. Why it's wrong: It's English-trained. Drop it on Chinese text and it loses 30-50% of semantic fidelity. Language Use This Chinese BAAI/bge-large-zh-v1.5 (1024-dim) Chinese + English BAAI/bge-m3 (multilingual + sparse) English text-embedding-3-large Code jina-embeddings-v3 or voyage-code-3 Non-negotiable: Indexing model and query model must be byte-for-byte identical. Switch models = rebuild entire index. Impact: +15-40% Recall@10 for Chinese RAG. Decision 2: Chunk Size — Not a Magic Number Physics: Too small (< 100 tokens) = semantic fragmentation. Too large (> 1000 tokens) = noise injection. Document Type Sweet Spot Overlap FAQ / Short-form 128-256 20 Technical docs 512 50 Long-form articles 768-1024 100 Code Function boundaries 0 The method matters more than the size. Use recursive splitting, not fixed-length: from langchain.text_splitter import RecursiveCharacterTextSplitter splitter = RecursiveCharacterTextSplitter ( chunk_size = 512 , chunk_overlap = 50 , separators = [ " \n\n " , " \n " , " . " , " " , "" ] ) Impact: +5-15% Recall@10. Decision 3: Index Type — HNSW vs IVF Scale Use Why < 1M vectors HNSW Recall > 0.95 1-5M, RAM tight IVF + PQ 75% memory savings > 5M IVF + PQ + Sharding Horizontal scale Key nuance: HNSW has high insertion cost. Streaming docs → IVF may be better even at small scale. Im

马国锦 2026-06-11 11:36 👁 10 查看原文 →
Dev.to

Set Up Your Own ChatGPT: Ollama + Open WebUI for Data That Never

Set Up Your Own ChatGPT: Ollama + Open WebUI for Data That Never Leaves Home As artificial intelligence models rapidly integrate into our lives, privacy concerns are growing in parallel. Especially for companies or individuals working with sensitive data, sending information to cloud-based services can pose a serious risk. At this point, setting up your own local Large Language Model (LLM) infrastructure offers a great solution. In this guide, I will explain step-by-step how to set up your own chat interface using tools like Ollama and Open WebUI, ensuring your data never leaves your system. This approach allows you to both reduce costs and maximize your data security. This setup is particularly important for those like me, with a background in enterprise software development, who believe that data flows should always follow the most secure path. In the past, working on a production ERP, transferring supply chain data to external systems without anonymization could lead to serious security vulnerabilities. This is where local LLM solutions come into play. Why You Should Set Up Your Own Local LLM While cloud-based LLM services are incredibly convenient, they come with some fundamental drawbacks. Most importantly, every piece of data you input is potentially sent to the service provider's servers. This can be unacceptable, especially when dealing with financial data, patient information, trade secrets, or sensitive code in your personal projects. By setting up your own local LLM, you eliminate these risks. In recent months, while working on my side project, a financial calculator, I felt the need to use an LLM for complex financial analyses. However, the details of these analyses could not be leaked externally. This situation led me to search for a solution where I could keep my data under my own control. Ollama and Open WebUI emerged as the most practical and powerful duo in my search. ℹ️ Data Privacy and Control A local LLM solution gives you full control over where

Mustafa ERBAY 2026-06-11 11:35 👁 8 查看原文 →
Reddit r/artificial

While scrolling though social media I have been observing AI-generated content for the past few months. Here's what I've noticed.

Once you start noticing them, they're everywhere. And the algorithm makes it worse, the more you engage, the more it feeds you... Perfect lighting in every single photo. That glow on the face in every other pic or video it doesn't matter what the background or lighting is. Follows 3 people but has 40k followers. Generic bio that could apply to literally anyone. Comments that are just emojis or "love this!" The creepy part is how consistent the patterns are across platforms. Same pose angles. Same aesthetic. Same engagement ratio that makes no sense for a real person. I built a small community tool where people can flag and vote on suspicious profiles. Not trying to be the judge, just crowdsourcing the pattern recognition. I feel humans are really good at spotting these when you give them the right frame and observation. Anyone else been noticing more of these lately? Curious what other people pick up on this. submitted by /u/Brilliant-Nerve-8972 [link] [留言]

/u/Brilliant-Nerve-8972 2026-06-11 11:33 👁 6 查看原文 →
Dev.to

I automated my Gumroad product screenshots with Playwright

I automated my Gumroad product screenshots with Playwright I recently started packaging a few small frontend projects as digital products, and one surprisingly annoying part was preparing product screenshots. Manual screenshots quickly became messy: different browser sizes inconsistent cropping blurry images mobile screenshots were easy to get wrong Gumroad needed a square thumbnail every update meant taking screenshots again So I built a small local screenshot workflow with Next.js and Playwright. The workflow captures: desktop screenshots mobile screenshots square thumbnail images consistent PNG outputs route status checks basic console error reporting basic horizontal overflow checks The basic command flow is: npm run build npm run start npm run screenshots The script reads a simple config file, opens the configured local routes, captures each screenshot with consistent viewport settings, and exports the images into a predictable folder. For example: screenshots/gumroad/ landing.png dashboard.png template-preview.png mobile-preview.png thumbnail.png I found this especially useful when preparing Gumroad product galleries, because I could regenerate all product images after every UI change instead of taking screenshots manually. This is not a hosted screenshot service. It is just a local source-code workflow for people who want to generate product screenshots from their own Next.js pages. I packaged the workflow as a small Gumroad product here: https://remix410.gumroad.com/l/screenshot-automation-kit Curious how other developers handle product screenshots. Do you take them manually, use Playwright/Puppeteer, or use a design tool workflow?

Hiralasa 2026-06-11 11:32 👁 10 查看原文 →
Dev.to

How to Use Primitive Types in TypeScript: string, number, and boolean

TLDR TypeScript has 7 primitive types: string , number , boolean , null , undefined , bigint , and symbol . You use them to tell TypeScript what kind of value a variable holds. You write them in lowercase. TypeScript can often figure out the type for you. But knowing how each one works is key to writing safe and clear code. What Are Primitive Types? Primitive types are the simplest building blocks in TypeScript. Every piece of data in your program starts with one. They hold a single value. They are not objects. You cannot add methods or properties to them directly. TypeScript has 7 primitive types in total: Type What It Holds string Text like names, messages, or IDs number Any number: integers, decimals, negatives boolean Only true or false null An intentional empty value undefined A value that was never assigned bigint Very large whole numbers symbol A unique identifier value This article covers all 7. You will use string , number , and boolean the most in everyday TypeScript code. How to Use the string Type A string holds text. Use it for names, messages, emails, URLs, and any other text data. Basic string annotation let firstName : string = " Alice " ; let greeting : string = " Hello, world! " ; let empty : string = "" ; Three ways to write strings TypeScript supports the same three string styles as JavaScript: let single : string = ' Single quotes work fine ' ; let double : string = " Double quotes work too " ; let template : string = `Template literals with ${ firstName } ` ; Template literals (backticks) let you insert values inside a string with ${} . TypeScript checks the types of those inserted values too. let age : number = 30 ; let message : string = `I am ${ age } years old` ; // TypeScript checks that 'age' is compatible here What TypeScript catches with strings let name : string = " Alice " ; name = 42 ; // Error: Type 'number' is not assignable to type 'string'. name = true ; // Error: Type 'boolean' is not assignable to type 'string'. Once a variable

Krunal Kanojiya 2026-06-11 11:29 👁 7 查看原文 →
Dev.to

I Processed 2.4 Billion Tokens Across 52 AI Models for $0.52. Here's the Full Breakdown.

I run a production multi-agent AI system on a single M1 Mac in Jamaica. 6 autonomous agents. 26 cron workflows. 5-layer persistent memory. All containerized, all running 24/7. I checked my OpenRouter dashboard last week and realized something: I'd processed 2.4 billion tokens across 52 different AI models and spent a total of $0.52 . That's not a typo. Here's exactly where that money went and what it means. The Numbers Metric Value Total Requests 26,600+ Tokens Processed 2.4 Billion Models Used 52 Total Cost $0.52 Cost per Token $0.00000021 Tokens per Dollar 4.6 Million For context: GPT-4 Turbo costs about $0.00001 per token at scale. I'm running at roughly 50x below that rate. Where the $0.52 Actually Went Here's the breakdown by model: Model Requests Tokens Cost openrouter/owl-alpha 1,334 251.2M $0.00 nvidia/nemotron-3-super-120b 32 1.8M $0.00 google/gemma-4-31b-it 47 1.8M $0.00 openai/gpt-5 1 2.8K $0.03 google/gemini-3.1-pro-preview 1 3.2K $0.04 anthropic/claude-opus-4 1 2.0K $0.13 qwen/qwen3.5-plus 1 6.3K $0.01 z-ai/glm-5-turbo 1 3.0K $0.01 moonshotai/kimi-k2.5 2 4.1K $0.01 google/gemini-2.5-flash 2 5.5K $0.01 +42 other models ~125 ~8.5M ~$0.28 99.6% of my requests cost exactly $0.00. They ran on free-tier models or local inference. The $0.52 comes from a handful of premium model calls: Claude Opus, GPT-5, Gemini Pro. These are reserved for specific high-quality tasks — not everyday inference. What This Would Cost on Cloud Approach Hardware Monthly Cost Annual Cost My setup (M1 Mac) M1 Mac 16GB, local + free tier ~$0.09 ~$1.04 OpenRouter Paid Tier API-only, no local $15-30 $180-360 AWS (g4dn.xlarge + API) 1x T4 GPU, on-demand $350-500 $4,200-6,000 AWS (g5.xlarge + API) 1x A10G GPU, on-demand $700-1,000 $8,400-12,000 A $1,200 laptop replaces $500-1,000/month in cloud bills. The break-even point is about 2 weeks. How the Architecture Works The key insight: not every task needs a $20/month model . My system routes tasks intelligently: Local inference (free): Ollama

Alex Bogle 2026-06-11 11:22 👁 12 查看原文 →
Reddit r/webdev

Confused about whether to hire a web/app dev for this or use AI

I have an idea for an app but it requires payment to be done by escrow. I have absolutely no idea what I am doing, but I'm 20 so I just want to try a shot at this business Idea. I have build one or two websites with claude before, and it's alright. But when it comes to these issues, especially regarding payments in the thousands, I don't know if I should use AI for it. On the one hand, I don't have the money to hire a dev so I'd have to find investors which is extemely hard to, again, since I don't know what I'm doing, but on the other, I don't want to risk messing it up such that the payment doesn't go through because of a fault and someone who worked for hours wouldn't get the money he deserved and thus I'll be held legally. I could use some advice from those who've had experience in this field. P.S - Please suggest if you have other ideas I can use rather than escrow for payments submitted by /u/PeaceInLoneliness [link] [留言]

/u/PeaceInLoneliness 2026-06-11 11:12 👁 6 查看原文 →
Product Hunt

LYQN AI

AI support that learns your business and hands off to humans Discussion | Link

2026-06-11 11:08 👁 5 查看原文 →
Reddit r/MachineLearning

ICMI 2026 Reviews [D]

Did anyone else submit to ACM ICMI 2026? The reviews were recently released, and this is my first time submitting to ICMI, so I'm not very familiar with the acceptance patterns. I submitted a long paper and received the following overall ratings: 4 (Probably Accept), 3 (Borderline), 4 (Probably Accept) The reviewer with the highest stated expertise recommended acceptance, while the borderline reviewer had some concerns about soundness but still considered it a nice contribution. For those who have submitted to or reviewed for ICMI before, how would you interpret these scores? Is a 4/3/4 generally considered competitive after rebuttal, or is it still a long shot? Would appreciate any insights from past authors or reviewers. submitted by /u/kanishq95 [link] [留言]

/u/kanishq95 2026-06-11 10:54 👁 7 查看原文 →
Reddit r/webdev

Newbie questions

Sorry for my dumb questions and bad English hope this is the right place to post to understand my concerns. I'm a new college student in computer programming but my degree is a just a 2 years studying for introducing courses, I've been studying all types of "Introduction to C++" "Introduction to computers" and those types of courses including the one for web development which caught my attention so much more than the rest and I feel it suits me more especially there is a back/front end and full stack which the person will do while studying, while other courses didn't get my attention, anyways, I've been thinking to study web development full stack by myself online or using books, and do some types of projects to self learn more because school barely cover a little, while looking around I always see that AI will take over this field of IT, and people talking about AI coding apps like "Cursor" which will make all of this really helpless, everytime I check I get different opinions and no real answers, I try to study online on YouTube or Udemy and each creator covers a different types with no clear path of this field, I just want to know if there is a specific way, like a source or a books or anything up-to-date about this field and how I can do it, so I thought this is the only place where I can ask people about it. Sorry for the long post and apologize my English. submitted by /u/Imaginary-Fox-7696 [link] [留言]

/u/Imaginary-Fox-7696 2026-06-11 10:03 👁 5 查看原文 →
Reddit r/webdev

Apple keeps making PWAs harder to install on iOS, and my question about it was dismissed at an Apple Developer Lab

https://preview.redd.it/tj6mb8uzxj6h1.png?width=2336&format=png&auto=webp&s=5576f4c3bcfb905fdc0154b5c45a46316be880dd I asked Apple directly about the current recommended way to guide users through installing a Progressive Web App from Safari on iOS. My question was dismissed. And every other question relating to it was dismissed or hidden after being published. The reason I asked is because the install flow for PWAs on iOS keeps getting harder to explain to normal users. In the latest iOS developer beta, the path appears to be something like: 3 Vertical Lines Share button Scroll down Add to Home Screen There is no obvious install prompt, no clear browser level affordance, and no simple language that maps to what people expect when they hear “install this app.” I understand Apple has its own platform incentives, but this affects real web products. For developers building web-first tools. The frustrating part is not just that the flow is bad. It is that Apple does not seem interested in acknowledging the issue when asked directly. Am I missing something here? How are other web developers handling PWA onboarding on iOS right now? Are you building custom instruction screens? Avoiding PWAs entirely? Sending users to the App Store instead? Or just accepting the drop-off? I attached the screenshot because I think this is worth discussing more publicly. submitted by /u/Jacoby_Broadnax [link] [留言]

/u/Jacoby_Broadnax 2026-06-11 09:04 👁 5 查看原文 →
Dev.to

The Ralph Loop Is Not Enough

"I don't prompt Claude anymore. My job is to write loops." — Boris Cherny, Claude Code creator Though I see where he's coming from, I'd put it differently. A developer's job isn't to write loops. It's to design state machines. Every major agent framework — Claude Code, Codex, Cursor, LangGraph — does the same thing under the hood. A while loop calls an LLM, checks if it wants to use a tool, runs the tool, repeats until done. The loop isn't just a solved problem. It's a boring problem. The hard part is everything around it. A loop has no idea what state the work is in. It just keeps going until something breaks or you run out of tokens. That's the Ralph Loop — named after the Simpsons kid who put a crayon in his nose. Agent, infinite loop, go. The Ralph Loop works, is famous, and has zero memory of where it is in the job. Like Ralph, it keeps going without knowing why. The Fix: A Finite State Machine Think about the NBA Finals. The Spurs and the Knicks aren't improvising — every possession has a state. Fast break. Inbound play. Half court set. Each one has specific reads and triggers for what happens next. Point guard De'Aaron Fox isn't making it up as he goes. The system tells him what situation he's in, and the situation tells him what to do. Your agent works the same way. You define the stages — planning, implementing, reviewing, error handling — and you define what triggers each transition. The agent doesn't orchestrate. It executes. One focused job per state. Why This Matters in Production When agents break, it's almost always one of three things: Infinite loops — one system repeated the same answer 58 times before anyone noticed. Context overflow — the history gets so long the model starts quietly forgetting things. Goal drift — 70 turns in, "don't touch auth" has completely evaporated. State machines fix all three. The loop runs until the list is empty, not until you run out of tokens. The goal lives in the transition logic, not in the context getting squeezed

Lizzie Siegle 2026-06-11 08:48 👁 13 查看原文 →
Dev.to

I built a distributed compute grid where your idle laptop runs ML jobs — the orchestrator behind it

I built a distributed compute grid where your idle laptop runs ML jobs — the orchestrator behind it The pitch: a single FastAPI hub takes compute jobs from ML researchers, and a fleet of home PCs and gaming rigs (RTX 4090s, M2 MacBooks, anything with a GPU and a Python interpreter) polls in, picks up work, and ships results back. A 20% platform fee funds the hub. An interactive dashboard shows the mesh in real time. I have been living inside this codebase for a few weeks. This post is about the part that actually determines whether the thing works or does not — the orchestrator . No frontend, no marketing — just the brain. Live dashboard: man44.zo.space/compute-pool Repo: github.com/AmSach/ComputePool-Grid The problem with "dumb" schedulers The first version of ComputeOrchestrator had a one-line bug that took down a 12-node stress test. Two jobs hit the hub at the same millisecond. Both saw the same node as idle . Both wrote busy to the same row. One node ended up double-allocated, the other starved, and the test logs looked like a hostage negotiation. The fix had to be three things at once: A scoring function that picks the right node, not just the first idle one. An async lock so concurrent submissions cannot race on a single node. A heartbeat monitor that reclaims nodes that ghosted. Here is what it looks like now. The scoring algorithm def _calculate_score ( self , capacity : Dict [ str , Any ], requirements : Dict [ str , Any ]) -> float : """ Heuristic for node-task matching. """ score = 0.0 if capacity . get ( " gpu_vram " , 0 ) >= requirements . get ( " min_vram " , 0 ): score += 10.0 if capacity . get ( " cpu_cores " , 0 ) >= requirements . get ( " min_cores " , 0 ): score += 5.0 return score The weights are deliberately lopsided. A node that satisfies a job's VRAM requirement gets a 2x bonus over a node that just barely has enough cores. The intuition: GPU work is the long pole. If you cannot fit the model in VRAM, nothing else matters, no matter how many

Aman Sachan 2026-06-11 08:40 👁 13 查看原文 →
Dev.to

Go Packages and Modules explained

What is a package? In Go, every Go program is made up of packages. A package is a directory of .go files that share the same package declaration. The primary purpose of packages is to help you isolate and reuse code. myapp/ ├── main.go ← package main └── math/ ├── add.go ← package math └── sub.go ← package math Both add.go and sub.go declare package math. They can call each other's functions directly, no import needed within the same package. Inside a package, every .go file should begin with a package {name} statement which indicates the name of the package that the file is a part of. Every exported identifier (capitalized name) in that directory is accessible to anyone who imports the package. Here's what that looks like in practice: // math/add.go package math // pi is an unexported variable. var pi = 3.14159 // Add returns the sum of two integers. // Exported — starts with a capital letter. func Add ( a , b int ) int { return a + b } // math/sub.go package math // Exported — starts with a capital letter. func Subtract ( a , b int ) int { return a - b } // main.go package main import ( "fmt" "github.com/yourname/myapp/math" ) func main () { fmt . Println ( math . Add ( 3 , 4 )) // 7 fmt . Println ( math . Subtract ( 10 , 3 )) // 7 // fmt.Println(math.pi) — compile error: unexported } Two rules to remember: Capital letter = exported (public). Lowercase = unexported (private to the package). One package per directory. One directory per package. What is a module? If a package is a folder, a module is the whole project, a tree of packages with a name, a Go version requirement, and a list of external dependencies. When you start a Go project, you create a module, and inside that module, there will be packages. Every Go project has exactly one go.mod file at its root. That file defines the module. Here's what a real one looks like: module github . com / yourname / weather - cli go 1.21 require ( github . com / aws / aws - sdk - go - v2 v1 .24.0 github . com / aws / aws

Fer Rios 2026-06-11 08:37 👁 9 查看原文 →