Langfuse LLM Observability Testing

Langfuse LLM Observability Testing is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 52 tokens per session (1,451 once invoked), scanned A, original, MIT.

A guide to observing and testing applications that use large language models (LLMs). Langfuse records requests, retrieval steps, generated answers, tool calls, costs, and response times so they can be evaluated.

In plain words
What is it for?
Use it to add Langfuse tracing, score model responses with automated checks, human reviews, or user feedback, build test datasets from real traces, and compare changes against them.
Why use it?
It turns real application traffic into test data and helps reveal quality regressions, expensive requests, slow responses, and problems that only appear across a conversation.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions Gemini CLI.

Good fit Use it to add Langfuse tracing, score model responses with automated checks, human reviews, or user feedback, build test datasets from real traces, and compare changes against them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pramoddutta/qaskills/langfuse-llm-observability
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PramodDutta/qaskills --skill langfuse-llm-observability
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Langfuse LLM Observability Testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/langfuse-llm-observability/github.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/langfuse-llm-observability)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/langfuse-llm-observability"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/langfuse-llm-observability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Langfuse LLM Observability Testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/langfuse-llm-observability"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/langfuse-llm-observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,451 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01451
Opus 5 $0.00026 $0.00726
Sonnet 5 $0.00010 $0.00290
Haiku 4.5 $0.00005 $0.00145

Measured 6d ago against content hash 12e6b2e3e46f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Langfuse LLM Observability Testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

seed-skills/langfuse-llm-observability/SKILL.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Langfuse LLM Observability Testing Skill

You are an expert AI quality engineer specializing in Langfuse. When the user asks you to instrument, monitor, or test an LLM application using traces and production data, follow these instructions.

Core Principles

  1. You cannot test what you cannot see. Tracing is the foundation: every request gets a trace with spans for retrieval, generations, and tool calls.
  2. Production is the best test set. Real traces feed datasets; datasets feed offline evals; evals gate changes. That loop is the whole practice.
  3. Score everything three ways. Automated LLM-as-judge scores at scale, human annotation for calibration, user feedback for ground truth.
  4. Sessions and users over single calls. Multi-turn quality problems only appear at session level.
  5. Costs and latency are quality metrics. Track them per trace; a regression in tokens-per-answer is a regression.

Setup

pip install langfuse            # python
npm install langfuse            # typescript
export LANGFUSE_PUBLIC_KEY=pk-...
export LANGFUSE_SECRET_KEY=sk-...
export LANGFUSE_HOST=https://cloud.langfuse.com   # or self-hosted URL

Instrumentation (Python)

from langfuse import Langfuse, observe

langfuse = Langfuse()

@observe()                       # creates a trace per call
def answer(user_id: str, session_id: str, query: str):
    langfuse.update_current_trace(user_id=user_id, session_id=session_id,
                                  tags=["support-bot", "prod"])
    chunks = retrieve(query)     # decorate with @observe() too: becomes a span
    reply = generate(query, chunks)   # generations auto-capture model, tokens, cost
    return reply

Decorate retrieval, reranking, generation, and tool calls separately; a flat trace cannot localize failures. Wrappers/integrations exist for OpenAI, LangChain, LlamaIndex, and the Vercel AI SDK; prefer them over manual spans.

Scoring: the Test Signal

# 1. User feedback from the app (thumbs up/down)
langfuse.create_score(trace_id=trace_id, name="user-feedback", value=0, comment="wrong policy quoted")

# 2. Automated LLM-as-judge on sampled traces (configure evaluators in the UI
#    or run your own job):
from my_judges import faithfulness_judge
for trace in fetch_traces(tags=["support-bot"], sample=0.1):
    score = faithfulness_judge(trace.input, trace.output, trace.metadata["contexts"])
    langfuse.create_score(trace_id=trace.id, name="faithfulness", value=score)

# 3. Human annotation queues in the UI for calibration batches

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 129 lines · 52 tokens per session scan A 12e6b2e3e46f

Subscribe to this mod's changes

Langfuse LLM Observability Testing is a skill published in the GitHub repository PramodDutta/qaskills (219 stars, last pushed 10d ago), licensed MIT. It adds 52 tokens to every session and 1,451 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

generate-rag-dataset

Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.

langwatch/langwatch · 51 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens

datasets

Generate realistic synthetic evaluation datasets by analyzing the user's codebase, prompts, production traces, and reference materials. Interactive and consultant-style. Asks clarifying questions, proposes a plan, generates a preview for approval, then delivers a complete dataset uploaded to LangWatch. Use when user…

langwatch/langwatch · 75 tokens

rag-eval

Use when the user has a RAG (Retrieval-Augmented Generation) system and wants to evaluate its quality — separating retrieval issues from generation issues. Also use when the user mentions RAG evaluation, faithfulness checking, hallucination detection in RAG, retrieval quality, chunking optimization, or "is my RAG…

agentscope-ai/OpenJudge · 86 tokens

rag-perf

Performance benchmarking for a deployed NVIDIA RAG Blueprint server: profiling pass + aiperf load test driven by a single YAML config. Not for accuracy / RAGAS scoring (use rag-eval) or for deploying / repairing services (use rag-blueprint).

NVIDIA-AI-Blueprints/rag · 56 tokens

session-rag-eval

Run and debug Chatbox session attachment RAG model evaluation with synthetic and real long-file fixtures.

chatboxai/chatbox · 25 tokens