惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
P
Palo Alto Networks Blog
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
AWS News Blog
AWS News Blog
J
Java Code Geeks
博客园_首页
Scott Helme
Scott Helme
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
V
Visual Studio Blog
Cloudbric
Cloudbric
Jina AI
Jina AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
The Last Watchdog
The Last Watchdog
SecWiki News
SecWiki News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
W
WeLiveSecurity
K
Kaspersky official blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
量子位
Google Online Security Blog
Google Online Security Blog
博客园 - Franky
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - 三生石上(FineUI控件)
Recent Commits to openclaw:main
Recent Commits to openclaw:main

Hacker News - Newest: "LLM"

GitHub - lechmazur/position_bias: A benchmark for testing whether LLM judges keep the same preference when two lightly edited versions of the same story are shown in opposite orders. Flex routing (EU and EFTA) Dark Factories: Retooling for LLM Velocity Ask HN: What would be the impact of a LLM output injection attack? GitHub - AronDaron/dataset-generator: No-code desktop app for generating high-quality synthetic datasets to fine-tune LLMs — plan-then-execute pipeline, LLM-as-judge, HuggingFace upload. GitHub - Oaklight/llm-rosetta: Production-ready LLM API translation layer for Python — bidirectional conversion between OpenAI, Anthropic & Google formats via hub-and-spoke IR. Optional API gateway. Streaming & non-streaming. Zero core deps. Contributions welcome! GitHub - browser-use/browser-harness: Self-healing browser harness that enables LLMs to complete any task. GitHub - moeen-mahmud/remen: Remen turns thoughts into something you can return to Analyzing 156 LLM Launch Posts on Hacker News ChatGPT vs Gemini vs Claude: The Best LLM Subscription You Should Buy GitHub - salaamalykum/quran-semantic-search: High-density RAG Semantic Search Engine & Quran Corpus (GEO/SEO Architecture) GitHub - NVIDIA/TensorRT-LLM: TensorRT LLM provides users with an easy-to-use Python API to define Large Language Models (LLMs) and supports state-of-the-art optimizations to perform inference efficiently on NVIDIA GPUs. TensorRT LLM also contains components to create Python and C++ runtimes that orchestrate the inference execution in a performant way. The State of LLM Bug Bounties in 2026 Operational Readiness Criteria for Tool-Using LLM Agents Meshcore: Architecture for a Decentralized P2P LLM Inference Network How an LLM becomes more coherent as we train it GitHub - seetrex-ai/laimark GitHub - Jossifresben/BibCrit: AI-assited biblical textual criticism GitHub - wastedcode/memex: File system based wiki, maintained by Claude 99helpers.com GitHub - cliver-project/AITrigram GitHub - unbody-io/adapt: A self-evolving memory layer for AI agents. GitHub - hb20007/awesome-gen-ai-fails: A list of incidents where reliance on generative AI and LLMs resulted in harm to companies, individuals, or society GitHub - nevenkordic/localmind: Run any local LLM with persistent memory and context. CLI agent over Ollama with SQLite-backed hybrid recall. No cloud. Ask HN: What are the machine requirements for a LLM like Llama-3.1-8B? Faster LLM Inference via Sequential Monte Carlo grpo explained: group relative policy optimization for llm finetuning - cgft Stop comparing price per million tokens: the hidden LLM API costs · TensorZero Andrej Karpathy's LLM Wiki Is a Bad Idea GitHub - GG-QandV/mnemostroma: Offline RAM-first cognitive leer/coprocessor for AI agents and robotics. Solves "Context Abandonment" with 20-80ms latency using a dual-thread biomimetic memory architecture (ONNX + SQLite WAL). mempalace/agent at agent · skorotkiewicz/mempalace GitHub - Nyquest-ai/nyquest-rust-fullstack-pub: Nyquest — Semantic Compression Proxy for LLMs. 350+ rules, local LLM stage, 15-75% token savings. Full Rust stack. GitHub - TheoV823/mneme: Enforce architectural decisions in AI-assisted development. GitHub - klemenvod/TokenBrawl: A 1v1 Bomberman-style game where two LLM agents play autonomously against each other. No human plays — you watch the AIs fight. Each agent receives a text description of the board state, reasons about it, and outputs a move as JSON. The game engine executes it. Introducing the Common AI Provider: LLM and AI Agent Support for Apache Airflow Power Circuit AI: Designing Power Electronic Circuits for Motor Drives with Generative Artificial Intelligence Ask HN: How to program with IDE and LLM on CPU locally? Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community The LLM Fallacy: Misattribution in AI-Assisted Cognitive Workflows Ask HN: Simple tooling for local LLM code critique without IDE integration? Can a General LLM Diagnose a DICOM Slice? A 10-Case Public Benchmark Charts-of-Thought: Enhancing LLM Visualization Literacy (PDF, 2026) GitHub - Mesh-LLM/mesh-llm: Distributed AI/LLM for the people. Share compute privately or publicly to power your agents and chat. GitHub - seamus-brady/springdrift: A persistent runtime for long-lived LLM agents Writing an LLM from scratch, part 32k -- Interventions: training a better model locally with gradient accumulation Ask HN: Which LLM model and agentic CLI are you using for local development? GitHub - wayneColt/modelcascade: Route local. Escalate smart. Never overspend. Open-source multi-model cascade routing for autonomous agents. LLM pricing is 100x harder than you think GitHub - asakin/llm-primer: Pre-warmed Claude Code sessions in tmux. No startup wait. GitHub - EggerMarc/chat-rs: A multi-provider LLM framework for Rust. GitHub - SynapseKit/SynapseKit: Minimal, async-first Python framework for production LLM apps- 2 hard deps, no magic, no SaaS. A Claude Skill that Makes LLM Paragraphs More Bearable Does Gas Town 'steal' usage from users' LLM credits & paid services to improve itself? What's Claude Code Actually Doing? Open the Black Box with the Arthur Engine Milla Jovovich's New Open Source LLM Memory App and the Dark Code Problem Your intuition of LLM token usage might be wrong Show HN: Bloomberg Terminal for LLM ops – free and open source GitHub - 0xchamin/mcptube: Transform YouTube videos into a compounding knowledge base with transcripts, vision analysis, and agentic search. Works as an MCP server for Claude, Copilot & more. Show HN: Open KB: Open LLM Knowledge Base Your LLM is a compiler, not a runtime GitHub - sapountzis/Unslop: A Web Feed That Deserves You crates.io: Rust Package Registry Beyond Karpathy's LLM-Wiki: The Necessity of Cognitive Governance GitHub - amitshekhariitbhu/llm-internals: Learn LLM internals step by step - from tokenization to attention to inference optimization. GitHub - parallem-ai/parallem: An expressive library for running agents with the Batch API. GitHub - stfurkan/pi-llm LLM-Wiki Show HN: Formal – Formal verification for AI-generated code using Lean 4 LRTS – Regression testing for LLM prompts (open source, local-first) LLM Wiki Skill: Build a Second Brain with Claude Code and Obsidian I built an LLM Wiki and RAG solution: here's a demo for a security KB The biggest advance in AI since the LLM Predict-Rlm: The LLM Runtime That Lets Models Write Their Own Control Flow the-synthetic-library/the-synthetic-mind at main · joshferrer1/the-synthetic-library GitHub - yisding/reviewwiggum GitHub - Donnyb369/mcp-spine: Context Minifier & State Guard — Local-first MCP middleware proxy GitHub - Beledarian/wgpu-llm: A from-scratch LLM inference engine that uses wgpu (the cross-platform WebGPU implementation) to dispatch WGSL compute shaders for every math operation a Transformer needs. No CUDA. No Python. No massive framework dependencies. Just Rust, raw shaders, and your GPU. GitHub - anitiue/Hindsight: An experience-driven self-improvement framework for LLM agents — 基于经验的 LLM Agent 自我改进框架 GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. GitHub - alainnothere/AmdPerformanceTesting: Amd Performance Testing Ask HN: Is a purely Markdown-based CRM a terrible idea? Optimized for LLM agents Context Engineering - LLM Memory and Retrieval for AI Agents | Weaviate little_helper_tui/letter.md at main · sleepyeldrazi/little_helper_tui GitHub - EvanZhouDev/umr: The Unified Model Registry for all your local AI apps. GitHub - JordanCT/VigIA-Orchestrator Your Agent Is Mine: Measuring Malicious Intermediary Attacks on the LLM Supply Chain A Taxonomy of RL Environments for LLM Agents Llama LLM Network Feture GitHub - genedeng-ca/ai-mac-migration: AI-powered Mac-to-Mac migration tool - replace Apple Migration Assistant with intelligent, selective transfer using local LLMs GitHub - lunargate-ai/gateway: High-performance self-hosted AI gateway (OpenAI-compatible) with routing, retries, and streaming GitHub - AuthBits/webmcp: A lightweight, prompt-driven MCP web research server for high-quality LLM powered information extraction. Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering Springdrift: An Auditable Persistent Runtime for LLM Agents with Case-Based Memory, Normative Safety, and Ambient Self-Perception High-Stakes Personalization: Rethinking LLM Customization for Individual Investor Decision-Making From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents HUOZIIME: An On-Device LLM-enhanced Input Method for Deep Personalization TIDE: Token-Informed Depth Execution for Per-Token Early Exit in LLM Inference Characterizing WebGPU Dispatch Overhead for LLM Inference Across Four GPU Vendors, Three Backends, and Three Browsers LLM Targeted Underperformance Disproportionately Impacts Vulnerable Users
Good LLM Dev and Usage Patterns
_QrE · 2026-06-01 · via Hacker News - Newest: "LLM"

Introduction

This is a list of patterns regarding usage of LLMs (Large Language Models) that I’ve observed result in positive outcomes. I’ve split them into two categories:

  • Usage, for patterns used in systems that are partly agentic, i.e. the system utilizes LLMs during its operation. The examples given are focused on coding agents, but they are generally applicable.
  • Development, for patterns used during software development

If the category split feels arbitrary, feel free to ignore the (ir)relevant headings.

Usage Patterns

Criticism helps LLMs too

The actor/critic pattern is where input is given to one LLM agent, called the ‘Actor’, and the output of that is fed into a different LLM agent, called the ‘Critic’. The process is iterative; the Critic is instructed to be stringent in what they accept, and failure to meet their standards results in the actor being given the Critic’s feedback, and asked to produce a better result.

This can be an expensive way to dramatically increase the quality of output, similar to the “four eyes” method / pair programming. Note that the model(s) used, and any processing of the context, are implementation details. It is a good idea to keep track of decisions made by the system in a way that persists across iterations, such that the agents gradually refine the approach with a decreasing set of changes each time, until the Critic fully approves.

An alternative (or complement, if you have infinite budget) of this is to generate multiple responses to each prompt, and pick the best one. I believe that is not good practice, as it does not scale very well, and iterative improvements generally pay off better vs attempting to pick between what most often is different ways of expressing a very similar one-shot result. The tokens you spend on the critic + an additional iteration are therefore more efficiently spent than the tokens on multiple permutations of any given step.

Minimize the context needed to accomplish each task

Humans split work into tasks. Each one is a building block towards creating a bigger piece of software. Agents too should only receive the information they need to accomplish one (relatively) small task at a time.

In practice, this means that the documents that the agent needs to read to get up to speed are concise, the agent’s harness only has the necessary tools that the agent needs to do their job, and QA / testing / deployment are separate concerns from development. The more each agent has to do, the more opportunities they have to forget or deviate from their assigned tasks.

This also ties in with good privacy & security practices: You don’t need the agent to read or provide e.g. user IDs to call a tool, your software can provide that info itself when the call is made. This both makes it easier for the agent to call a tool, because less tokens are needed to call it successfully, and prevents the agent from having to handle confidential information.

Making sure that the agent needs to output the minimum number of tokens to accomplish something makes the likelihood of success higher (in general at least, with diminishing benefits). In general, the less the agent is expected to do (at least, per invocation), the higher the likelihood of the agent producing an acceptable result. As the software being built starts to take shape, the context needed to make even a small change will naturally increase. Keeping the increase minimal ensures that agents can work cheaper (less tokens of context), faster (less tokens to process) and better (greater likelihood of producing good results).

Be cautious and defensive

On a less positive note, remember that what an agent can do, it should be expected to (eventually) do. So never give any agent enough rope to hang you with, because it is not impossible that it might.

It is important to expect that the agent will abuse anything given to it, especially if it ever misinterprets an instruction. Some providers suggest having a second LLM assess users’ prompts before sending them to your agent. This does make attacks harder, but not impossible, and it should not be considered a robust defense on its own. A better approach is to never give access to extremely damaging tools to agents, make the tools require user confirmation, or have the agent work in an environment where any damage that it does can be easily reverted (which technically makes the tools provided to the agent not extremely damaging, but if I don’t mention sandboxes explicitly someone might think I forgot).

Do note that having tools require user confirmation is not ideal if it will be frequently requested, as humans quickly get alert fatigue. If you cannot reliably alert humans to only the agents’ actions that are impactful enough to require a second set of eyes, instead opt for not giving the agent access to damaging tools in the first place.

Regarding defensiveness, imposing constraints on what valid agent output looks like, that are simple enough to be checked deterministically (i.e. enforcing that a field only takes a number), means that you can catch simple mistakes that the agent could make and re-prompt the agent gracefully, without surfacing errors to the user. Forcing structured output out of agents also helps with parsing it more easily, which can be extremely important - having agents embody the robustness principle helps with making sure that your system is robust.

An easy example of both minimizing context and being defensive is having a coding agent’s harness run formatting, linting, and static analysis tools once the agent commits a set of changes to the Version Control Software (VCS) of choice. This absolves the agent of the responsibility of running the quality/testing pipelines itself, and the user from having to trust the agent to follow good development practices.

You don’t have to use the latest and greatest

State-Of-The-Art (SOTA) LLMs are very good. They are also very expensive. If you do not have a task that warrants using them, opt for something cheaper. If you can have agents produce a non-agentic solution to the problem, even better.

A lot of times, a better harness / prompt / process can provide a meaningful boost to the performance of LLMs. Unless someone is forcing you to spend tokens, you should be mindful of your expenditure, because LLMs are not free, and cost-efficient solutions could mean your bill has one less zero tacked on.

In certain cases, there may not be a need to add LLMs to a process at all. Taking a step back might reveal a better way to architect a process or a system that is simpler, and more efficient, than what currently exists. If you can simplify a process to the point where no intelligence is needed to perform it, automating it will be cheaper, faster, and more reliable than using AI.

Mind the compaction

There are many context reduction strategies that can be implemented, depending on what the agent is doing. Assuming that you will not hit the context window limit is bad practice; compaction should be an explicit consideration. Keeping the context amount low tends to give better results; minimal instructions are easier to follow well.

Tool calls and results are (typically) less useful than the accompanying thought stream. If you compact on a value-of-each-token-in-the-output basis, removing the tool calls and outputs of all-but-the-last-X invocations helps maintain coherency for longer.

All types of context compaction are lossy; even if the text can be compacted while preserving all the information/meaning, the semantics will change, which might have an impact on future responses. So there is pressure to delay compaction as much as possible. Summarizing all but the latest X messages is preferable if the agent works on a task in ‘chunks’, to try and preserve recent reasoning and maintain the agent’s current course better. Different approaches will have different costs, and minding how cached tokens work & are priced is important.

There is no compaction strategy that is clearly better than all the others, since a lot will depend on budget and use-case. You can drop messages, drop tokens, summarize, ask users to start a new session, or anything else as appropriate.

Development Patterns

A failure to plan is a plan to fail

You need to have a good idea of what success looks like before you begin work. If you do not, you will not be able to draft a comprehensive enough plan for agents to execute. If you do not draft a comprehensive plan before you ask agents to execute, you will get bad and/or incomplete solutions. For toy projects, that can be acceptable. For production stuff, that will mean that your agent will forget to turn off anonymous signup/login in your SaaS app, it will wire things ten different ways using JavaScript libraries whose creators forgot they exist, a crash at 0100 will result in having to re-deploy everything from scratch when you wake up, and the occasional data loss will mean that you inadvertently meet your GDPR obligations.

Restated a bit more clearly: For tasks that warrant more than a throwaway script, build a comprehensive plan, and iterate on it until neither you nor your agent(s) can find anything more (of substance) to consider. One more idiom, for the road: An ounce of prevention is worth a pound of cure.

Test away uncertainty

There are a lot of unknown unknowns when it comes to development. Creating a lot of Proof-of-Concept (PoC) scripts to test aspects of the approach is cheap, and can surface issues before committing to writing production-ready code. PoCs can also help document why certain decisions were made, as they can, for example, demonstrate performance and usability differences between libraries.

Any decision you neglected to opine on, agents will decide for you. If your overall plan is not made clear enough, some decisions could accelerate the accumulation of tech debt and result in increased code churn. It is important to have a good idea of what is important and what is not. What is important should be tested, validated, and documented, what is unimportant can be left for the agent to decide.

Frequently do reviews and revisions

LLMs can also (help you) review code. If it’s been a while since a piece of code was looked at, ask an LLM if it’s well-written, if it has any bugs, if it can be improved, if a cautious and diligent senior-principal super 10x rockstar engineer would approve of it, if it was written today. Doing that a couple of times should surface most of the issues worth fixing, if any. Both people and LLMs make mistakes; adding more eyeballs surfaces bugs that were previously overlooked . Code does not have to languish abandoned once written; maintenance is now cheaper, so we should take advantage.

Write your own benchmarks

Benchmarks can be, and are, gamed by labs to get a higher ‘score’. In certain cases, content from the benchmarks could find its way into the training data, which makes the results of benchmarks dubious as LLMs can recall information very well . In some cases, benchmarks may be poorly constructed, allowing agents to ‘cheat’. In all cases, benchmarks test LLMs in a way that most likely will not match your own usage. It is therefore wise to test what models fit your use case the best, and most importantly, have some means of scoring them such that you can identify and use whatever model is good enough for your purposes, without over/under spending.

Scoring should not be based on vibes. There is a lot that goes into making a good benchmark, and a lot of details are going to vary based on use-case. If token costs are going to be a factor at any point (and they typically become one eventually), investing in figuring out what LLM is the most efficient for you is going to be worthwhile. Note that we have reached a point where for modern LLMs, using more tokens will almost always give better results, at least for tasks with defined acceptance criteria. There is, naturally, a limit to how much you can express per token. Make sure that you are aware of both your time and money budget(s), and be consistent with these across your benchmarks.

Testing your own harness/tools that the agent is meant to use is also really important, as you will be able to see if your tools help the agent perform better or worse than whatever baseline you have established.

Again, it is entirely possible that the best model for your use case is not the most expensive one available - do not default to any model just because it is popular.

Test multiple prompt/response iterations

LLM output is non-deterministic. You should definitely test agents’ responses to e.g. malicious prompts more than once, especially when using smaller models. You don’t need to collect a lot of samples, but you do need to be sure that your agentic pipelines work properly (much) more often than not.

Some thoughts

It is easy to both overstate and understate the impact of LLMs. Depending on what ‘good enough’ looks like, LLMs can accelerate output and help people ship more, faster. The quality of engineering is not important to most people, as evidenced by the wide adoption of OpenClaw and derivatives . Organizations and individuals should decide for themselves how strict they want to be with setting a baseline for the quality of output shipped, at the cost of the speed at which the output is generated.