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

标签:#ia

找到 1755 篇相关文章

AI 资讯

How We Built 非标准文本翻译与含义确认: A Context-Aware Book Translation Pipeline with Python and LLMs

Tackling idioms, cultural references, and ambiguous phrases in AI-powered book translation. At LectuLibre, we’ve been working on an AI-powered book translation service. One of the toughest challenges we ran into wasn’t the straightforward sentences — it was the non-standard text: idioms, metaphors, cultural references, and ambiguous phrases that machine translation consistently butchers. We needed a way to not only translate these correctly but also let users verify and edit the translations, because in literary works, getting them wrong breaks the entire reading experience. That’s how we built our 非标准文本翻译与含义确认 (non‑standard text translation and meaning confirmation) feature. It’s a pipeline that detects tricky sentences, proposes a contextual translation with a full meaning explanation, and gives users a final say. Here’s the engineering story, warts and all. The Problem Standard LLM translation does an impressive job on factual, literal text. But when a book says “it’s raining cats and dogs” it could be rendered as “raining animals” in the target language, which is either brilliant or absurd depending on context. Idioms often carry cultural weight that a simple word‑for‑word translation misplaces. Additionally, metaphors and ambiguous phrases can have multiple valid interpretations. For a translator, understanding the intent behind the phrase is half the work. We wanted a system that: Automatically identifies sentences containing non‑standard language. Generates a translation that preserves the original meaning rather than just the literal words. Provides a plain‑language explanation of what the phrase actually means (e.g., “This is an English idiom meaning it’s raining heavily”), so the user can judge the translation’s accuracy. Allows the user to confirm, edit, or retranslate those segments. A book can easily run to hundreds of thousands of words, so cost and speed were critical. We couldn’t just throw everything at a single high‑end LLM and call it a day. Our A

2026-07-18 原文 →
AI 资讯

Part 2 — Search, palette, and settings

Part 2 — Search, palette, and settings Level: Intermediate · Time: ~35 minutes · Builds on: Part 1 — Contacts app Part 1 got you shipping. This one gets you productive . We'll take the Contacts app and give it the ergonomics real users expect: an adaptive sidebar that becomes a tab bar on iPhone, a command palette on ⌘K, honest loading states while data comes in, and a proper settings screen. Zero #if os guards. Zero re-rolled controls. What we're adding An adaptive shell — DFSidebar on regular width, DFTabBar on compact. A search field at the top of the list, filtering as you type. A ⌘K command palette exposing every action in the app. Skeleton loaders for a simulated slow fetch. A settings screen — notifications toggle, density picker, sync-interval slider, pinned-since date picker, beta-features checkbox. Per-component token overrides on the settings screen, without forking the theme. 1. Shell: sidebar on wide, tab bar on narrow The routing decision — sidebar vs tab bar — should be data, not a view hierarchy. Enumerate your sections once, then feed the two components the shapes they want. API note. DFSidebar uses Binding<String?> and is just the sidebar view — you compose the detail pane yourself (naturally via NavigationSplitView ). DFTabBar uses Binding<String> (non-optional) and does take a content builder that receives the selected ID. Both use plain String IDs, so we keep a simple Section enum and pass rawValue at the boundary. enum Section : String , CaseIterable , Identifiable , Hashable { case contacts , favorites , archive , settings var id : String { rawValue } var label : String { switch self { case . contacts : "Contacts" case . favorites : "Favorites" case . archive : "Archive" case . settings : "Settings" } } var icon : String { switch self { case . contacts : "person.2.fill" case . favorites : "star.fill" case . archive : "archivebox.fill" case . settings : "gear" } } static func from ( _ id : String ?) -> Section { id . flatMap ( Section . init (

2026-07-18 原文 →
AI 资讯

Presentation: From OTEL to SLMs: Distilling Frontier Model Behaviour from Production Telemetry

Ben O'Mahony discusses building custom AI-powered Language Server Protocols (LSPs) that go beyond standard rule-based checkers. He explains how to instrument AI agents natively with OpenTelemetry to track concrete user actions (accepting, dismissing, or regenerating code fixes) as implicit labels, creating a continuous data flywheel to distill frontier capabilities into cheaper, local SLMs. By Ben O'Mahony

2026-07-17 原文 →
AI 资讯

How Uber Builds Zone-Failure-Resilient OpenSearch Clusters

Uber explained how it keeps its OpenSearch deployments running during a zone outage. It does this by using OpenSearch's built-in shard allocation and its own isolation-group system, which relies on the Odin container orchestration platform. This way, it maintains both query and ingestion capabilities. By Claudio Masolo

2026-07-17 原文 →
AI 资讯

MAD-SHOW Lighting Control Software: A Comprehensive Guide from Beginner to Advanced Features

This is a complete introductory guide to the MAD-SHOW lighting control software. Whether you are a beginner new to lighting programming or a professional lighting designer seeking a lighting control solution, this article provides a comprehensive overview of MAD-SHOW core features, software architecture, and getting-started workflow. This guide is demonstrated based on version v3.0.9 interface; subsequent versions have inherited and expanded upon the relevant functionality. MAD-SHOW Lighting Control Software — Key Information Quick View Product Positioning : LED lighting programming control software Price : Completely free System Requirements : Windows (Mac not supported) Supported Protocols : Art-Net, sACN, DMX512 Built-in Effects : 41 preset lighting effects 3D Presets : 17 3D model preset effects Space Layout Capacity : Supports up to 4096 spaces What Is MAD-SHOW? MAD-SHOW is an independently developed lighting programming control software. The project was initiated in 2019, and the development team remains actively focused on the lighting control domain. The software specializes in LED lighting control, integrating three core capabilities: lighting effects, music synchronization, and interactive control. MAD-SHOW is completely free to download and use. Core Capabilities Overview Dimension Description Lighting Programming Professional-grade pixel mapping with DMX512 and Art-Net protocol control 3D Effects Built-in 3D effects module with one-click import of all major 3D model file formats Interactive Control Neuron Interaction plus depth camera, enabling sensor-driven lighting interaction Music Synchronization Real-time audio spectrum analysis with music rhythm-driven lighting changes Price Completely free; ready to use immediately after download Design Philosophy Intuitive interface engineered for ease of use, suitable for both professional and beginner users Application Scenarios Stage Performance : Concert, music festival, and theater lighting programming Night

2026-07-17 原文 →
AI 资讯

Introduction to Probo-ui — Write HTML Entirely in Python series

A tutorial series, DEV.to blog series — from your first HTML element to production-grade User Interfaces, all in pure Python. Modern Python web frameworks force developers into a split workflow: business logic lives in Python files with full IDE support, while presentation logic is exiled to template files that offer none of it. Template languages like Jinja2 introduce their own syntax for conditionals, loops, and variable access — syntax that your linter cannot check, your type checker cannot verify, and your debugger cannot step through. Every context variable passed across that boundary is a potential KeyError waiting to surface at runtime. Probo eliminates this divide entirely by making HTML a native Python construct — written, validated, and refactored with the same tools you already use for the rest of your codebase. PART 1: Introduction to Probo — Write HTML Entirely in Python What is Probo? Probo is a Python-first, declarative UI rendering framework . Instead of writing HTML in .html files or using template languages like Jinja2, you write everything in pure Python. No template files. No string concatenation. No f-strings full of angle brackets. Just Python functions and classes that are your HTML. The Two Flavors of Every Tag Every HTML tag in Probo comes in two forms: Flavor Example Returns Use Case Function (lowercase) div() , h1() , p() Rendered HTML Quick rendering, lightweight Class (uppercase) DIV() , H1() , P() SSDOM tree node Tree manipulation, streaming from probo import div , DIV # Function: returns a string immediately # return_list=True html_string = div ( " Hello World " ,) # → "<div>Hello World</div>" # Class: returns a tree node, call .render() to get the string node = DIV ( " Hello World " , Id = " main-title " ) # Because it's a Node, you can manipulate it dynamically node . add ( div ( " Subtitle added later! " )) html_string = node . render () # → '<div id="main-title">Hello World<div>Subtitle added later!</div></div>' Note: by adding ret

2026-07-17 原文 →
AI 资讯

Building Reliable Event-Driven Systems: Event Schemas, Versioning, Contract Testing and Events vs Commands (part-3)

In this article, we're going to explore Event Schema evolution with Event versioning 10. Event Schemas Will Eventually Change No event schema stays the same forever. As businesses grow, regulations shift, products gain new features, and processes become more complex, the data shared between services must evolve as well. This evolution is not optional—it is a natural consequence of a system adapting to changing requirements. Many teams initially assume they can simply update an event whenever needed. This assumption may hold when there is only one producer and one consumer, but real-world systems rarely remain that simple. Over time, multiple consumers emerge, each with its own responsibilities and release cycles. A typical system often looks like this: OrderConfirmed | +------------------+-------------------+ | | | v v v Inventory Billing Notification | v Analytics | v Customer Insights Each consumer evolves independently. Some services may deploy updates weekly, while others might release changes quarterly. In some cases, consumers may even belong to external teams with entirely different priorities and timelines. Because of this, producers cannot assume that all consumers will upgrade simultaneously. Schema evolution, therefore, is not just about modifying data structures. It is fundamentally about maintaining compatibility across independently evolving systems. Compatibility Is More Important Than Version Numbers When discussing schema evolution, teams often focus immediately on versioning. While versioning is useful, compatibility is far more critical. Without compatibility, versioning alone cannot prevent system breakage. Consider the following event: { "orderId" : "ORD-1001" , "customerId" : "CUS-501" , "totalAmount" : 249.99 } Now imagine a new requirement introduces currency. One approach might replace the existing field entirely: { "orderId" : "ORD-1001" , "customerId" : "CUS-501" , "amount" : { "value" : 249.99 , "currency" : "USD" } } Although the data mo

2026-07-17 原文 →
AI 资讯

The risk of weather data sabotage is rising

Every morning, airline dispatchers, grid operators, and farmers around the world make decisions based on the same thing: a weather forecast. While these forecasts are something that most people glance at for two seconds, weather predictions influence major strategic decisions in many industries, with real money, livelihoods, and even actual lives at stake. Farmers use…

2026-07-17 原文 →
AI 资讯

If 30% of Coding Tasks May Be Broken, Your Leaderboard Needs an Uncertainty Budget

OpenAI published an audit of SWE-Bench Pro on July 8, 2026 and estimated that roughly 30% of its tasks are broken. The reported issues make a familiar leaderboard assumption unsafe: every task in the denominator is a valid, equally interpretable trial. Primary source: OpenAI, “Separating signal from noise in coding evaluations” . The operational response should not be “ignore all benchmarks.” It should be: version task validity, preserve disputed cases, and publish how conclusions change across plausible denominators. Model task state separately from model result task validity: unreviewed | valid | broken | disputed model result: pass | fail | infrastructure_error | missing Never convert infrastructure_error to model failure without reporting that policy. Never delete broken tasks while retaining an old score label. A row needs provenance: { "task_id" : "repo-issue-17" , "dataset_revision" : "sha256:..." , "harness_revision" : "git:..." , "model_config" : "immutable-config-id" , "validity" : "disputed" , "result" : "pass" , "review_revision" : 3 , "evidence" : [ "fixture.log" , "review.json" ] } Publish three denominators Let: P_v , N_v : passes and total among reviewed-valid tasks; P_a , N_a : passes and total across all attempted tasks; D : disputed tasks. Report: valid-only score = P_v / N_v all-attempted score = P_a / N_a uncertainty interval = score if every disputed task hurts conclusion .. score if every disputed task helps conclusion This interval is not a statistical confidence interval. It is a sensitivity bound for unresolved task validity. A tiny sensitivity calculator #!/usr/bin/env python3 import json , sys rows = [ json . loads ( line ) for line in open ( sys . argv [ 1 ]) if line . strip ()] valid = [ r for r in rows if r [ " validity " ] == " valid " ] disputed = [ r for r in rows if r [ " validity " ] in ( " unreviewed " , " disputed " )] attempted = [ r for r in rows if r [ " result " ] in ( " pass " , " fail " )] rate = lambda passed , total : pa

2026-07-17 原文 →
AI 资讯

Learn AI SDK 7 Scoped Tool Context With a Two-Tool Secret Boundary

Vercel's AI SDK 7 adds scoped tool context: a tool can declare a contextSchema , while the caller supplies per-tool values through toolsContext . The purpose is practical—third-party tools do not need to receive every secret or configuration value held by an agent. Primary source: Vercel, “AI SDK 7 is now available” . Let's turn that feature into a tiny security exercise. We will create two tools: lookupOrder may receive an internal order-service URL; createTicket may receive a support token; neither tool should receive the other's value. Setup Use a fresh project and pin the versions you actually install in your lockfile: mkdir scoped-tools && cd scoped-tools npm init -y npm install ai zod npm install -D typescript tsx @types/node Create demo.ts : import { tool } from ' ai ' ; import { z } from ' zod ' ; const lookupOrder = tool ({ description : ' Read the status of one order ' , inputSchema : z . object ({ orderId : z . string (). min ( 1 ) }), contextSchema : z . object ({ baseUrl : z . string (). url () }), execute : async ({ orderId }, { context }) => ({ orderId , source : new URL ( `/orders/ ${ orderId } ` , context . baseUrl ). toString (), status : ' demo-only ' , }), }); const createTicket = tool ({ description : ' Create a support ticket ' , inputSchema : z . object ({ subject : z . string (). min ( 3 ) }), contextSchema : z . object ({ supportToken : z . string (). min ( 12 ) }), execute : async ({ subject }, { context }) => ({ subject , accepted : context . supportToken . startsWith ( ' support_ ' ), }), }); const tools = { lookupOrder , createTicket }; const toolsContext = { lookupOrder : { baseUrl : ' https://orders.invalid ' }, createTicket : { supportToken : ' support_demo_token ' }, }; async function run () { const order = await lookupOrder . execute ! ( { orderId : ' A-17 ' }, { context : toolsContext . lookupOrder } as never , ); const ticket = await createTicket . execute ! ( { subject : ' Order is delayed ' }, { context : toolsContext . createTi

2026-07-17 原文 →
AI 资讯

Understanding HTML Forms

HTML Forms and the <form> Tag HTML forms are used to collect information from users through a webpage. They are commonly found in login pages, registration forms, contact forms, search bars, and online shopping websites. The <form> tag acts as the main container that groups different form elements together. When a user submits the form, the browser collects the entered data and prepares it to be sent to a server. <form> <label for= "name" > Full Name </label> <input type= "text" id= "name" name= "fullname" > <button type= "submit" > Submit </button> </form> Understanding the action and method Attributes The action attribute specifies where the form data should be sent after submission. This destination is usually called an endpoint . The method attribute defines how the data is sent. The GET method sends data through the URL, while the POST method sends data inside the request body, making it suitable for sensitive information. <form action= "/submit" method= "post" > <input type= "text" name= "username" > <button type= "submit" > Submit </button> </form> Understanding Common Form Attributes The <form> tag supports several attributes that control its behavior. Attributes such as autocomplete , target , enctype , novalidate , and accept-charset improve the user experience and define how the browser handles form data before and after submission. <form action= "/submit" method= "post" autocomplete= "on" target= "_self" > </form> How an HTML Form Works When a user enters information and clicks the Submit button, the browser collects all form data and sends it to the location specified by the action attribute using the HTTP method defined in method . The server processes the request and returns a response to the browser. <form action= "/login" method= "post" > <input type= "email" name= "email" > <input type= "password" name= "password" > <button type= "submit" > Login </button> </form> Why HTML Forms Are Important HTML forms make websites interactive by allowing users t

2026-07-17 原文 →
AI 资讯

How to edit /etc/hosts without breaking your local setup

Most people open /etc/hosts , change one line, refresh the browser, and hope. That works until it does not. Then you spend twenty minutes on Permission denied , a forgotten DNS flush, or a commented line from last week that is still active. This is a simple workflow that keeps hosts edits boring. What the hosts file does When your machine resolves a name like myapp.test , it can use a local override before public DNS. Common cases: Point myapp.test to 127.0.0.1 for local work Point a real domain at a staging IP before DNS cutover Temporarily block a host with 0.0.0.0 Give services readable names instead of raw IPs The idea is simple. The mess comes from how people edit and apply it. A workflow that holds up 1. Do not treat /etc/hosts as your only copy Keep a file you own: ~/dev/hosts/personal.hosts Or one file per project / client. Edit that. Apply it on purpose. 2. Edit the copy, then copy it into place macOS / Linux: code ~/dev/hosts/personal.hosts sudo cp /etc/hosts "/etc/hosts.bak. $( date +%Y%m%d-%H%M%S ) " sudo cp ~/dev/hosts/personal.hosts /etc/hosts Windows: edit your copy, back up the live file, then replace: C :\ Windows \ System32 \ drivers \ etc \ hosts You need admin rights for the live file. That is normal. 3. Flush DNS every time you apply Make this part of the apply step, not a later panic search. macOS sudo dscacheutil -flushcache ; sudo killall -HUP mDNSResponder Windows (Admin) ipconfig /flushdns Linux (systemd-resolved) sudo resolvectl flush-caches 4. Verify in the terminal before the browser ping -c 1 myapp.test # Linux: getent hosts myapp.test Right IP in the terminal, wrong page in the browser? Stop rewriting hosts. Look at browser DNS, HTTPS, redirects, or HSTS. 5. Avoid two active lines for the same hostname This breaks people constantly: 10.0.0.5 www.client.com 127.0.0.1 www.client.com Pick one. Comment the other, or better, keep separate profile files and swap the whole file. Example: local frontend + API 127.0.0.1 shop.test 127.0.0.1 api.

2026-07-17 原文 →