> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 득점자() 그만큼`getScorer()`메소드는 등록 키를 사용하여 Mastra 인스턴스에 등록된 특정 득점자를 검색합니다. 이 메서드는 채점자에게 형식이 안전한 액세스를 제공하고 요청한 채점자를 찾을 수 없으면 오류를 발생시킵니다. ## 사용예 ```typescript import { mastra } from './mastra' // Get a specific scorer by key const relevancyScorer = mastra.getScorer('relevancyScorer') const weatherAgent = mastra.getAgent('weatherAgent') // Use the scorer to evaluate an AI output await weatherAgent.generate('What is the weather in Rome', { scorers: { answerRelevancy: { scorer: relevancyScorer, }, }, }) ``` ## 매개변수 **key** (`string`): 가져올 스코어러의 등록 키입니다. Mastra 생성자에서 스코어러를 등록할 때 사용한 키와 일치해야 합니다. ## 보고 **scorer** (`MastraScorer`): 제공된 키와 연결된 MastraScorer 인스턴스입니다. ## 오류 처리 다음과 같은 경우 이 메서드에서 `MastraError`가 발생합니다. - 지정된 키를 가진 득점자를 찾을 수 없습니다 - Mastra 인스턴스에 등록된 득점자가 없습니다. ```typescript try { const scorer = mastra.getScorer('nonExistentScorer') } catch (error) { if (error.id === 'MASTRA_GET_SCORER_NOT_FOUND') { console.log('Scorer not found, using default evaluation') } } ``` ## 관련된 - [목록득점자()](https://mastra.zisheng.pro/ko/reference/core/listScorers): 등록된 모든 득점자를 가져옵니다. - [getScorerById()](https://mastra.zisheng.pro/ko/reference/core/getScorerById): id 속성으로 득점자를 가져옵니다. - [맞춤 채점자](https://mastra.zisheng.pro/ko/docs/evals/custom-scorers): 맞춤 채점자를 만드는 방법을 알아보세요.