RAG with Postgres and pgvector in production: from PoC to SLO
Embeddings, HNSW indexing, reranking, evaluation, context window, latency under load. Full stack with code and measurable SLOs.
Category
Methodologies that respect your time: lightweight processes for small teams.
Embeddings, HNSW indexing, reranking, evaluation, context window, latency under load. Full stack with code and measurable SLOs.
This guide shows how to build a production-ready agent with the Anthropic SDK in Python: the tool-use loop with the Messages API, streaming with backpressure via a bounded queue, prompt caching with cache_control, your own MCP server registered with the Claude Agent SDK, OTel GenAI traces, and a non-root Docker container ready for production.
Using an LLM to judge another LLM became widespread in 2024 and remains, in 2026, the only scalable way to evaluate qualitative quality in LLM systems. It is reliable when judge-human correlation exceeds 0.7 on 30 cases and gets recalibrated quarterly; below that threshold, do not trust the number.
Opus 4.7 launched as Anthropic's most capable model, with emphasis on long-horizon agentic work. After two months of intensive use, these are the practical changes versus Opus 4.6.
The first invoice for a production agent usually runs double or triple the estimate. This article walks through five real levers, in priority order, caching, routing, context control, batching, and telemetry, to cut cost without touching perceived quality.
After fourteen months testing AI-integrated DevOps tools across several teams, the stack that stays is small: Claude Code, Cursor, and Aider for code; PagerDuty AIOps, Datadog Bits AI, and Grafana Assistant for alert triage; and OpenTofu with OPA for infrastructure generation bounded by policy rules.
AI agents fail in production, and what matters is how you respond in the first twenty minutes. This runbook covers severity classification, isolating before investigating, purging contaminated memory, communicating without inventing facts, and turning every incident into a regression test before closing it as done.
LLM red teaming has gone from an esoteric activity to a mandatory practice. With the OWASP Agentic Top 10 and the CSA Agentic AI Red Teaming Guide converging on shared vocabulary, this is the operational playbook any team deploying agents needs to have.
Reliable agents come from measurement, not from better models or prompts. A production agent evaluation setup starts with a golden dataset of 30 to 200 cases, split roughly 60 percent normal usage, 30 percent edge cases and 10 percent adversarial, and it never uses the same model as both worker and judge.
The RICE framework is a prioritization methodology created by Intercom that produces a score by combining four factors: Reach, Impact, Confidence, and Effort. It divides the product of the first three by the estimated effort in person-months, so it can compare unrelated initiatives using one objective number.
Prompt engineering has moved from viral tricks to a discipline with reproducible patterns: few-shot, chain-of-thought, and structured output with function calling. Teams treating prompts like code (versioned, tested, and monitored) get consistently better results than those who improvise.
Two years after the final NIST standards, post-quantum migration is no longer hypothetical. What has actually been migrated, what remains stuck, where the real operational problems lie, and how the timelines look from April 2026.
After two years of pilots and a year of agents in production, governance has moved from an aspirational committee to an operational control. What audits ask for, what broke in 2025, and which guardrails absorb most incidents.
By late 2025, 57.3 percent of organizations had agents in production, up from 51 percent a year earlier, according to LangChain's survey of more than 1,300 professionals. Three failure modes dominate the postmortems: degenerative reasoning loops, hallucinated data in RAG systems, and silent misalignment between the request and the interpretation.
Platform engineering worked where teams built on concrete, painful problems and offered golden paths developers actually wanted, run with a product mindset. It stalled where the output was an empty Backstage portal: technically correct, unvisited, solving no operational problem. Three years after the Gartner hype of 2023, that split separates the winners from the sunk cost.
FinOps for AI counts different units than classic cloud FinOps: tokens, calls, computed embeddings and GPU time, all of which scale nonlinearly with use. The costliest habit is sending everything to frontier models; 40 to 70 percent of those calls run on mid-tier models with no noticeable quality loss. Uncached RAG and self-recursing agents do the rest.
Sixteen months after Anthropic first shipped computer use, with browser-use, OpenAI Operator and Gemini Computer Use all pushing in parallel, agents that drive the browser and desktop have moved from demo to real workflows. Time to review which patterns survive when you run them daily in production.
A selection of postmortems published between 2025 and 2026 by teams running AI systems in production reveals repeated patterns: guardrail failures, silent model drift, hidden vendor dependency, and a collection of near-misses worth distilling.
Two years in, AI helps product discovery in one place above all: synthesizing interview transcripts. Generating hypotheses without real data has failed repeatedly, and simulated users produce systematic false positives about adoption. The practices that stick keep a human doing the critical analysis, because AI amplifies a good process and speeds a bad one toward failure.
Carbon aware scheduling delivers savings in proportion to how much of your workload can move in time or geography. If under 20 percent of it is elastic, cluster-wide gains stay modest. Deferrable jobs do best, cutting carbon intensity 15 to 30 percent: nightly batch, model training, CI builds and tests, report generation, video rendering.
Among the AI features in SRE dashboards, alert correlation is the one with demonstrated value: it groups dependent alerts from a single incident, cutting time to acknowledge and fatigue during a crisis. Automatic incident summaries help too. The real problem was never a shortage of information, it was separating signal from noise and correlating scattered symptoms.
Large language models have spent two years promising effortless documentation for code, APIs and architecture. After watching dozens of projects try it, clear patterns emerge for where it works and where it just becomes more debt.
Guardrails frameworks promise to filter language-model inputs and outputs to block data leaks, harmful content, or hallucinations. After evaluating four of the most popular ones in production, I cover what they actually do, what latency and billing cost they add, and when they pay off over simpler controls.
Agents that chain calls to models, tools and memory are hard to debug without instrumentation designed for them. After a long year running agents in production, I cover what to measure first, which standards are consolidating, and which costly mistakes are avoided by getting the traces right from the start.
After three years of expansion and an overheated ecosystem around the term, platform engineering enters 2025 in a consolidation phase. The internal platforms that survive are the ones that understood their real function; those that mistook the label for the solution are dismantling their teams or cutting them drastically.
AI testing breaks the assumption every automated suite was built on, because the same input no longer produces the same output. Anthropic documents that temperature 0.0 is still not fully deterministic, and OpenAI's seed parameter only promises mostly reproducible results. What works instead is a layered belt of checks that catches regressions without tripping over ordinary variance.
Four years ago it was an academic curiosity. Today, scheduling workloads by grid carbon intensity is a built-in option in Kubernetes, in several cloud provider services, and in CI tooling. We look at what genuinely changed and what is still more promise than practice.
Generative AI helps user research most in transcription, where it reliably saves hours, and in early note synthesis and discussion guide drafting. It does not replace real participants: synthetic personas return plausible answers rather than the genuine surprises interviews produce. Verify every quote in a final deliverable against the original transcript before anyone acts on it.
OpenSSH added hybrid post-quantum key exchange with ML-KEM in version 9.9 and made it the default algorithm in 10.0. The question is no longer whether to migrate SSH to post-quantum, but how to do it without breaking old clients: enable the hybrid mode, keep a classical fallback, and verify with ssh -v that the active algorithm is the right one.
Computer Use in production works today for narrow, repetitive interface tasks where a human still checks the result. Anthropic shipped it in October 2024 calling it experimental and error-prone, and nine months on that framing still holds: teams run it on real work by constraining scope, not by trusting it end to end.
AI agents are starting to earn a real place in continuous integration pipelines: reviewing diffs, proposing fixes, generating missing tests. Six months of real-world use to separate the patterns that work from the ones that end up costing more time than they save.
Continuous profiling with eBPF samples every process's execution stack every few milliseconds without touching the code, then stores the history so you can compare last week's performance with today's. The cost measured in production runs between 1% and 3% of CPU, and it pays off most in databases, API gateways and high-concurrency services.
Seven years on, the Site Reliability Workbook still earns its place in small teams through a handful of patterns: SLOs set slightly below what you already achieve, so the error budget is real and negotiable; a 28 to 30 day rolling window; and blameless postmortems that drop punishment while keeping accountability.
In AI systems the real cost is not EC2 instances but input tokens in RAG and agents, chained tool calls, and frequent reindexing; those vectors, plus unattributed experimental spend, concentrate most of the monthly production bill.
Continuous RAG evaluation catches the quiet kind of failure: the system never goes down, never returns errors, never trips a latency alert, it simply answers worse as the index, the model, and user questions drift. Track retrieval precision, effective recall, faithfulness to the retrieved context, answer relevance, and p99 latency.
VEX, the Vulnerability Exploitability eXchange, is a structured way for a vendor to state whether a CVE listed in an SBOM actually affects a product. Log4Shell in December 2021 showed why it exists: countless Java applications carried that critical CVE while never loading the vulnerable class. VEX marks which vulnerabilities are not exploitable, so scanner noise becomes signal.
AI agents have moved from a lab curiosity to serious SDKs from three major providers. A reflection on moving from the flashy demo to an internal use case that shifts a real, measurable metric.
Semgrep has grown into one of the most pragmatic static analyzers in the ecosystem. A look at why it works where other SAST tools fail, and how to fit it into a pipeline without turning it into noise.
Two years after Zero Trust stopped being a marketing word, it is worth looking at how it connects with the SIEM teams run day to day. A look at useful signals, avoidable noise, and the decisions that actually change security posture.
AI governance in a company means a standing committee, written policies, a model and use-case inventory, risk assessment, and audits. The first provisions of the EU AI Act took effect on 2 February 2025, banning practices such as social scoring and requiring minimum AI literacy for staff. Fines reach 35 million euros or 7 percent of global turnover.
Dependabot and Renovate chase the same goal with different philosophies. I compare both after years running them on my own and client projects, covering when one fits better and when the other suits a team's workflow more.
A year ago open weights were a gamble; today they are a real production option. I review what has worked, what has not, and how Llama, DeepSeek, Qwen, and Mistral are fitting into enterprise architectures that used to depend on closed APIs.
Two years into living with AI assistants in the editor, habits have settled. A reflection on what has changed in day-to-day coding, what has been learned, and what was still left to discover.
Three years after RLHF became popular, the model-alignment field is far richer. A review of RLHF, DPO, and newer methods such as KTO and ORPO, with criteria for choosing between them.
SLSA v1.0 splits software supply-chain security into three tracks (Build, Source, and Dependencies), of which only Build is stabilized, with three levels: L1, L2, and L3. If you build in GitHub Actions, reaching L2 with Sigstore-signed provenance takes a few hours and is the starting point I recommend to any team.
Measuring RAG quality rigorously takes more than skimming a handful of answers: it requires objective metrics (faithfulness, relevance, context precision, and coverage), a golden set of hundreds of curated questions, and regular human validation of the LLM judge to avoid misleading conclusions.
Software is not immaterial: every request and database query consumes electricity with a carbon footprint. The Green Software Foundation encodes eight practical principles to reduce that footprint without rewriting systems. The result is a more efficient service, a lower cloud bill, and readiness for ESG regulation.
LLM applications need three distinct observability planes: prompt and response traces for debugging hallucinations, per-token and per-feature cost tracking, and response quality evaluation. Mature tools like Langfuse, LangSmith, and Helicone cover all three planes with specific instrumentation.