Agent skill

eval-frameworks

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/cuba6112/skillfactory/tree/main/skills/eval-frameworks

SKILL.md

Evaluation Frameworks

Overview

Traditional software metrics (accuracy, F1) fail to capture the quality of LLM outputs. Evaluation frameworks like Ragas and DeepEval use "LLM-as-a-judge" to quantify subjective qualities like faithfulness, relevance, and professionalism.

When to Use

  • RAG Benchmarking: To verify if answers are supported by retrieved context (Faithfulness).
  • Regression Testing: Ensuring that a prompt change or model upgrade doesn't break existing behavior.
  • Synthetic Benchmarking: Creating evaluation sets when manual gold-standard data is unavailable.

Decision Tree

  1. Do you want to check for hallucinations?
    • YES: Run a Faithfulness metric.
  2. Is the retrieved context actually useful for the question?
    • YES: Run a Retrieval Relevance metric.
  3. Do you need to scale evaluation without manual labeling?
    • YES: Use Synthetic Data Generation.

Workflows

1. Evaluating RAG Faithfulness

  1. Capture the query, the retrieved_context, and the actual_output from the system.
  2. Run a Faithfulness metric (from Ragas or LlamaIndex) which uses an LLM to verify if the output claims are supported by the context.
  3. If the score is low, investigate whether the context was irrelevant or the model hallucinated.

2. Unit Testing LLM Outputs (DeepEval)

  1. Install deepeval and create a test file test_example.py.
  2. Define an LLMTestCase with input, actual_output, and expected_output.
  3. Apply a GEval metric with a custom criteria (e.g., 'professionalism').
  4. Run deepeval test run to assert that the score meets the defined threshold.

3. Automated Question Generation

  1. Point the evaluation framework (e.g., LlamaIndex) at a set of source documents.
  2. Use the QuestionGeneration module to synthetically create test cases (question-context pairs).
  3. Run the RAG pipeline against these generated questions to benchmark performance across the entire dataset.

Non-Obvious Insights

  • LLM-as-a-Judge: A stronger model (GPT-4o) can effectively grade a smaller/faster model (Llama 3) with human-like accuracy using research-backed metrics like GEval.
  • Separation of Concerns: Good evaluation splits into 'Response' (was the answer good?) and 'Retrieval' (did we find the right docs?). Fixing one doesn't always fix the other.
  • Synthetic Scaling: Manual evaluation doesn't scale; using an LLM to generate 1000 edge cases from your data is the only way to reach high production confidence.

Evidence

  • "Faithfulness: Evaluates if the answer is faithful to the retrieved contexts (in other words, whether if there’s hallucination)." - LlamaIndex
  • "GEval is a research-backed metric... for you to evaluate your LLM output's on any custom metric with human-like accuracy." - DeepEval
  • "Traditional evaluation metrics don't capture what matters for LLM applications." - Ragas

Scripts

  • scripts/eval-frameworks_tool.py: Script defining a Faithfulness evaluation loop.
  • scripts/eval-frameworks_tool.js: Node.js simulation for calculating relevance scores.

Dependencies

  • ragas
  • deepeval
  • llama-index

References

  • references/README.md

Expand your agent's capabilities with these related and highly-rated skills.

cuba6112/skillfactory

prompt-engineering

Comprehensive prompt engineering techniques for Claude models. Use this skill when crafting, optimizing, or debugging prompts for Claude API, Claude Code, or any Claude-powered application. Covers system prompts, role prompting, multishot examples, chain of thought, XML structuring, long context handling, extended thinking, prompt chaining, Claude 4.x-specific best practices, and agentic orchestration including subagents, agent loops, skills, MCP integration, and multi-agent workflows.

0 0
Explore
cuba6112/skillfactory

adk-rag-agent

Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.

0 0
Explore
cuba6112/skillfactory

headless-cli-agents

Build agentic systems using Claude CLI in headless mode or the Claude Agent SDK. Use when building automation pipelines, CI/CD integrations, multi-agent orchestration, or programmatic Claude interactions. Covers CLI flags (-p, --output-format), session management (--resume, --continue), Python SDK (claude-agent-sdk), custom tools, and agent loop patterns.

0 0
Explore
cuba6112/skillfactory

notion-knowledge-capture

Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.

0 0
Explore
cuba6112/skillfactory

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

0 0
Explore
cuba6112/skillfactory

gh-fix-ci

Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results