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

标签:#EV

找到 3031 篇相关文章

AI 资讯

How We Translate 300-Page Books Using Claude Without Hitting Token Limits

Breaking long documents into overlapping chunks, preserving context, and reassembling with FastAPI At LectuLibre, we’ve built an AI‑powered platform that translates entire books—EPUBs and PDFs—using large language models. When we first hooked up Claude’s API, we naively fed it a 300‑page PDF in one request. It failed immediately. Claude 3 Opus has a 200K token window, but a 300‑page book can easily run to 300K tokens or more. Even if we squeezed it in, the output would be truncated and the quality would degrade at the extremes of the context window. So we faced a classic long‑document problem: how do you translate a book that’s larger than the model’s context window? Here’s the real approach we ended up with, the code we wrote, and the lessons we learned. The Problem: Token Limits Are Real Claude 3 Opus and Haiku models (and most LLMs) have a maximum context length—200,000 tokens for Opus. A token is roughly ¾ of a word. A 300‑page novel with ~75,000 words translates to about 100K tokens, so it should fit, right? But translations from English to Spanish can expand by 15–20%, and the prompt instructions, system message, and the user message itself all eat into that budget. Plus, we needed to send the entire source text in every call to give the model full context. That’s not feasible. We could have tried a simple split: cut the book at arbitrary page boundaries and translate piecemeal. That fails spectacularly. Narrative breaks mid‑sentence, and phrases like “the previous chapter” lose their referents. We needed a more intelligent chunking strategy. Our Approach: Sliding Window with Overlapping Paragraphs We settled on a sliding window chunking algorithm based on paragraphs, with a generous overlap. Here’s the idea: Split the source text into paragraphs (using \n\n ). Build chunks of max_chunk_tokens (we used 180,000 to keep a safety margin), adding paragraphs one by one and counting tokens with tiktoken . When the chunk exceeds the limit, we start a new chunk but we

2026-07-01 原文 →
AI 资讯

Stop re-flagging the same finding — without going silent

A reviewer that flags the same known issue on every run trains you to ignore it. The fix can't be "hide findings," because a tool that silently drops things is worse than one that nags. CommitBrief has two ways to accept a finding and move on — a per-developer baseline and an in-source suppression marker — and both are built so that what they remove is always counted, never quietly swallowed. The interesting part is how a finding keeps its identity when the code around it moves. TL;DR Baseline ( .commitbrief/baseline.json , gitignored): accept the current findings once; later runs drop anything whose fingerprint is already in the file. Inline suppression : a commitbrief-ignore: <reason> comment on or above a line removes that finding — and lives in committed source, so a reviewer sees it. A finding's fingerprint deliberately excludes its line number , so accepting it survives the code drifting up and down the file. Both are TRUE removals — they affect --fail-on and the JSON findings[] , not just the display — and both print what they removed. The limit. The baseline is per-developer, not a shared team policy; it quiets your runs, not CI's. The fingerprint that survives code drift The whole design rests on one question: when is a finding "the same finding" you already accepted? If the answer included the line number, a baseline would evaporate the moment you added an import above the issue. So it doesn't. A finding's identity is three fields, hashed: func normalizeTitle ( title string ) string { return strings . ToLower ( strings . Join ( strings . Fields ( title ), " " )) } func Fingerprint ( f render . Finding ) string { h := sha256 . New () h . Write ([] byte ( f . File )) h . Write ([] byte { 0 }) h . Write ([] byte ( f . Severity )) h . Write ([] byte { 0 }) h . Write ([] byte ( normalizeTitle ( f . Title ))) return hex . EncodeToString ( h . Sum ( nil )) } File, severity, and a normalized title — and nothing else. Line is out, so the same issue keeps its finger

2026-07-01 原文 →
开发者

One Year

A year ago today, I started at Approov. A hundred days in, I wrote about the transition: leaving management, the refreshing day-to-day feedback loop, the strange experience of relearning a craft I thought I'd lost. I stand by most of it. But a hundred days is enough to notice a change; it takes a year to understand it. So here is what a year taught me that a hundred days couldn't. The rust that mattered At a hundred days I called myself rusty. I was. I reached for patterns that no longer fit and looked up syntax I once knew by heart. I expected that to be the hard part. It wasn't. The rust came off faster than I feared, and somewhere along the way I realised I'd been worried about the wrong thing entirely. The agentic era arrived in earnest this year, and it quietly rewrote the job description. The premium skill is no longer how fast you can produce code from memory. It's whether you can write a precise specification and make a strong architectural decision, then judge honestly whether what comes back is any good. Those are not new skills for me. They are the exact skills that years of reviewing architecture and mentoring engineers had been sharpening the whole time. The craft I sat down to relearn was not the craft that turned out to matter. I spent years assuming management had pulled me away from engineering. It hadn't. It had been quietly preparing me for the version of engineering that was coming. Charity Majors has a name for the shape of this: the engineer/manager pendulum. The idea that a healthy career swings between the two, rather than treating management as a one-way door you walk through once and never come back. I didn't choose when mine swung back. But it swung the right way, and the years spent on the other side weren't lost. They were compounding. A secure transaction is a secure transaction The work itself has been a homecoming of a different kind. I spent years in payments. Now I work in mobile and API security. On paper those are different worlds

2026-07-01 原文 →
AI 资讯

Além da IA: Por que a colaboração humana é o verdadeiro motor do Open Source

A narrativa atual da tecnologia está fortemente inclinada para a automação. Com agentes de IA escrevendo boilerplate , gerando componentes e até estruturando projetos inteiros, é fácil olhar para o futuro do desenvolvimento de software e assumir que o elemento humano está diminuindo. Mas se você mantém ou contribui ativamente para um projeto open source , sabe que a realidade é bem diferente. A IA pode escrever código, mas não consegue validá-lo contextualmente contra décadas de edge cases obscuros. Ela não sabe dizer por que uma regra de negócio específica falha em produção. Mais importante ainda: a IA não constrói comunidade. A evolução de um software robusto ainda depende inteiramente de pessoas colaborando, quebrando código, reportando bugs e validando se o código realmente funciona no mundo real. Para ver isso na prática, precisamos olhar para projetos que tentam fechar lacunas geracionais gigantescas na tecnologia. Um exemplo perfeito disso é o AxonASP . A Filosofia do AxonASP: Modernizando o Legado Por muito tempo, o ASP Clássico e o VBScript foram considerados presos a um modelo de servidor obsoleto — amarrados ao IIS e deixados para trás pelas práticas modernas de deploy . O AxonASP muda esse cenário. É um runtime open source e cross-platform que trata o ASP Clássico como uma Aplicação moderna, em vez de uma relíquia do passado. Ele traz o VBScript, o ASP e, principalmente, o suporte ao JavaScript Síncrono para o futuro. Construir um runtime que lida com código legado enquanto opera em um ecossistema moderno e multiplataforma não é algo que você consegue simplesmente pedindo para um LLM. Exige um ciclo de feedback agressivo. O AxonASP está em franca evolução e apresenta altíssima compatibilidade com o ASP Clássico. Mas essa compatibilidade não é mágica — ela é o resultado direto de usuários pegando seus scripts legados de 15 a 20 anos atrás, rodando no motor, vendo onde falham e reportando exatamente o que aconteceu. Cada issue aberta e cada bug reportado p

2026-07-01 原文 →
AI 资讯

🦩OS June Recap: Reviewing PRs was my biggest milestone

June was not about making the most contributions -- it was about becoming a better collaborator. This month I had: ✅ 1 PR merged 🔄 1 PR still open 👀 3 PR reviews completed 🐞 1 issue opened I am making this graph all green... Biggest Learning The biggest milestone wasn't writing code. It was reviewing pull requests. One review led the author to update their PR based on my feedback. That experience taught me that open source isn't just about contributing code; it's also about helping improve someone else's work through discussion and constructive feedback. Working Alongside AI Reviewers I also had an interesting experience interacting with automated reviewers like Vercel Bot and Copilot. Rather than accepting every suggestion, I tested them, evaluated the trade-offs, and explained why I chose a different approach. It was a good reminder that AI can assist reviews, but engineering judgement still matters. Looking Ahead My biggest challenge is still finding a larger project that I can consistently contribute to over the long term. That's my main goal for July, alongside publishing my OSS Contribution Toolkit repo and making my CaaS project usable for others. Small, consistent steps continue to move the journey forward. What was your biggest open source learning in June? Transparency Note: I used AI as an editor—not as the author. For this article, it helped refine the structure and improve the English grammar. The technical content, experiments, opinions, and conclusions are my own and were reviewed by me before publishing.

2026-07-01 原文 →
开发者

Building Editorial Control Into a 3 Platform Content Engine

3 platforms, one queue, zero editorial control. That was the state of my content automation before I sat down to spec the dashboard. LinkedIn, X, and Threads each had their own generator, their own state files, their own publishing loop. Drafts got generated, passed a quality gate, and fired into the void. If the draft was mediocre or the timing was wrong, I found out after the fact. The problem is not the automation. Automation is why I can run three platform engines without spending two hours a day managing content. The problem is that zero editorial visibility means you cannot catch the bad ones before they post. What I wanted: see every draft before it goes out. Edit inline if needed. Post immediately or schedule for the next slot. Compose something manually when I have a specific take to push. Keep the comment automation untouched because that runs high frequency, low stakes, and babysitting individual replies defeats the point. The spec came out to three core flows. Review queue. Every pregenerated draft surfaces here with full context: platform, topic, generation timestamp, quality score. One click to edit inline, one to approve for the next slot, one to post immediately. The goal is a 30 second review per draft, not a full editing session. Manual compose. Sometimes I know exactly what I want to say. A text area, platform selector, and post button. No generation, no queue, just publish. This is the escape hatch for when something is happening in real time and the pregenerated queue is irrelevant. Schedule view. A simple calendar showing what is queued for which slot across all three platforms. The generator already handles slot logic and quiet hours. The dashboard just needs to surface the state so I can see gaps and move things around without touching JSON files directly. What I deliberately left out: comment automation. That pipeline runs separately, fires frequently, and does not benefit from human review on every reply. Adding it to the dashboard would cr

2026-07-01 原文 →
AI 资讯

Privacy by design: what it is and how to apply it

"Privacy by design" is one of those phrases you read everywhere and rarely understand. It is often treated as a document to attach to a project, a box to tick before going live. In reality it is not a piece of paperwork: it is the way software is conceived and built from the very first line, so that it protects people's data without anyone having to remember to do so afterwards. What the GDPR actually says The principle is written plainly in Article 25 of the GDPR, which speaks of "data protection by design and by default". These are two distinct things. Protection by design concerns the choices made while the system is being built. Protection by default concerns how the system behaves the moment it is switched on, before anyone touches a single setting. The law does not mandate a specific technology. It asks for an outcome: that data protection be built into the system, proportionate to the risks, and not bolted on afterwards as a patch. It is a difference of substance, not of form. A well-designed system does not have to chase compliance: it already has it inside. It is not a document, it is an architecture The most common mistake is to reduce privacy by design to a file. A report is written, filed, and the building goes on exactly as before. But a PDF protects no data. What protects data are the technical decisions: what information is collected, where it is stored, who can see it, how long it stays, what happens when it is no longer needed. These decisions are made at design time, and changing them later costs far more than getting them right at the start. The principles, turned into concrete choices Privacy by design becomes useful only when it stops being a slogan and turns into a series of choices. Translated into practice, the principles sound like this. Minimisation. You collect only the data genuinely needed to deliver the service. A field you do not collect does not need protecting, cannot be lost in a breach, does not need keeping. The safest piece of da

2026-07-01 原文 →
AI 资讯

Predict Churn Before Customers Leave

Subtitle: Build a Python app with Telnyx AI Inference that turns customer activity signals into churn risk, recommended actions, and retention next steps. Most customer churn is only surprising because the signals were scattered. Usage dropped in one place. Support tickets went up somewhere else. A renewal date got closer. A login did not happen for two weeks. Payment issues started showing up. None of those signals alone proves a customer is leaving, but together they usually tell a story. That is the workflow I wanted to make easier to build: take customer activity data, pass it through an inference model, and return a structured churn assessment that a product or customer success team can actually use. The example is here: https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-customer-churn-predictor-python It is a small Flask app using Telnyx AI Inference through the chat-completions API. The App Shape The app exposes a few routes: POST /predict for one customer POST /predict/batch for up to 20 customers GET /predictions for recent in-memory predictions GET /health for app health The current default model is set in .env.example : AI_MODEL=moonshotai/Kimi-K2.6 Under the hood, the app calls: POST https://api.telnyx.com/v2/ai/chat/completions The prompt asks the model to behave like a customer success analyst and return JSON only. That is the important part. This is not a chatbot. It is an application endpoint that produces structured output. What Goes In A request can look like this: curl -X POST http://localhost:5000/predict \ -H "Content-Type: application/json" \ -d '{ "customer_id": "CUST-123", "call_volumes": [120, 105, 80, 55], "message_volumes": [450, 420, 300, 190], "support_tickets": 6, "account_age_months": 18, "renewal_days": 21, "last_login_days": 14, "payment_issues": 1 }' Those fields are deliberately simple. The point is to show the pattern, not to pretend this is a full enterprise churn model. The model gets the trend data, support contex

2026-07-01 原文 →
AI 资讯

Inside AI Engineer World's Fair 2026: What 6,000 Engineers Showed Up to Build

A conference sold out three separate ticket tiers before the doors even opened. Not "almost sold out." Sold out — Leadership track, gone. Workshops, gone. Late bird tickets, gone. The organizers stopped counting around 6,000 attendees and said they'd officially call it once they crossed 7,000. That's the AI Engineer World's Fair in 2026, and if you've spent any time building with LLMs over the last three years, you already know the name even if you've never been able to get a ticket. I want to walk you through what's actually happening on the ground this week at Moscone West in San Francisco — not the marketing copy, but the track list, the speaker lineup, and the quiet signals buried in the schedule that tell you where AI engineering is actually heading next. Table of Contents What is AI Engineer World's Fair? Why It Matters What Makes It Different Key Technologies AI Agents LLM Engineering MCP RAG Fine-tuning AI Infrastructure Workshops Networking Startups Enterprise AI Major Takeaways Future of AI Engineering Final Thoughts What is AI Engineer World's Fair? AI Engineer World's Fair is the flagship conference run by AI Engineer, the company behind a whole circuit of events — the AI Engineer Summit, Code Summit, and standalone editions in London, New York, Paris, Miami, Singapore, Shanghai, and Melbourne. The World's Fair is the biggest of them all: a four-day event with 29 tracks, 300 speakers, 100 expo partners, and more than 6,000 AI engineers, founders, and VPs of AI in attendance. The 2026 edition runs from Monday June 29 through Thursday July 2, with a Sunday evening orientation night tacked on for first-timers. It's held at Moscone West, 747 Howard Street, in San Francisco. This is the fourth year the event has anchored in San Francisco, and the organizers have leaned into that — discounted hotel blocks at the Marriott Marquis, Parc 55, and InterContinental, all walking distance from the venue. The person behind all of it is Shawn "swyx" Wang. He's the cofou

2026-07-01 原文 →
AI 资讯

My landing page passed every CI check and was still broken on my customer's phone

A customer texted me a screenshot last month. It was my own landing page, open on their Pixel. The headline — "Financial infrastructure to grow your revenue" — was clipped at "...grow your reven". The signup button below it was gray-on-slightly-lighter-gray, basically unreadable. And the hero image? A broken-image icon. Here's the part that stung: every check I had was green. Lighthouse: 98. My Playwright tests: passing. CI: all checkmarks. I had shipped that page an hour earlier feeling good about it. None of my tooling caught any of it. I want to walk through why , because I think a lot of us have this blind spot, and then I'll tell you what I did about it. CI tests the DOM. It does not test what a human sees. This is the core issue. My tests asserted things like "the signup button exists" and "the form has an email input." All true. The button was in the DOM . It just rendered unreadable on a 412px-wide screen with the system in light mode. Lighthouse runs one viewport (usually a throttled Moto G4 emulation) and scores performance/SEO/a11y heuristically . It does not look at your page across the actual range of devices your visitors use and say "this headline is physically clipped on a Pixel 8." And my "responsive testing"? I was dragging the Chrome devtools responsive bar to two breakpoints — 375 and 1440 — eyeballing it, and moving on. That's not testing. That's hoping. The three bugs that slipped through Let me get specific, because the category of each bug is instructive. 1. The clipped headline — a measurable, deterministic bug .hero-title { white-space : nowrap ; /* the culprit */ width : 100% ; overflow : hidden ; } On desktop, the headline fit. On a narrow viewport, white-space: nowrap refused to wrap, overflow: hidden clipped the overflow, and the last word vanished. The brutal thing: this is trivially detectable in code . The element's scrollWidth was greater than its clientWidth . That's a one-line check: const clipped = el . scrollWidth > el . clientW

2026-07-01 原文 →
开发者

The Terraform Awakens: Infrastructure as Code Quest

The Quest Begins (The "Why") Honestly, I was tired of playing “guess the state” every time I spun up a new environment. One day I clicked “Apply” in the AWS console, watched a handful of EC2 instances, S3 buckets, and IAM roles appear, and then realized I had no idea how to recreate that exact setup six months later when the team needed a staging copy. It felt like trying to rebuild the Death Star from memory after a single glance at the blueprints—frustrating, error‑prone, and definitely not the heroic saga I signed up for. That moment was my “aha!”: I needed a repeatable, version‑controlled way to describe infrastructure. Enter Infrastructure as Code (IaC). I’d heard the buzz, but the real question was which tool to wield—Terraform or CloudFormation? Both promised declarative provisioning, but they spoke different dialects. I decided to embark on a quest to learn both, slay the configuration drift dragon, and come out with a reusable spellbook I could share with anyone on the team. The Revelation (The Insight) The breakthrough came when I stopped thinking of IaC as “just another config file” and started seeing it as a storytelling language . Every resource block is a character, every variable a plot twist, and the state file the ever‑growing script that remembers what happened in previous chapters. When I wrote my first Terraform module, it felt like Neo realizing he could bend the spoon—suddenly the impossible became trivial. I could define a VPC, subnets, security groups, and an RDS instance in a few dozen lines, run terraform init , terraform plan , and watch the plan show exactly what would change before any resources touched the cloud. No more surprise “you created a public‑facing DB!” moments. CloudFormation, on the other hand, felt like the loyal sidekick that already lives in the AWS universe. Its JSON/YAML templates are native to AWS, so there’s no extra provider to install, and drift detection is built‑in. The trade‑off? A bit more verbosity and a steepe

2026-07-01 原文 →
AI 资讯

Upsun Dispatch™ is now open for prerelease 🎉

Last week we introduced Upsun Dispatch™: a platform for the agentic software development lifecycle, where workflow is the primitive , not the agent. Today, prerelease is open. Starting July 1, a founding cohort of design partners gets early access. This is not a traditional beta. We are looking for engineering teams already running AI workflows and hitting the limits of what individual tools can do: teams who want to help shape what Upsun Dispatch becomes, not just use what we ship. Design partners get direct access to the core team, real input on the roadmap, and charter terms that reflect a genuine partnership rather than a vendor relationship. Apply at upsun.com/dispatch . Read the full announcement: Upsun Dispatch™ is now open for prerelease Starting July 1, 2026, Upsun Dispatch™ is open to a founding cohort of design partners. Here is what joining early means and how to apply upsun.com

2026-06-30 原文 →
AI 资讯

A/B Testing at Warp Speed: How Cloudflare Workers Revolutionize HTML Experiments

Let's be honest—traditional A/B testing is broken. If you've ever implemented client-side testing, you know the drill. Your users load the page, wait for JavaScript to execute, and then—flicker—the content changes. It's jarring. It hurts your Core Web Vitals. And worst of all, your experiments might be measuring user frustration instead of genuine engagement. But what if you could run A/B tests with zero flicker? What if you could modify your HTML before it even reaches the browser? That's exactly what Cloudflare Workers make possible . The Server-Side Advantage A/B testing at the edge means making decisions about which variant a user sees before any HTML is sent to their browser . Instead of: Load the page Execute JavaScript Flicker Apply the variant Track the result You get: Decision made at the edge Correct HTML streamed immediately Zero flicker Better performance Companies like Ninetailed are already using Cloudflare Workers to achieve 2-3x cost savings compared to traditional serverless platforms, all while delivering personalized experiences with minimal latency . How It Actually Works The concept is surprisingly elegant. Your Cloudflare Worker intercepts incoming requests, checks for a cookie to maintain user consistency, and routes users to the appropriate variant . Here's a simplified version that's production-ready: javascript const NAME = "myExampleWorkersABTest"; export default { async fetch(req) { const url = new URL(req.url); // Determine which group this user is in const cookie = req.headers.get("cookie"); if (cookie && cookie.includes(`${NAME}=control`)) { url.pathname = "/control" + url.pathname; } else if (cookie && cookie.includes(`${NAME}=test`)) { url.pathname = "/test" + url.pathname; } else { // New user—randomly assign them (50/50 split) const group = Math.random() < 0.5 ? "test" : "control"; url.pathname = `/${group}` + url.pathname; // Fetch and modify the response to set a cookie let res = await fetch(url); res = new Response(res.body, res

2026-06-30 原文 →
AI 资讯

Como uma dificuldade pessoal virou um projeto para aprender APIs

Recentemente percebi uma coisa meio curiosa: eu simplesmente tinha um problema ao consumir o conteúdo do 4noobs do jeito que ele é organizado hoje. Não porque a organização seja ruim — muito pelo contrário. Acho que a comunidade fez um trabalho incrível organizando o projeto. O ponto é que eu percebi que meu jeito de estudar é diferente: tenho muito mais facilidade quando consigo seguir listas, trilhas ou um caminho de aprendizado mais visual. Foi aí que pensei: "Se esse problema existe para mim, talvez exista para mais alguém. E se, de quebra, eu aproveitar isso para praticar consumo de APIs?" Foi assim que nasceu a Central 4noobs . A proposta era simples: consumir todo o conteúdo disponível no GitHub do 4noobs e apresentá-lo de uma forma que fizesse mais sentido para o meu jeito de estudar, organizando os materiais em listas e trilhas de aprendizado. A ideia nunca foi substituir a organização do projeto original, mas oferecer uma forma diferente de navegar pelo mesmo conteúdo. Essa era a ideia inicial... mas, como acontece com praticamente todo projeto pessoal, ela foi crescendo conforme o desenvolvimento avançava. Mas ainda é uma alternativa . Tenham em mente isso. :) O que aprendi durante o projeto O projeto foi desenvolvido utilizando Next.js , TypeScript , Drizzle ORM e Supabase como banco de dados (e hoje já não tenho tanta certeza se essa foi a escolha mais inteligente 😅). O maior aprendizado foi entender melhor como funciona o consumo de APIs. Antes eu entendia o conceito na teoria (com o próprio 4noobs , inclusive), mas foi durante o desenvolvimento da Central que realmente comecei a compreender como tudo se conecta. Depois desse projeto, passei a enxergar melhor como uma API é estruturada e, principalmente, como consumir seus dados sem simplesmente despejar tudo na tela. Outra parte interessante foi aprender a tratar os dados recebidos. Uma coisa é receber uma resposta gigantesca da API. Outra completamente diferente é filtrar apenas as informações que re

2026-06-30 原文 →
AI 资讯

Presentation: Trustworthy Productivity: Securing AI-Accelerated Development

Sriram Madapusi Vasudevan discusses industry-converging patterns for securing autonomous AI agents in production. He explains the critical vulnerabilities hidden inside the ReAct loop across context, reasoning, and tool execution. He shares how to mitigate risks like memory poisoning and rogue tool execution using defense-in-depth strategies, LLM-as-a-judge critics, and MAESTRO threat modeling. By Sriram Madapusi Vasudevan

2026-06-30 原文 →