agentleFS
saitarrunsaitarrun/Devforge-ai/skills/llm-evals/SKILL.md

llm-evals

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Architecture standards, evaluation metrics, cost budget controls, and security guardrails for LLM, RAG, and Agentic features.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

LLM & RAG Application Engineering Skill

This skill defines industry standards for developing, evaluating, and operating LLM, RAG, and AI Agent features cleanly.

Core Architectural Pillars

1. Evaluation & Benchmarking (Evals)

  • Deterministic Evals: Assert output schema validity (Zod/Pydantic validation).
  • Model-Graded Evals: Evaluate accuracy, grounding (faithfulness), hallucination rate, and context relevance using LLM-as-a-Judge.
  • RAG Triad:
    • Context Relevance (Retrieval quality)
    • Groundedness (LLM stays within retrieved context)
    • Answer Relevance (Output addresses user prompt directly)

2. Token & Cost Budget Guardrails

  • Max Token Limits: Hard limit max response tokens per prompt.
  • Circuit Breakers: Halt downstream requests if daily/hourly token expenditure exceeds set threshold.
  • Semantic Caching: Store prompt/embedding responses in Redis/pgvector to eliminate redundant LLM calls.

3. AI Security & Safety

  • Prompt Injection Defense: Sanitize user inputs; separate system instructions from untrusted user content.
  • PII Scrubbing: Redact secrets, emails, SSNs, and credit card numbers before sending payloads to LLM APIs.
  • OWASP Top 10 for LLMs: Guard against Insecure Output Handling, Excessive Agency, and Data Poisoning.

Checklist for Feature Slices with has_llm: true

  • Schema validation for structured output (JSON mode / Tool Call response parsing)
  • Fallback model strategy (e.g., fallback from primary model to secondary model on rate limit)
  • OpenTelemetry LLM tracing (LangSmith / Helicone / Phoenix / OTel instrumentation)
  • Token usage logging and latency tracking
  • Eval dataset created with at least 10 gold-standard ground truth examples

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.