Uses your evaluation promptIf you have a more complex evaluation prompt that you would like to run within Athina’s framework, we can support that with our CustomPrompt class.
Input: response, query, context, expected_response (whichever you specify in your prompt).
Type: boolean
Metrics: passed (0 or 1)
Example:Evaluation Inputs:
eval_prompt: “Think step-by-step. Based on the provided user query and refund policy, determine if the response adheres to the refund policy. User query: Refund policy: response: ”
query: “How many vacation days are we allowed?”
context: “Employees are allowed 15 holidays per year, and 5 days of paid leave.”
response: “Employees are allowed 20 vacation days per year, and 5 days of paid leave.”
Evaluation Results:
result: Fail
explanation: The response does not adhere to the refund policy provided. The refund policy is that employees are allowed 15 holidays per year, and 5 days of paid leave.
Simply use the CustomPrompt class and specify your own eval_prompt.
from athina.evals import CustomPrompteval_prompt = """Think step-by-step.Based on the provided user query, determine if the response answer the query correctly.If it does then result should be True else False. Add explanation if FalseUser query: {{query}}response: {{response}}"""data = [ { "query": "Where is France and what is it's capital?", "context": ["France is the country in europe known for delicious cuisine", "Tesla is an electric car", "Elephant is an animal"], "response": "Tesla is an electric car", }]batch_run_result = CustomPrompt( display_name="Response must answer the query", required_args=["query", "response"], model="gpt-4o", eval_prompt=eval_prompt,).run_batch(data=data)
Note: Any variables you use in the prompt (for example: query, context,
response) will be interpolated from your dataset.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Athina","colors":{"primary":"#1976D2","light":"#419BF4","dark":"#1976D2"},"favicon":"/logo/light.svg","logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/light.svg","dark":"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/dark.svg"},"api":{"mdx":{"server":null,"auth":{"method":"key","name":"athina-api-key"}}},"navbar":{"links":[{"label":"AI Hub","href":"https://hub.athina.ai"},{"label":"Website","href":"https://athina.ai"}],"primary":{"type":"button","label":"Sign-up","href":"https://app.athina.ai/"}},"footer":{"socials":{"twitter":"https://twitter.com/AthinaAI","linkedin":"https://linkedin.com/company/athina-ai"}},"integrations":{"ga4":{"measurementId":"G-KZVC5R2GB1"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"athinaai","hasAudioNarration":false,"actualSubdomain":"athinaai","customDomains":["docs.athina.ai"],"gitSource":{"type":"github","owner":"athina-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":false},"entitlements":{},"buildId":"6ae91e667acc70e71f351389:success","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentation","count":166},{"language":"default","tag":"Docs","count":79},{"language":"default","tag":"API / SDK Reference","count":54},{"language":"default","tag":"Evals","count":52},{"language":"default","tag":"Datasets","count":37},{"language":"default","tag":"Guides","count":23},{"language":"default","tag":"Logging","count":21},{"language":"default","tag":"Preset Evals","count":15},{"language":"default","tag":"Prompts","count":14},{"language":"default","tag":"Logging LLM Inferences","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/evals/custom-evals/custom-prompt","slug":"/api-reference/evals/custom-evals/custom-prompt","pageMetadata":{"sidebarTitle":"LLM-as-a-Judge (Custom Prompt Eval)","title":"LLM-as-a-Judge (Custom Prompt Eval)","description":null,"href":"/api-reference/evals/custom-evals/custom-prompt"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedFrame,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedFrame)_missingMdxReference(`OptimizedFrame`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Uses your evaluation prompt`}),`\n`,_jsxs(_components.p,{children:[`If you have a more complex evaluation prompt that you would like to run within Athina’s framework, we can support that with our `,_jsx(_components.code,{children:`CustomPrompt`}),` class.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Input: `,_jsx(_components.code,{children:`response`}),`, `,_jsx(_components.code,{children:`query`}),`, `,_jsx(_components.code,{children:`context`}),`, `,_jsx(_components.code,{children:`expected_response`}),` (whichever you specify in your prompt).`]}),`\n`,_jsxs(_components.li,{children:[`Type: `,_jsx(_components.code,{children:`boolean`})]}),`\n`,_jsxs(_components.li,{children:[`Metrics: `,_jsx(_components.code,{children:`passed`}),` (0 or 1)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example:`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Evaluation Inputs:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`eval_prompt`}),`: “Think step-by-step. Based on the provided user `,_jsx(_components.code,{children:`query`}),` and refund policy, determine if the `,_jsx(_components.code,{children:`response`}),` adheres to the refund policy. User `,_jsx(_components.code,{children:`query`}),`: `,`query`,` Refund policy: `,`context`,` `,_jsx(_components.code,{children:`response`}),`: `,`response`,`”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`query`})}),`: “How many vacation days are we allowed?”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`context`})}),`: “Employees are allowed 15 holidays per year, and 5 days of paid leave.”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`response`})}),`: “Employees are allowed 20 vacation days per year, and 5 days of paid leave.”`]}),`\n`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Evaluation Results:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`result:`}),` Fail`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`explanation`}),`: The `,_jsx(_components.code,{children:`response`}),` does not adhere to the refund policy provided. The refund policy is that employees are allowed 15 holidays per year, and 5 days of paid leave.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`demo-video`,children:`Demo Video`}),`\n`,_jsx(`div`,{style:{position:`relative`,paddingBottom:`60.40268456375839%`,height:`0`},children:_jsx(OptimizedFrame,{src:`https://www.loom.com/embed/65fc2adf8c4247db9964e8d7a9d2062d`,frameBorder:`0`,webkitAllowFullScreen:true,mozAllowFullScreen:true,allowFullScreen:true,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}})}),`\n`,_jsxs(Heading,{level:`3`,id:`how-to-use-it-in-the-sdk`,children:[`How to use it in the SDK`,_jsx(_components.a,{href:`#how-to-use-it-in-the-sdk`})]}),`\n`,_jsxs(_components.p,{children:[`Simply use the `,_jsx(_components.code,{children:`CustomPrompt`}),` class and specify your own `,_jsx(_components.code,{children:`eval_prompt`}),`.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`25`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` athina.evals `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CustomPrompt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`eval_prompt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Think step-by-step.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Based on the provided user query, determine if the response answer the query correctly.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`If it does then result should be True else False. Add explanation if False`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`User query: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`response: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Where is France and what is it's capital?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"context\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"France is the country in europe known for delicious cuisine\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Tesla is an electric car\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Elephant is an animal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Tesla is an electric car\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`batch_run_result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CustomPrompt(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` display_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Response must answer the query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` required_args`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` eval_prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`eval_prompt,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).run_batch(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/athina-ai/athina-evals`,children:`See an example notebook → `}),`.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Note: Any variables you use in the prompt (for example: `,_jsx(_components.code,{children:`query`}),`, `,_jsx(_components.code,{children:`context`}),`,\n`,_jsx(_components.code,{children:`response`}),`) will be interpolated from your `,_jsx(_components.code,{children:`dataset`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"sidebarTitle":"LLM-as-a-Judge (Custom Prompt Eval)","title":"LLM-as-a-Judge (Custom Prompt Eval)","description":null,"href":"/api-reference/evals/custom-evals/custom-prompt"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[2037,2075," Refund policy: `,` "],[2128,2139,""]]},"mdxExtracts":{"tableOfContents":[{"title":"Demo Video","slug":"demo-video","depth":3,"children":[]},{"title":"How to use it in the SDK","slug":"how-to-use-it-in-the-sdk","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"athinaai","siteName":"Athina","title":"LLM-as-a-Judge (Custom Prompt Eval) - Athina","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/evals/custom-evals/custom-prompt.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Athina\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"LLM-as-a-Judge (Custom Prompt Eval) - Athina\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Athina\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://athinaai.mintlify.site/_mintlify/api/og/v2?division=Custom+Evals\u0026amp;title=LLM-as-a-Judge+%28Custom+Prompt+Eval%29\u0026amp;theme=64652801f93e763e814fdf35\u0026amp;signature=c906f21e800c2b5e6426b83458950f3c9eae394bb946716fce50494b2c27daf5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"LLM-as-a-Judge (Custom Prompt Eval) - Athina\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://athinaai.mintlify.site/_mintlify/api/og/v2?division=Custom+Evals\u0026amp;title=LLM-as-a-Judge+%28Custom+Prompt+Eval%29\u0026amp;theme=64652801f93e763e814fdf35\u0026amp;signature=c906f21e800c2b5e6426b83458950f3c9eae394bb946716fce50494b2c27daf5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Athina\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1976D2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/evals/custom-evals/custom-prompt.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.athina.ai/#organization\",\"name\":\"Athina\",\"url\":\"https://docs.athina.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.athina.ai#website\",\"name\":\"Athina\",\"url\":\"https://docs.athina.ai\",\"publisher\":{\"@id\":\"https://docs.athina.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt#webpage\",\"url\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt\",\"name\":\"LLM-as-a-Judge (Custom Prompt Eval)\",\"isPartOf\":{\"@id\":\"https://docs.athina.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Evals\",\"item\":\"https://docs.athina.ai/api-reference/evals/running-evals/run-single-eval\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Evals\",\"item\":\"https://docs.athina.ai/api-reference/evals/custom-evals/api-call\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LLM-as-a-Judge (Custom Prompt Eval)\",\"item\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt#article\",\"headline\":\"LLM-as-a-Judge (Custom Prompt Eval)\",\"name\":\"LLM-as-a-Judge (Custom Prompt Eval)\",\"url\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt\",\"mainEntityOfPage\":{\"@id\":\"https://docs.athina.ai/api-reference/evals/custom-evals/custom-prompt#webpage\"},\"publisher\":{\"@id\":\"https://docs.athina.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.athina.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Athina\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Athina","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/overview"}]},{"tab":"API / SDK Reference","groups":[{"group":"Logging","pages":[{"title":"Logging","sidebarTitle":"Overview","icon":"hand-wave","href":"/api-reference/logging/overview"},{"title":"Logging Attributes","sidebarTitle":"Logging Attributes","api":"POST https://log.athina.ai/api/v2/log/inference","href":"/api-reference/logging/logging-attributes"},{"group":"Logging LLM Inferences","icon":"code","pages":[{"title":"Log via API Request","api":"POST https://log.athina.ai/api/v2/log/inference","href":"/api-reference/logging/log-via-api-request"},{"title":"Log via Python SDK","icon":"code","href":"/api-reference/logging/log-via-python-sdk"},{"title":"Log via TypeScript SDK","icon":"code","href":"/api-reference/logging/log-via-typescript-sdk"},{"title":"Langchain","icon":"code","href":"/api-reference/logging/langchain"},{"title":"🚅 LiteLLM","sidebarTitle":"LiteLLM","icon":"code","href":"/api-reference/logging/lite-llm"},{"title":"OpenAI Chat Completion","sidebarTitle":"OpenAI Chat (1.x)","icon":"code","href":"/api-reference/logging/openai-chat-1x"},{"title":"OpenAI Chat Completion","sidebarTitle":"OpenAI Chat (0.x)","icon":"code","href":"/api-reference/logging/openai-chat-0x"},{"title":"OpenAI Assistant","icon":"code","href":"/api-reference/logging/openai-assistant"},{"title":"Tracing","icon":"code","href":"/api-reference/logging/tracing"},{"title":"Tracing via API","icon":"code","href":"/api-reference/logging/tracing-via-api"},{"title":"Tracing using Python decorators","icon":"code","href":"/api-reference/logging/tracing-using-python-decorators"},{"title":"Tracing for Langchain (Python)","sidebarTitle":"Tracing for Langchain","icon":"code","href":"/api-reference/logging/tracing-for-langchain"},{"title":"Supported Models","icon":"cube","href":"/api-reference/logging/supported-models"}]},{"group":"Updating Logs","icon":"pencil","pages":[{"title":"Update Logs By ID","icon":"code","href":"/api-reference/logging/updates/update-logs-by-id"},{"title":"Update Logs By External Reference ID","icon":"code","href":"/api-reference/logging/updates/update-logs-by-external-reference-id"}]}]},{"group":"Datasets","pages":[{"title":"List All Datasets","icon":"code","href":"/api-reference/datasets/list"},{"title":"Create a Dataset","icon":"code","href":"/api-reference/datasets/create-dataset"},{"title":"Add Rows to Dataset","icon":"code","href":"/api-reference/datasets/add-rows-to-dataset"},{"title":"Get Dataset","icon":"code","href":"/api-reference/datasets/get-dataset"},{"title":"Delete Dataset","icon":"code","href":"/api-reference/datasets/delete-dataset"},{"title":"Update Cells in a Dataset","icon":"code","href":"/api-reference/datasets/update-cell-via-api"}]},{"group":"Evals","pages":[{"group":"Running Evals via SDK","icon":"bolt-lightning","pages":[{"title":"Running Evals","sidebarTitle":"Python: Run a single eval","icon":"code","href":"/api-reference/evals/running-evals/run-single-eval"},{"title":"Running a suite of evals","sidebarTitle":"Python: Run evals on a dataset","icon":"code","href":"/api-reference/evals/running-evals/run-eval-suite"}]},{"group":"Loading Data for Evals","icon":"file-import","pages":[{"title":"Loading data for Evals","icon":"code","href":"/api-reference/evals/loading-data/loading-data-for-eval"},{"title":"Loading data via Llama-Index","icon":"code","href":"/api-reference/evals/loading-data/loading-data-via-llama-index"}]},{"group":"Preset Evals","icon":"grid","pages":[{"title":"Preset Evals","sidebarTitle":"Overview","icon":"grid","href":"/api-reference/evals/preset-evals/overview"},{"group":"RAG Evals","icon":"files","pages":[{"title":"Context Sufficiency","icon":"code","href":"/api-reference/evals/preset-evals/rag/context-sufficiency"},{"title":"Response Faithfulness","icon":"code","href":"/api-reference/evals/preset-evals/rag/response-faithfulness"},{"title":"Answer Completeness","icon":"code","href":"/api-reference/evals/preset-evals/rag/answer-completeness"},{"title":"Groundedness","icon":"code","href":"/api-reference/evals/preset-evals/rag/groundedness"},{"title":"RAGAS","icon":"ruler-triangle","href":"/api-reference/evals/preset-evals/rag/ragas"}]},{"group":"Safety","icon":"shield","pages":[{"title":"PII Detection","icon":"shield","href":"/api-reference/evals/preset-evals/safety/pii-detection"},{"title":"Prompt Injection","icon":"shield","href":"/api-reference/evals/preset-evals/safety/prompt-injection"},{"title":"OpenAI Content Moderation","icon":"shield","href":"/api-reference/evals/preset-evals/safety/open-ai-content-moderation"},{"title":"Guardrails","icon":"shield","href":"/api-reference/evals/preset-evals/guardrails"}]},{"title":"JSON Evals","icon":"brackets-curly","href":"/api-reference/evals/preset-evals/json-evals"},{"title":"Summarization QA","icon":"code","href":"/api-reference/evals/preset-evals/summarization-qa"},{"sidebarTitle":"Function Evals","title":"Function Based Evaluators","icon":"code","href":"/api-reference/evals/preset-evals/function-evals"},{"title":"Grounded Evals","href":"/api-reference/evals/preset-evals/grounded-evals"},{"title":"Conversation Evals","sidebarTitle":"Conversation Evaluators","href":"/api-reference/evals/preset-evals/conversation-evals"}]},{"group":"Custom Evals","pages":[{"title":"API Call","description":null,"href":"/api-reference/evals/custom-evals/api-call"},{"sidebarTitle":"LLM-as-a-Judge (Custom Prompt Eval)","title":"LLM-as-a-Judge (Custom Prompt Eval)","href":"/api-reference/evals/custom-evals/custom-prompt"},{"title":"Pairwise Evaluation","description":null,"href":"/api-reference/evals/custom-evals/pairwise-evaluation"},{"sidebarTitle":"Custom Code Eval","title":"Evaluation with Custom Python Code","href":"/api-reference/evals/custom-evals/custom-code-eval"},{"title":"Custom Grading Criteria","href":"/api-reference/evals/custom-evals/grading-criteria"},{"title":"Write your own LLM Eval class","sidebarTitle":"Create Your Own Eval","href":"/api-reference/evals/custom-evals/create-your-own-eval"}]}]},{"group":"GraphQL API","pages":[{"title":"Overview","icon":"hand-wave","href":"/api-reference/graphql-api/overview"},{"title":"Getting Started","icon":"rocket","href":"/api-reference/graphql-api/getting-started"},{"title":"Sample GraphQL Queries","icon":"code","href":"/api-reference/graphql-api/sample-queries"},{"title":"Query the Graph API using cURL or Python","sidebarTitle":"Curl and Python Examples","href":"/api-reference/graphql-api/curl-python-examples"}]},{"group":"Deprecated","pages":[{"title":"OpenAI Completions","sidebarTitle":"OpenAI Completion 0.x","href":"/api-reference/logging/misc/openai-completion-0x"},{"title":"OpenAI Completions","sidebarTitle":"OpenAI Completion 1.x","href":"/api-reference/logging/misc/openai-completion-1x"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/overview"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/faqs/data-policy"}]}]},{"anchor":"Open-Source Evals","href":"https://github.com/athina-ai/athina-evals","icon":"github"},{"anchor":"Blog","href":"https://blog.athina.ai/","icon":"book"},{"anchor":"Email us","href":"mailto:hello@athina.ai","icon":"envelope"},{"anchor":"Book a call","href":"https://cal.com/shiv-athina/30min","icon":"calendar"}]},"basePath":"","title":"LLM-as-a-Judge (Custom Prompt Eval) - Athina","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}