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

标签:#ai

找到 3825 篇相关文章

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 资讯

Aikido buys Root to patch open source in place, without the upgrade dance

Every open-source CVE backlog has that one line item you keep sliding into next quarter. The library is a couple of majors behind, the upgrade breaks four services, and the fix upstream ships against a version you cannot ride to. So you file the ticket again. (Everyone's doing great, thanks for asking.) On June 30, Aikido Security said it had acquired Root, whose whole pitch is to make that ticket go away by another route: patch the vulnerability directly into the version already resolved by your build, and skip the upgrade entirely. Per The New Stack, the deal is worth $70 million, and Root's patching technology gets folded into a new Aikido product. Let me phrase what has just moved as plainly as I can. A vendor now edits open-source packages on your behalf and hands you back a version string upstream never shipped. If that sentence made you flinch, hold the flinch. It is doing useful work. The problem this is actually solving The dirty secret of dependency remediation is that a lot of "known" CVEs sit unfixed because remediating them means a version bump that carries breaking changes. You do not get a security patch for the 2.x line, you get a "fixed in 4.0" release note and a laugh track. Backporting the fix is the right operational move: keep the API surface, change only the vulnerable bytes. Linux distributions have done exactly this for decades. The reason your app team is not doing it too is that nobody has the muscle to maintain a patched fork of every transitive dependency in a lockfile. If Aikido now makes that muscle available to the average CI/CD owner, teams get a lever they simply did not have. That is the honest upside. Own it. Who is signing what, exactly Here is the part I care about, which is trust. When your build resolves a package by name and version, you rely on a chain: the registry answers, the digest matches what upstream published, the SBOM you generate downstream still refers back to that same identity. A backported build breaks that chai

2026-07-01 原文 →
AI 资讯

How AI Assist Turns a Rough Draft into a Polished Document in Minutes

You've got a rough draft. Bullet points, half-finished paragraphs, maybe some notes you pasted from a meeting. It needs to become a real document — but rewriting takes time you don't have. That's exactly where AI Assist comes in. What AI Assist Does AI Assist lives inside PaperQuire's editor. Select any text, right-click, and choose an action: Rewrite — Rephrase your selection for clarity and tone, keeping the meaning intact Expand — Turn bullet points or short notes into full paragraphs Summarize — Condense a long section into a concise summary Fix grammar — Clean up spelling, punctuation, and awkward phrasing Translate — Convert your text to another language Custom prompt — Tell the AI exactly what you want ("make this more formal", "add examples", "simplify for a non-technical audience") Every action works on your selection — you stay in control of what gets changed and what doesn't. Bring Your Own Key PaperQuire doesn't route your content through our servers. You plug in your own API key from any supported provider: OpenAI (GPT-4o, GPT-4o mini) Anthropic (Claude Sonnet, Claude Haiku) Google (Gemini Pro) Local models (Ollama, LM Studio — for fully air-gapped workflows) Your documents, your key, your choice. Nothing leaves your machine unless you explicitly configure an external provider. A Real Workflow: Meeting Notes to Executive Summary Here's a concrete example. You come out of a 45-minute meeting with this: - Q2 revenue up 12% vs forecast - APAC expansion delayed, regulatory issues - New pricing tier launching Aug 1 - Customer churn down to 3.2%, lowest ever - Engineering headcount: 3 open roles, 2 offers out - Board meeting moved to July 18 Select all, click Expand , and AI Assist turns it into: Q2 revenue came in 12% above forecast, driven primarily by enterprise upsells in North America. The planned APAC expansion has been delayed due to unresolved regulatory requirements in two target markets; the team is working with local counsel to clear the path for a

2026-07-01 原文 →
AI 资讯

Desenvolvedor: de técnico a arquiteto do produto

Existe um desconforto generalizado na área de desenvolvimento. Uma sensação de que o chão mudou, mas ninguém deu o mapa novo. A IA generativa entrou no dia a dia, e de repente aquilo que antes levava horas: escrever funções, montar queries, criar componentes, resolver bugs triviais. Agora passou a levar minutos. Às vezes, segundos. A reação mais comum é: ou "a IA vai substituir todo mundo", ou "não muda nada, é só mais uma ferramenta". As duas posições estão erradas. A primeira é alarmismo. A segunda é negação. O que aconteceu foi uma mudança de papel . O desenvolvedor não deixou de ser necessário. O tipo de contribuição que se espera de um desenvolvedor mudou. E entender essa mudança cedo, especialmente para quem está no início da carreira, é a diferença entre se tornar um profissional de pouco impacto e um profissional indispensável. O modelo que conhecíamos Durante muito tempo, a indústria funcionou com uma divisão razoavelmente clara de responsabilidades: O ciclo tradicional de uma demanda: Alguém identifica um problema → alguém de produto investiga e define o escopo → um arquiteto ou pleno projeta a solução → um desenvolvedor implementa. Cada etapa tinha suas pessoas, suas cerimônias, seus rituais. Refinamento, sprint planning, design review, code review. Não que isso fosse ruim, só era uma estrutura que fazia sentido quando cada etapa era custosa. Dentro desse modelo, a progressão de carreira era mais ou menos assim: Junior recebia tarefas pequenas e bem definidas. Codificava, testava, corrigia. A maior parte do tempo era gasto na execução: a parte braçal . Pleno pegava demandas mais complexas, começava a pensar em como o código se encaixa no sistema. Refatorava, participava de decisões técnicas . Senior definia arquitetura, avaliava trade-offs, mentorava. Codava menos, pensava mais . A IA comprimiu isso. Muito do trabalho braçal que servia como treinamento para o junior agora é automatizado. E isso gerou a pergunta que paira no ar: "Se a IA faz o que eu fazia

2026-07-01 原文 →
AI 资讯

Anthropic’s long-sidelined Fable 5 is greenlit to return

After weeks of negotiating with the Trump administration, Anthropic is finally going to be able to bring Claude Fable 5 back online. In a post on X, Anthropic said it plans to begin restoring access tomorrow. Anthropic: We've received notice that the Department of Commerce has lifted export controls on Claude Fable 5 and Mythos […]

2026-07-01 原文 →
AI 资讯

"How to Stop AI Agent Skills, Hooks, and Cron Jobs from Silently Conflicting Over Where They Run and What Data They Trust"

Originally published on hexisteme notes . Make every skill, hook, and scheduled job declare four invariants before it ships — Locality (where it can run), Source-of-truth (which facts it owns or borrows), Cross-ref (what depends on it and what it depends on), and Trigger-measurability (whether its trigger is observable at runtime or hidden in external state) — and refuse to hand off any component that leaves one undeclared, because an undeclared assumption is exactly the seam where two components silently disagree. Two separate runtime leaks surfaced in a single audit session, and both traced back to the same root cause: a component that never declared its assumptions. One read configuration from a file that had stopped being the source of truth (so it always returned a stale default); the other was a scheduled job pointed at a remote sandbox while its prompt referenced local-only paths — caught minutes before registration, where any later and it would have billed compute and produced nothing. Neither was a coding bug. Both were missing declarations. The failure mode: components that work alone but leak when combined When you build an AI agent system out of small parts — skills the model loads on demand, hooks that fire on lifecycle events, cron jobs and scheduled routines that run unattended, helper scripts, config profiles — each part usually gets tested in isolation. It works. You move on. The trouble is that "it works" only proves single-shot correctness; it says nothing about whether the part's assumptions agree with the rest of the system. Every component carries hidden assumptions: where it runs (local machine vs. a remote sandbox), which facts it treats as authoritative, what other components it silently depends on, and what its trigger actually measures. When those assumptions go undeclared, conflicts stay invisible until they surface to the user as a flaky, hard-to-trace symptom — the kind that feels like a vicious cycle because every fix in one place re-o

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 原文 →
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 资讯

Agent memory and context that never leaves your machine

Most "agent memory" and "agent context" tools today require sending your data to someone else's cloud. If you operate in a regulated, air-gapped, or simply privacy-conscious environment, that rules them out before you've even tried them. I build the opposite: two MIT-licensed, local-first MCP servers that do this work entirely on your own hardware. The problem Agent memory and context assembly are converging on a cloud-only default. That's a non-starter for defense, healthcare, finance, legal, and any team that can't or won't let agent context leave their VPC. It's also just slower and less deterministic than it needs to be: agents re-discover the same facts about your repo and services every session, burning tokens and turns before doing any real work. Mimir: persistent memory, fully offline Mimir is a single ~8MB Rust binary. It encrypts everything at rest with AES-256-GCM, and it works with no API key, no model download, and no network access at all, because the embeddings used for dense search are bundled directly into the binary. It's bi-temporal: every fact carries a validity window, so you can query memory "as of" any past point and supersede facts without deleting history. 43 MCP tools, SQLite + FTS5 hybrid search under the hood. One honest tradeoff worth naming: the FTS5 index needed for fast keyword search currently sits over plaintext, even though the underlying record is encrypted at rest. We're upfront about this in the docs rather than overstating the encryption story. Perseus: compile-before-context Perseus takes a different approach to context than runtime tool-call discovery. Instead of letting an agent rediscover your git state, running services, and test status through a chain of tool calls every session, it compiles all of that into a ready briefing the moment a session starts. The result is deterministic and byte-stable: the same repo state always produces the same compiled context. Honest, reproducible benchmarks On paraphrased queries, Mimir's

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 原文 →