> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 빠른 점검 빠른 확인은 "출력에 X가 포함되어 있음" 또는 "Tool Y라는 Agent"와 같은 일반적인 주장에 대해 구성 가능한 마이크로 점수 측정기입니다. LLM이 필요하지 않고 즉시 실행되며 동일한 네트워크에 연결됩니다.`scorers: [...]`다른 득점원처럼 배열합니다. ## 빠른 확인을 사용해야 하는 경우 빠르고 결정적인 어설션이 필요한 경우 빠른 확인을 사용하세요. - 출력 텍스트에 특정 문자열이 포함되거나 제외되는지 확인 - Agent가 특정 Tool을 호출(또는 회피)하는지 확인 - Tool 호출 순서 및 개수 제한 확인 - 비용이 전혀 들지 않는 바이너리 검사를 통한 게이트 CI 파이프라인 - 계층화된 평가를 위해 LLM 기반 채점자와 결합 주관적 또는 의미론적 평가의 경우 다음을 사용하세요.[LLM-based scorers](https://mastra.zisheng.pro/ko/docs/evals/built-in-scorers) instead. ## 빠른 시작 ```typescript import { checks } from '@mastra/evals/checks' import { runEvals } from '@mastra/core/evals' import { weatherAgent } from '../agents' const result = await runEvals({ data: [{ input: 'What is the weather in Brooklyn?' }], target: weatherAgent, scorers: [checks.includes('Brooklyn'), checks.calledTool('get_weather'), checks.noToolErrors()], }) console.log(result.scores) // { 'check-includes': 1, 'check-called-tool': 1, 'check-no-tool-errors': 1 } ``` ## 사용 가능한 수표 Quick Check는 다음 범주에 속합니다. ### 텍스트 확인 이 채점자는 Agent의 텍스트 출력을 평가합니다. | 검사 | 기능 | 점수 | | ------------------------ | ----------------- | --------------------------- | | `checks.includes(str)` | 출력에 하위 문자열 포함 | 1 또는 0 | | `checks.excludes(str)` | 출력에 하위 문자열 미포함 | 1 또는 0 | | `checks.equals(str)` | 출력이 문자열과 정확히 일치 | 1 또는 0 | | `checks.matches(regex)` | 출력이 정규식과 일치 | 1 또는 0 | | `checks.similarity(str)` | 문자열과의 Dice 계수 유사성 | 0-1(`threshold` 사용 시 이진 점수) | ### Tool 호출 확인 이러한 채점자는 Agent 실행에서 Tool 사용을 평가합니다. | 검사 | 기능 | 점수 | | ------------------------- | --------------------- | ------ | | `checks.calledTool(name)` | Tool이 N번 이상 호출됨 | 1 또는 0 | | `checks.didNotCall(name)` | Tool이 호출되지 않음 | 1 또는 0 | | `checks.toolOrder([...])` | Tool이 예상 순서대로 호출됨 | 1 또는 0 | | `checks.maxToolCalls(n)` | 전체 Tool 호출 횟수가 N회 이하임 | 1 또는 0 | | `checks.usedNoTools()` | Tool이 전혀 호출되지 않음 | 1 또는 0 | | `checks.noToolErrors()` | 오류가 발생한 Tool 호출이 없음 | 1 또는 0 | ## LLM 채점자와 수표 결합 한 번의 `runEvals` 호출에서 검사와 LLM 기반 채점자를 함께 사용하세요. 결정적 게이트에는 검사를, 정성적 평가에는 LLM 채점자를 사용하세요. ```typescript import { checks } from '@mastra/evals/checks' import { createFaithfulnessScorer } from '@mastra/evals/scorers/prebuilt' import { runEvals } from '@mastra/core/evals' import { myAgent } from '../agents' const result = await runEvals({ data: [ { input: 'What is the weather in Brooklyn?', context: ['Brooklyn weather data: sunny, 72°F'], }, ], target: myAgent, scorers: [ // Deterministic checks (instant, free) checks.includes('Brooklyn'), checks.calledTool('get_weather'), checks.excludes('error'), checks.noToolErrors(), // LLM-based scorer (semantic, costs tokens) createFaithfulnessScorer({ model: 'openai/gpt-5-mini' }), ], }) ``` ## 실시간 채점에서 수표 사용 지속적인 모니터링을 위해 Agent에 검사를 첨부합니다. ```typescript import { Agent } from '@mastra/core/agent' import { checks } from '@mastra/evals/checks' export const weatherAgent = new Agent({ id: 'weather-agent', name: 'Weather Agent', instructions: 'Answer weather questions using the get_weather tool.', model: 'openai/gpt-5.6-sol', tools: { get_weather: weatherTool }, scorers: { noErrors: { scorer: checks.noToolErrors(), sampling: { type: 'ratio', rate: 1 }, }, mentionCity: { scorer: checks.includes('Brooklyn'), sampling: { type: 'ratio', rate: 0.5 }, }, }, }) ``` ## 수표 작동 방식 각 검사는 `preprocess` 단계와 `generateScore` 단계를 가진 표준 `createScorer()` 인스턴스입니다. 다른 채점자와 동일한 [4단계 파이프라인](https://mastra.zisheng.pro/ko/docs/evals/custom-scorers)을 따릅니다. 1. **전처리**: Agent 실행에서 관련 데이터(텍스트 내용, Tool 호출)를 추출하고 정규화합니다. 2. **생성점수**: 전처리된 결과를 점수(일반적으로 이진수 1 또는 0)로 변환합니다. 검사는 `analyze`와 `generateReason` 단계를 건너뛰고 LLM을 호출하지 않으므로 마이크로초 단위로 실행됩니다. 각 검사의 모든 매개변수와 옵션을 포함한 전체 API는 [빠른 검사 레퍼런스](https://mastra.zisheng.pro/ko/reference/evals/checks)를 참조하세요. ## 관련된 - [빠른 확인 참조](https://mastra.zisheng.pro/ko/reference/evals/checks) - [내장 득점자](https://mastra.zisheng.pro/ko/docs/evals/built-in-scorers) - [맞춤 채점자](https://mastra.zisheng.pro/ko/docs/evals/custom-scorers) - [`runEvals()` 참조](https://mastra.zisheng.pro/ko/reference/evals/run-evals)