/images/avatar.png

RAG Evaluation Guide

A RAG system can look great in demos, then return a confident wrong answer from an unrelated document. Without quantitative evaluation the bug stays invisible. An evaluation framework belongs in place before production, otherwise users find the failures first.

LLM Observability in Practice

Langfuse is for this scene: the LLM service is live and users are complaining about output quality. Open the monitoring dashboard — CPU normal, memory normal, P99 latency within SLA. From an infrastructure perspective, the service looks perfectly healthy. This is the LLM observability gap: traditional APM tools can tell if the system is healthy, but not if the AI is.

Prometheus + Grafana Monitoring for LLM Services

An LLM process that “looks fine” on CPU is often already serving a worse model, a slower first token, or a truncated completion. Prometheus + Grafana will show requests; a default node dashboard will not show tokens, TTFT, or a model label exploding cardinality.

The path is scrape → query → rules → panels. Every llm_* name below is an example metric name, not a standard export from Prometheus or from any particular gateway. Match /metrics before copying queries.

Python Best Practices

Production Python locks the interpreter and pyproject.toml before talking about asyncio or speed. Types, tests, and a lockfile are the default, not extras. No “faster” or “production-grade” without a measured comparison.

AI Agent Security in Production

OWASP is watching this: AI Agents are expanding their capability boundaries rapidly — writing code, executing commands, calling external APIs, querying databases. The more capable they become, the larger their attack surface.

In 2024, Anthropic research demonstrated that LLMs can retain backdoor behaviors even after standard safety training. OWASP listed prompt injection as the #1 threat to LLM applications. Deploying AI Agents in production means security is not optional.