AI 资讯
XML Tagging in Prompts: The Secret to Getting Better Output from Claude and GPT
XML Tagging in Prompts: The Secret to Getting Better Output from Claude and GPT A simple structuring trick that turns messy, unpredictable LLM outputs into clean, reliable ones. If you've spent any time writing prompts for Claude, GPT, or any other large language model, you've probably hit this wall: your prompt works fine for a simple ask, but the moment you pack in multiple instructions — some context, a few examples, formatting rules, and the actual task — the model starts mixing things up. It answers the wrong part of the question. It ignores your formatting instructions. It treats your example output as part of the actual task. The fix is almost embarrassingly simple: wrap your prompt sections in XML tags. Why XML Tags Work So Well LLMs are trained on enormous amounts of code, documentation, and markup. XML (and HTML) syntax is deeply embedded in that training data, which means models are very good at recognizing where one tagged section ends and another begins. Unlike plain paragraphs — where the boundary between "here's my context" and "here's my instruction" is fuzzy — a tag creates an unambiguous boundary. Anthropic actually recommends this explicitly for Claude: wrapping distinct parts of a prompt (instructions, context, examples, output format) in tags like <instructions> , <context> , <example> , and <output_format> measurably improves consistency, especially in longer or more complex prompts. Think of it like the difference between handing someone a wall of text versus handing them a form with labeled fields. Both contain the same information, but one is far easier to parse correctly — for a human, and for a model. A Before-and-After Example Without tags: Summarize the article below in 3 bullet points. Keep it under 50 words. Use a neutral tone. Here's an example of the style I want: "- Company X raised $10M in Series A funding." Now here's the article: [long article text] The model has to guess where the instructions end and the article begins — and wi
AI 资讯
I have been Vibecoding Evals (works better than I thought)
I’ve been building AI apps with coding agents for a while. Lately, I’ve been experimenting with evals too. The app in this example mostly worked. That was the problem. The bug I built a small support-triage app for a fictional shipment-tracking company. A customer sends a support ticket, and the app decides what it is about, how urgent it is, and whether a human needs to respond. A real outage should be escalated. But this ticket was different: “URGENT need key rotation now” The customer was asking how to rotate their own API key before a security review. The app classified it as a security incident and escalated it to a human. That was wrong. The policy said normal key rotation was a self-service how-to request. Nothing crashed. The app returned valid JSON. The fields all contained allowed values. The behavior was still wrong. Why clicking around wasn’t enough I could test a few tickets manually and convince myself the app worked. But after changing the prompt, what would I actually know? Would the outage case still escalate? Would normal how-to questions stay in the normal queue? Would another API-key question behave differently? I didn’t want to change the prompt and simply hope for the best. I wanted a set of cases I could run again. Adding DeepEval with Cursor I installed the DeepEval agent skill: npx skills add confident-ai/deepeval --skill "deepeval" Then I asked Cursor to add evals to the app: This app sometimes treats normal support questions like emergencies and sends them to a human. Add DeepEval so I can test this using the tickets and policy already in the repo. I am new to evals, so use the simplest setup DeepEval already provides, explain what you create, and ask me anything you need. Run the app as it is first and show me what fails. Do not fix it yet. Cursor already had the app, tickets, and policy, so it went straight to creating the baseline. Goldens are the checklist The first useful artifact was a JSON dataset. Each golden contained: the custome
开发者
Understanding Over Origin: The Missing Friction
A few days ago, I wrote "Understanding Over Origin" and it got alot of engagement and I'm really...
产品设计
Research roundup: 6 cool science stories we almost missed
Also: Cyborg diving suits for cockroaches, why sleepy sperm whales blow bubbles, Betelgeuse's companion star.
AI 资讯
Local development needs a runtime contract, not more terminal tabs
A project can depend on an API, frontend, workers, Docker, databases, tunnels, webhooks, and browser extensions. Remembering which terminal runs each process works—until it doesn’t, and it works even less reliably for coding agents. I built dev-runtime to make that runtime explicit. Simple config files define each session’s working directory, shell command, log file, expected ports, and health endpoints. It runs arbitrary commands inside managed tmux sessions, avoids starting duplicates, and provides shared start , status , doctor , attach , and stop commands. Because the commands live in project config, it is not tied to Node, Python, Docker, or any particular stack. The result is one machine-readable answer to: “What should be running, and is it actually healthy?” Article: https://motia.github.io/blog/using-dev-runtime-to-debug-local-services/ Repository: https://github.com/motia/agent-skills-dev/tree/main/skills/dev-runtime submitted by /u/mutasaki09 [link] [留言]
科技前沿
The SpaceX Falcon Lunar Crash Is a Warning for Moon Bases
The risk of more debris hitting the moon is on the rise as the space race heats up.
开发者
Learning Rust · Rust Programming Language Tutorials for Everyone!
The project started in 2016 as a Medium publication and GitBook but later moved to https://github.com/learning-rust/learning-rust.github.io I was updating section by section from time to time. No lies! keeping a Rust tutorial up to date is very tough. Plus, you end up repeating what you already know. It is even tougher, when you have to write code in another language for work. https://learning-rust.github.io updated with lot of rewrites and new themes & widgets like tabs for grouped code samples. submitted by /u/dumindunuwan [link] [留言]
AI 资讯
Influencers draw backlash for attending OpenAI’s first luxury trip
OpenAI’s first-ever influencer brand trip is sparking online backlash as tensions over the use of AI continue.
AI 资讯
Azure and Community Guidelines on Choosing Between a Skill or a Sub-Agent
In a recent Azure Architecture blog article, Azure lead engineer Kishorekumar Pattabiraman outlines practical criteria for choosing between skills, sub-agents, and other approaches when building AI systems, emphasizing reusability, simplicity, and long-term maintainability. By Sergio De Simone
AI 资讯
Trump’s AI protectionism has come for robotics
This story originally appeared in The Algorithm, our weekly newsletter on AI. To get stories like this in your inbox first, sign up here. Humanoid robots usually elicit more cringe than awe: They stumble, kick children, and despite advances are still worse at using their hands than my toddler. It’s a nascent industry, and such robots…
开发者
Sellar un archivo para que nadie pueda discutir que no lo tocaste
Una discusión sobre un archivo digital casi nunca se pierde por lo que el archivo dice. Se pierde una pregunta antes: ¿Cómo sabemos que ese es el archivo que usted recibió, y no el que editó anoche? Si la respuesta es "confíe en mí", ya perdiste. Y da igual cuánta razón tengas en el fondo. Este problema no es exclusivo de un juzgado. Lo tiene el auditor que recibe un volcado de logs, el equipo que documenta un incidente, quien conserva la copia de un contrato firmado por correo. En todos los casos hace falta lo mismo: poder demostrar que un conjunto de bytes no cambió desde un momento determinado, y que lo demuestre alguien que no seas tú . Para eso escribí Tunjo : una herramienta en Rust que recorre un material en solo lectura, calcula su huella y firma un acta verificable por cualquiera. Por qué un árbol y no un hash Lo obvio sería concatenar todo y sacar un SHA-256. Funciona, y es inútil en la práctica. Cuando alguien discute un archivo —un correo concreto entre cuatro mil— con un hash único solo puedes ofrecer dos cosas: o entregas el conjunto completo para que se recalcule, o pides que te crean. La primera opción expone material que no tiene por qué exponerse; la segunda no es una prueba. Un árbol de Merkle resuelve exactamente eso. Cada archivo es una hoja, cada par de nodos se combina hacia arriba y queda una raíz. Para demostrar que una hoja pertenece a esa raíz basta con exhibir esa hoja y el camino de hashes hasta arriba: unos pocos kilobytes. El resto del conjunto no se toca. Dos detalles del árbol que no son opcionales: // Separación de dominio: una hoja nunca puede hacerse pasar por nodo interno. h . update ([ 0x00 ]); // hoja h . update ([ 0x01 ]); // nodo interno // Y la raíz ata el número de hojas. h . update ([ 0x02 ]); h . update ( n . to_be_bytes ()); Sin lo primero, un hash de hoja podría presentarse como si fuera un nodo del árbol. Sin lo segundo aparece la ambigüedad clásica de los árboles con número impar de hojas: dos conjuntos distintos pued
开发者
Want the best bass out of your headphones? Here's what to look for
Before you go spend money on new headphones, try these adjustments. You can probably improve the sound on the ones you have.
AI 资讯
8051: Building a Custom Disassembler
Industrializing the disassembly of an undocumented processor from a raw binary is a complex task that can be broken down into four key steps: Verify that the binary does not belong to a known processor. Verify that the binary is not obfuscated, compressed, or encrypted code for a known processor. Build an undocumented processor generator. Create the analysis pipeline and custom disassembler generation process. For the first phase of this project, the goal is to build dedicated, lightweight disassemblers—since, for bare-metal binaries, tools like Ghidra require manual processor target selection before analysis can begin. 1. Why Build a Custom Disassembler? To determine whether a binary was compiled for a specific architecture, the strategy consists of disassembling the binary (both statically and dynamically) against candidate instruction sets until: One or more bytes fail to match any valid instruction for that architecture, allowing us to rule it out. The disassembly succeeds completely. (Note: a successful disassembly does not guarantee that the binary was originally intended for that CPU; control flow validity must also be verified). Static disassembly is the first line of defense. However, if it fails due to obfuscation, compression, or encryption, we must escalate to dynamic execution and analysis. Only after systematically eliminating all known architectures can we confidently conclude that we are dealing with a custom or undocumented processor . 2. How to Build Your Custom Disassembler Before deploying heavy machinery for undocumented processors, the logical first step was to check against known architectures. Approach 1: Ghidra and SLAgh Ghidra relies on the SLAgh specification language and maintains an extensive library of processor definitions. The original plan was to leverage its API to extract a normalized opcode mapping table. However, after several attempts, Ghidra proved unsuitable for this specific pipeline for two reasons: Operand Type Loss: Detail
AI 资讯
Beyond Prompt Guessing: Why LSP Integration is the Missing Protocol for Reliable AI Coding Agents
Originally published on tamiz.pro . The current generation of AI coding assistants operates on a fundamental paradox: they are trained on the entirety of public code, yet they struggle to understand the specific codebase they are embedded in. For years, the industry has relied on prompt guessing —feeding the LLM a ragged collection of nearby code lines, hoping the semantic context is implicit. This approach is brittle. It fails when symbols are imported, when types are inferred, or when the logic spans multiple files.\n\nThe solution isn't a bigger model; it's a better protocol. The Language Server Protocol (LSP) is the missing link between static analysis and generative AI. By integrating LSP into AI agents, we move from probabilistic guessing to deterministic understanding. This article explores why LSP is critical for reliable coding agents, how to architect an LSP-augmented agent, and the technical pitfalls of this integration.\n\n## The Semantic Gap: Why Prompts Aren't Enough\n\nTo understand why LSP is necessary, we must first diagnose the failure modes of prompt-only AI coding agents. An LLM is a probabilistic next-token predictor. It does not "know" your code; it has seen patterns similar to your code in its training data. When you ask an AI agent to \"refactor this function,\" it relies on the context window to provide relevant information.\n\n### The Context Window Bottleneck\n\nThe primary limitation is the context window. Even with 128k tokens, you cannot fit an entire modern codebase. Agents must select a subset of files to include. Without explicit semantic queries, this selection is often heuristic-based (e.g., \"include the last 50 lines\") or simple semantic similarity (vector search). Both approaches miss critical structural relationships.\n\nConsider this example:\n\n python\n# file: user_service.py\nclass UserService:\n def get_user(self, user_id: int):\n # ... logic ...\n return db.query(User).filter(id=user_id)\n\n# file: controllers.py\ndef ha
AI 资讯
Optimize an AI agent to sound human, judged by an AI detector
You can tell when an LLM wrote an email. The "I hope this email finds you well" opener, the three polite paragraphs answering a one-line question. I wanted a reply-drafting agent that didn't do that, and "don't sound like an AI" turned out to be hard to put in a prompt. Banning a few phrases is easy. The rest is judgment, and a single prompt that holds across a friendly dinner invite and a recruiter cold-email took more iterations than I'd guessed. This is not only an email problem. Some platforms down-rank content that reads as AI-generated, so teams publishing at scale have a real stake in prose that clears a detector, even when a human wrote it. The workflow here applies to any of that. So I stopped hand-tuning and let LaunchDarkly agent optimization search for the prompt. You give it a judge that scores "better," and it generates prompt variations and keeps the ones that beat the bar. For the reasoning behind the feature, read the agent optimization announcement . This tutorial is the how. If you don't have an account yet, sign up for LaunchDarkly to follow along. Two pieces do the work here. Claude ( claude-haiku-4-5-20251001 ) runs both roles: it drafts the replies, and it writes each new candidate prompt when the loop asks for one. Scoring comes from GPTZero, which isn't a language model at all but a closed AI detector. I wired it in inverted, so the score is the probability a reply reads as AI and the optimizer drives it down. I went with a detector instead of an LLM-as-a-judge for a reason: grading one model's prose by asking another model whether it sounds human is exactly the call language models are unreliable at, and a tool trained for that one question gives a number you can defend. A run is cheap. Each iteration costs around $0.002 and a few seconds, so a full run lands near a penny or two, and the loop tries variations I'd never sit down and type by hand. This tutorial runs from a saved config You bootstrap the agent, the judge, and the optimization,
产品设计
Let’s Build PlanetScale From Scratch: Infrastructure
submitted by /u/onatm [link] [留言]
AI 资讯
The Anbernic RG SP will be available on August 5
This modern-day Game Boy Advance SP remake starts at $65, but Anbernic is offering early bird pricing.
开源项目
WhatsApp says it is is fixing an issue that disabled several accounts
Meta says it’s restoring access to WhatsApp accounts that were mistakenly flagged and placed “under review” after users reported being unexpectedly locked out of the messaging app.
AI 资讯
Stratagems #22: The AI Chose Its Door. Lena Closed It.
Corner the small enemy. Strip away its options, and there is nowhere left to run. — The 36...
AI 资讯
The pros and cons of using Apple AirTags
AirTags are great, but there are competing trackers that offer handy features and unique form factors.