@langwatch/mcp-server 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/archive-scenario-YFD5THOR.js +19 -0
- package/dist/archive-scenario-YFD5THOR.js.map +1 -0
- package/dist/chunk-5UOPNRXW.js +37 -0
- package/dist/chunk-5UOPNRXW.js.map +1 -0
- package/dist/chunk-6U4TCGFC.js +40 -0
- package/dist/chunk-6U4TCGFC.js.map +1 -0
- package/dist/chunk-IX6QJKAD.js +22 -0
- package/dist/chunk-IX6QJKAD.js.map +1 -0
- package/dist/{chunk-HOPTUDCZ.js → chunk-LLRQIF52.js} +5 -12
- package/dist/chunk-LLRQIF52.js.map +1 -0
- package/dist/create-evaluator-E5X5ZP3B.js +27 -0
- package/dist/create-evaluator-E5X5ZP3B.js.map +1 -0
- package/dist/create-prompt-7Z35MIL6.js +36 -0
- package/dist/create-prompt-7Z35MIL6.js.map +1 -0
- package/dist/create-scenario-DIMPJRPY.js +26 -0
- package/dist/create-scenario-DIMPJRPY.js.map +1 -0
- package/dist/discover-evaluator-schema-H23XCLNE.js +1402 -0
- package/dist/discover-evaluator-schema-H23XCLNE.js.map +1 -0
- package/dist/discover-scenario-schema-MEEEVND7.js +65 -0
- package/dist/discover-scenario-schema-MEEEVND7.js.map +1 -0
- package/dist/{get-analytics-3IFTN6MY.js → get-analytics-4YJW4S5L.js} +2 -2
- package/dist/get-evaluator-WDEH2F7M.js +47 -0
- package/dist/get-evaluator-WDEH2F7M.js.map +1 -0
- package/dist/{get-prompt-2ZB5B3QC.js → get-prompt-F6PDVC76.js} +2 -5
- package/dist/get-prompt-F6PDVC76.js.map +1 -0
- package/dist/get-scenario-H24ZYNT5.js +33 -0
- package/dist/get-scenario-H24ZYNT5.js.map +1 -0
- package/dist/{get-trace-7IXKKCJJ.js → get-trace-27USKGO7.js} +2 -2
- package/dist/index.js +27066 -8845
- package/dist/index.js.map +1 -1
- package/dist/list-evaluators-KRGI72EH.js +34 -0
- package/dist/list-evaluators-KRGI72EH.js.map +1 -0
- package/dist/list-model-providers-A5YCFTPI.js +35 -0
- package/dist/list-model-providers-A5YCFTPI.js.map +1 -0
- package/dist/{list-prompts-J72LTP7Z.js → list-prompts-LKJSE7XN.js} +6 -7
- package/dist/list-prompts-LKJSE7XN.js.map +1 -0
- package/dist/list-scenarios-ZK5CMGC4.js +40 -0
- package/dist/list-scenarios-ZK5CMGC4.js.map +1 -0
- package/dist/{search-traces-RW2NDHN5.js → search-traces-SOKAAMAR.js} +2 -2
- package/dist/set-model-provider-7MGULZDH.js +33 -0
- package/dist/set-model-provider-7MGULZDH.js.map +1 -0
- package/dist/update-evaluator-A3XINFLJ.js +24 -0
- package/dist/update-evaluator-A3XINFLJ.js.map +1 -0
- package/dist/update-prompt-IW7X2UQM.js +22 -0
- package/dist/update-prompt-IW7X2UQM.js.map +1 -0
- package/dist/update-scenario-ZT7TOBFR.js +27 -0
- package/dist/update-scenario-ZT7TOBFR.js.map +1 -0
- package/package.json +11 -11
- package/src/__tests__/all-tools.integration.test.ts +1337 -0
- package/src/__tests__/discover-evaluator-schema.unit.test.ts +89 -0
- package/src/__tests__/evaluator-tools.unit.test.ts +262 -0
- package/src/__tests__/integration.integration.test.ts +9 -34
- package/src/__tests__/langwatch-api.unit.test.ts +4 -32
- package/src/__tests__/model-provider-tools.unit.test.ts +190 -0
- package/src/__tests__/scenario-tools.integration.test.ts +286 -0
- package/src/__tests__/scenario-tools.unit.test.ts +185 -0
- package/src/__tests__/tools.unit.test.ts +59 -65
- package/src/index.ts +338 -48
- package/src/langwatch-api-evaluators.ts +70 -0
- package/src/langwatch-api-model-providers.ts +41 -0
- package/src/langwatch-api-scenarios.ts +67 -0
- package/src/langwatch-api.ts +6 -30
- package/src/tools/archive-scenario.ts +19 -0
- package/src/tools/create-evaluator.ts +33 -0
- package/src/tools/create-prompt.ts +30 -5
- package/src/tools/create-scenario.ts +30 -0
- package/src/tools/discover-evaluator-schema.ts +143 -0
- package/src/tools/discover-scenario-schema.ts +71 -0
- package/src/tools/get-evaluator.ts +53 -0
- package/src/tools/get-prompt.ts +1 -4
- package/src/tools/get-scenario.ts +36 -0
- package/src/tools/list-evaluators.ts +37 -0
- package/src/tools/list-model-providers.ts +40 -0
- package/src/tools/list-prompts.ts +5 -6
- package/src/tools/list-scenarios.ts +47 -0
- package/src/tools/set-model-provider.ts +46 -0
- package/src/tools/update-evaluator.ts +30 -0
- package/src/tools/update-prompt.ts +9 -25
- package/src/tools/update-scenario.ts +32 -0
- package/uv.lock +1788 -1322
- package/dist/chunk-HOPTUDCZ.js.map +0 -1
- package/dist/create-prompt-UBC537BJ.js +0 -22
- package/dist/create-prompt-UBC537BJ.js.map +0 -1
- package/dist/get-prompt-2ZB5B3QC.js.map +0 -1
- package/dist/list-prompts-J72LTP7Z.js.map +0 -1
- package/dist/update-prompt-G6HHZSUM.js +0 -31
- package/dist/update-prompt-G6HHZSUM.js.map +0 -1
- /package/dist/{get-analytics-3IFTN6MY.js.map → get-analytics-4YJW4S5L.js.map} +0 -0
- /package/dist/{get-trace-7IXKKCJJ.js.map → get-trace-27USKGO7.js.map} +0 -0
- /package/dist/{search-traces-RW2NDHN5.js.map → search-traces-SOKAAMAR.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../langevals/ts-integration/evaluators.generated.ts","../src/tools/discover-evaluator-schema.ts"],"sourcesContent":["export type EvaluatorDefinition<T extends EvaluatorTypes> = {\n name: string;\n description: string;\n category: \"quality\" | \"rag\" | \"safety\" | \"policy\" | \"other\" | \"custom\" | \"similarity\";\n docsUrl?: string;\n isGuardrail: boolean;\n requiredFields: (\"input\" | \"output\" | \"contexts\" | \"expected_output\" | \"expected_contexts\" | \"conversation\")[];\n optionalFields: (\"input\" | \"output\" | \"contexts\" | \"expected_output\" | \"expected_contexts\" | \"conversation\")[];\n settings: {\n [K in keyof Evaluators[T][\"settings\"]]: {\n description?: string;\n default: Evaluators[T][\"settings\"][K];\n };\n };\n envVars: string[];\n result: {\n score?: {\n description: string;\n };\n passed?: {\n description: string;\n };\n label?: {\n description: string;\n };\n };\n};\n\nexport type EvaluatorTypes = keyof Evaluators;\n\nexport type EvaluationResult = {\n status: 'processed';\n score?: number | undefined;\n passed?: boolean | undefined;\n label?: string | undefined;\n details?: string | undefined;\n cost?: Money | undefined;\n raw_response?: any;\n};\n\nexport type EvaluationResultSkipped = {\n status: 'skipped';\n details?: string | undefined;\n};\n\nexport type EvaluationResultError = {\n status: 'error';\n error_type: string;\n details: string;\n traceback: string[];\n};\n\nexport type SingleEvaluationResult = EvaluationResult | EvaluationResultSkipped | EvaluationResultError;\nexport type BatchEvaluationResult = SingleEvaluationResult[];\n\nexport type Money = {\n currency: string;\n amount: number;\n};\n\nexport type Evaluators = {\n \"legacy/ragas_answer_correctness\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_answer_relevancy\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_context_precision\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_context_recall\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_context_relevancy\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_context_utilization\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"legacy/ragas_faithfulness\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"presidio/pii_detection\": {\n settings: {\n /**\n * @description The types of PII to check for in the input.\n * @default {\"credit_card\": true, \"crypto\": true, \"email_address\": true, \"iban_code\": true, \"ip_address\": true, \"location\": false, \"person\": false, \"phone_number\": true, \"medical_license\": true, \"us_bank_number\": false, \"us_driver_license\": false, \"us_itin\": false, \"us_passport\": false, \"us_ssn\": false, \"uk_nhs\": false, \"sg_nric_fin\": false, \"au_abn\": false, \"au_acn\": false, \"au_tfn\": false, \"au_medicare\": false, \"in_pan\": false, \"in_aadhaar\": false, \"in_vehicle_registration\": false, \"in_voter\": false, \"in_passport\": false}\n */\n entities: {\n /**\n * @default true\n */\n credit_card: boolean;\n /**\n * @default true\n */\n crypto: boolean;\n /**\n * @default true\n */\n email_address: boolean;\n /**\n * @default true\n */\n iban_code: boolean;\n /**\n * @default true\n */\n ip_address: boolean;\n /**\n * @default false\n */\n location: boolean;\n /**\n * @default false\n */\n person: boolean;\n /**\n * @default true\n */\n phone_number: boolean;\n /**\n * @default true\n */\n medical_license: boolean;\n /**\n * @default false\n */\n us_bank_number: boolean;\n /**\n * @default false\n */\n us_driver_license: boolean;\n /**\n * @default false\n */\n us_itin: boolean;\n /**\n * @default false\n */\n us_passport: boolean;\n /**\n * @default false\n */\n us_ssn: boolean;\n /**\n * @default false\n */\n uk_nhs: boolean;\n /**\n * @default false\n */\n sg_nric_fin: boolean;\n /**\n * @default false\n */\n au_abn: boolean;\n /**\n * @default false\n */\n au_acn: boolean;\n /**\n * @default false\n */\n au_tfn: boolean;\n /**\n * @default false\n */\n au_medicare: boolean;\n /**\n * @default false\n */\n in_pan: boolean;\n /**\n * @default false\n */\n in_aadhaar: boolean;\n /**\n * @default false\n */\n in_vehicle_registration: boolean;\n /**\n * @default false\n */\n in_voter: boolean;\n /**\n * @default false\n */\n in_passport: boolean;\n };\n /**\n * @description The minimum confidence required for failing the evaluation on a PII match.\n * @default 0.5\n */\n min_threshold: number;\n };\n };\n \"lingua/language_detection\": {\n settings: {\n /**\n * @description What should be checked\n * @default \"input_matches_output\"\n */\n check_for: \"input_matches_output\" | \"output_matches_language\";\n /**\n * @description The specific language that the output is expected to be\n */\n expected_language?: \"AF\" | \"AR\" | \"AZ\" | \"BE\" | \"BG\" | \"BN\" | \"BS\" | \"CA\" | \"CS\" | \"CY\" | \"DA\" | \"DE\" | \"EL\" | \"EN\" | \"EO\" | \"ES\" | \"ET\" | \"EU\" | \"FA\" | \"FI\" | \"FR\" | \"GA\" | \"GU\" | \"HE\" | \"HI\" | \"HR\" | \"HU\" | \"HY\" | \"ID\" | \"IS\" | \"IT\" | \"JA\" | \"KA\" | \"KK\" | \"KO\" | \"LA\" | \"LG\" | \"LT\" | \"LV\" | \"MI\" | \"MK\" | \"MN\" | \"MR\" | \"MS\" | \"NB\" | \"NL\" | \"NN\" | \"PA\" | \"PL\" | \"PT\" | \"RO\" | \"RU\" | \"SK\" | \"SL\" | \"SN\" | \"SO\" | \"SQ\" | \"SR\" | \"ST\" | \"SV\" | \"SW\" | \"TA\" | \"TE\" | \"TH\" | \"TL\" | \"TN\" | \"TR\" | \"TS\" | \"UK\" | \"UR\" | \"VI\" | \"XH\" | \"YO\" | \"ZH\" | \"ZU\";\n /**\n * @description Minimum number of words to check, as the language detection can be unreliable for very short texts. Inputs shorter than the minimum will be skipped.\n * @default 7\n */\n min_words: number;\n /**\n * @description Minimum confidence threshold for the language detection. If the confidence is lower than this, the evaluation will be skipped.\n * @default 0.25\n */\n threshold: number;\n };\n };\n \"openai/moderation\": {\n settings: {\n /**\n * @description The model version to use, `text-moderation-latest` will be automatically upgraded over time, while `text-moderation-stable` will only be updated with advanced notice by OpenAI.\n * @default \"text-moderation-stable\"\n */\n model: \"text-moderation-stable\" | \"text-moderation-latest\";\n /**\n * @description The categories of content to check for moderation.\n * @default {\"harassment\": true, \"harassment_threatening\": true, \"hate\": true, \"hate_threatening\": true, \"self_harm\": true, \"self_harm_instructions\": true, \"self_harm_intent\": true, \"sexual\": true, \"sexual_minors\": true, \"violence\": true, \"violence_graphic\": true}\n */\n categories: {\n /**\n * @default true\n */\n harassment: boolean;\n /**\n * @default true\n */\n harassment_threatening: boolean;\n /**\n * @default true\n */\n hate: boolean;\n /**\n * @default true\n */\n hate_threatening: boolean;\n /**\n * @default true\n */\n self_harm: boolean;\n /**\n * @default true\n */\n self_harm_instructions: boolean;\n /**\n * @default true\n */\n self_harm_intent: boolean;\n /**\n * @default true\n */\n sexual: boolean;\n /**\n * @default true\n */\n sexual_minors: boolean;\n /**\n * @default true\n */\n violence: boolean;\n /**\n * @default true\n */\n violence_graphic: boolean;\n };\n };\n };\n \"ragas/bleu_score\": {\n settings: Record<string, never>;\n };\n \"ragas/context_f1\": {\n settings: {\n /**\n * @default \"levenshtein\"\n */\n distance_measure: \"levenshtein\" | \"hamming\" | \"jaro\" | \"jaro_winkler\";\n };\n };\n \"ragas/context_precision\": {\n settings: {\n /**\n * @default \"levenshtein\"\n */\n distance_measure: \"levenshtein\" | \"hamming\" | \"jaro\" | \"jaro_winkler\";\n };\n };\n \"ragas/context_recall\": {\n settings: {\n /**\n * @default \"levenshtein\"\n */\n distance_measure: \"levenshtein\" | \"hamming\" | \"jaro\" | \"jaro_winkler\";\n };\n };\n \"ragas/factual_correctness\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n /**\n * @description The mode to use for the factual correctness metric.\n * @default \"f1\"\n */\n mode: \"f1\" | \"precision\" | \"recall\";\n /**\n * @description The level of atomicity for claim decomposition.\n * @default \"low\"\n */\n atomicity: \"low\" | \"high\";\n /**\n * @description The level of coverage for claim decomposition.\n * @default \"low\"\n */\n coverage: \"low\" | \"high\";\n };\n };\n \"ragas/faithfulness\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n /**\n * @description Whether to autodetect 'I don't know' in the output to avoid failing the evaluation.\n * @default true\n */\n autodetect_dont_know: boolean;\n };\n };\n \"ragas/response_context_precision\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"ragas/response_context_recall\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"ragas/response_relevancy\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n /**\n * @description The model to use for embeddings.\n * @default \"openai/text-embedding-ada-002\"\n */\n embeddings_model: string;\n };\n };\n \"ragas/rouge_score\": {\n settings: {\n /**\n * @description ROUGE type\n * @default \"rouge1\"\n */\n rouge_type: \"rouge1\" | \"rougeL\";\n /**\n * @description ROUGE measure type\n * @default \"fmeasure\"\n */\n measure_type: \"fmeasure\" | \"precision\" | \"recall\";\n };\n };\n \"ragas/rubrics_based_scoring\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n /**\n * @default [{\"description\": \"The response is incorrect, irrelevant.\"}, {\"description\": \"The response partially answers the question but includes significant errors, omissions, or irrelevant information.\"}, {\"description\": \"The response partially answers the question but includes minor errors, omissions, or irrelevant information.\"}, {\"description\": \"The response fully answers the question and includes minor errors, omissions, or irrelevant information.\"}, {\"description\": \"The response fully answers the question and includes no errors, omissions, or irrelevant information.\"}]\n */\n rubrics: {\n description: string;\n }[];\n };\n };\n \"ragas/sql_query_equivalence\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"ragas/summarization_score\": {\n settings: {\n /**\n * @description The model to use for evaluation.\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\n * @default 2048\n */\n max_tokens: number;\n };\n };\n \"azure/content_safety\": {\n settings: {\n /**\n * @description The minimum severity level to consider content as unsafe, from 1 to 7.\n * @default 1\n */\n severity_threshold: 1 | 2 | 3 | 4 | 5 | 6 | 7;\n /**\n * @description The categories of moderation to check for.\n * @default {\"Hate\": true, \"SelfHarm\": true, \"Sexual\": true, \"Violence\": true}\n */\n categories: {\n /**\n * @default true\n */\n Hate: boolean;\n /**\n * @default true\n */\n SelfHarm: boolean;\n /**\n * @default true\n */\n Sexual: boolean;\n /**\n * @default true\n */\n Violence: boolean;\n };\n /**\n * @description The type of severity levels to return on the full 0-7 severity scale, it can be either the trimmed version with four values (0, 2, 4, 6 scores) or the whole range.\n * @default \"FourSeverityLevels\"\n */\n output_type: \"FourSeverityLevels\" | \"EightSeverityLevels\";\n };\n };\n \"azure/jailbreak\": {\n settings: Record<string, never>;\n };\n \"azure/prompt_injection\": {\n settings: Record<string, never>;\n };\n \"langevals/basic\": {\n settings: {\n /**\n * @description List of rules to check, the message must pass all of them\n * @default [{\"field\": \"output\", \"rule\": \"not_contains\", \"value\": \"artificial intelligence\"}]\n */\n rules: {\n /**\n * @default \"output\"\n */\n field: \"input\" | \"output\";\n rule: \"contains\" | \"not_contains\" | \"matches_regex\" | \"not_matches_regex\";\n value: string;\n }[];\n };\n };\n \"langevals/competitor_blocklist\": {\n settings: {\n /**\n * @description The competitors that must not be mentioned.\n * @default [\"OpenAI\", \"Google\", \"Microsoft\"]\n */\n competitors: string[];\n };\n };\n \"langevals/competitor_llm\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The name of your company\n * @default \"LangWatch\"\n */\n name: string;\n /**\n * @description Description of what your company is specializing at\n * @default \"We are providing an LLM observability and evaluation platform\"\n */\n description: string;\n };\n };\n \"langevals/competitor_llm_function_call\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The name of your company\n * @default \"LangWatch\"\n */\n name: string;\n /**\n * @description Description of what your company is specializing at\n * @default \"We are providing an LLM observability and evaluation platform\"\n */\n description: string;\n /**\n * @description The competitors that must not be mentioned.\n * @default [\"OpenAI\", \"Google\", \"Microsoft\"]\n */\n competitors: string[];\n };\n };\n \"langevals/exact_match\": {\n settings: {\n /**\n * @description True if the comparison should be case-sensitive, False otherwise\n * @default false\n */\n case_sensitive: boolean;\n /**\n * @description True if the comparison should trim whitespace, False otherwise\n * @default true\n */\n trim_whitespace: boolean;\n /**\n * @description True if the comparison should remove punctuation, False otherwise\n * @default true\n */\n remove_punctuation: boolean;\n };\n };\n \"langevals/llm_answer_match\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description Prompt for the comparison\n * @default \"Verify that the predicted answer matches the gold answer for the question. Style does not matter, for example the gold answer may be more direct while the predicted answer more verbose and still be correct.\"\n */\n prompt: string;\n };\n };\n \"langevals/llm_boolean\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The system prompt to use for the LLM to run the evaluation\n * @default \"You are an LLM evaluator. We need the guarantee that the output answers what is being asked on the input, please evaluate as False if it doesn't\"\n */\n prompt: string;\n };\n };\n \"langevals/llm_category\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The system prompt to use for the LLM to run the evaluation\n * @default \"You are an LLM category evaluator. Please categorize the message in one of the following categories\"\n */\n prompt: string;\n /**\n * @description The categories to use for the evaluation\n * @default [{\"name\": \"smalltalk\", \"description\": \"Smalltalk with the user\"}, {\"name\": \"company\", \"description\": \"Questions about the company, what we do, etc\"}]\n */\n categories: {\n name: string;\n description: string;\n }[];\n };\n };\n \"langevals/llm_score\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The system prompt to use for the LLM to run the evaluation\n * @default \"You are an LLM evaluator. Please score from 0.0 to 1.0 how likely the user is to be satisfied with this answer, from 0.0 being not satisfied at all to 1.0 being completely satisfied\"\n */\n prompt: string;\n };\n };\n \"langevals/off_topic\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n /**\n * @description The list of topics and their short descriptions that the chatbot is allowed to talk about\n * @default [{\"topic\": \"simple_chat\", \"description\": \"Smalltalk with the user\"}, {\"topic\": \"company\", \"description\": \"Questions about the company, what we do, etc\"}]\n */\n allowed_topics: {\n topic: string;\n description: string;\n }[];\n };\n };\n \"langevals/query_resolution\": {\n settings: {\n /**\n * @description The model to use for evaluation\n * @default \"openai/gpt-5\"\n */\n model: string;\n /**\n * @description Max tokens allowed for evaluation\n * @default 128000\n */\n max_tokens: number;\n };\n };\n \"langevals/sentiment\": {\n settings: {\n /**\n * @description The embeddings model to use for sentiment analysis\n * @default \"openai/text-embedding-3-small\"\n */\n embeddings_model: string;\n /**\n * @description Reference phrase representing the positive end of the sentiment scale\n * @default \"Comment of a very happy and satisfied user\"\n */\n positive_reference: string;\n /**\n * @description Reference phrase representing the negative end of the sentiment scale\n * @default \"Comment of a user who is extremely dissatisfied\"\n */\n negative_reference: string;\n /**\n * @description Controls sentiment sensitivity. Decrease to make scores more extreme (fewer neutrals), increase to make scores more moderate (more neutrals)\n * @default 0.1\n */\n normalization_factor: number;\n };\n };\n \"langevals/similarity\": {\n settings: {\n /**\n * @default \"output\"\n */\n field: \"input\" | \"output\";\n /**\n * @default \"is_not_similar_to\"\n */\n rule: \"is_not_similar_to\" | \"is_similar_to\";\n /**\n * @default \"example\"\n */\n value: string;\n /**\n * @default 0.3\n */\n threshold: number;\n /**\n * @default \"openai/text-embedding-3-small\"\n */\n embeddings_model: string;\n };\n };\n \"langevals/valid_format\": {\n settings: {\n /**\n * @default \"json\"\n */\n format: \"json\" | \"markdown\" | \"python\" | \"sql\";\n /**\n * @description JSON schema to validate against when format is 'json'\n */\n json_schema?: string;\n };\n };\n};\n\nexport const AVAILABLE_EVALUATORS: {\n [K in EvaluatorTypes]: EvaluatorDefinition<K>;\n} = {\n \"legacy/ragas_answer_correctness\": {\n name: `Ragas Answer Correctness`,\n description: `\nComputes with an LLM a weighted combination of factual as well as semantic similarity between the generated answer and the expected output.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/answer_correctness.html\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [\"input\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the correctness of the answer.\"\n }\n}\n },\n \"legacy/ragas_answer_relevancy\": {\n name: `Ragas Answer Relevancy`,\n description: `\nEvaluates how pertinent the generated answer is to the given prompt. Higher scores indicate better relevancy.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/answer_relevance.html\",\n isGuardrail: false,\n requiredFields: [\"input\", \"output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the relevance of the answer.\"\n }\n}\n },\n \"legacy/ragas_context_precision\": {\n name: `Ragas Context Precision`,\n description: `\nThis metric evaluates whether all of the ground-truth relevant items present in the contexts are ranked higher or not. Higher scores indicate better precision.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/context_precision.html\",\n isGuardrail: false,\n requiredFields: [\"input\", \"contexts\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the precision of the context.\"\n }\n}\n },\n \"legacy/ragas_context_recall\": {\n name: `Ragas Context Recall`,\n description: `\nThis evaluator measures the extent to which the retrieved context aligns with the annotated answer, treated as the ground truth. Higher values indicate better performance.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/context_recall.html\",\n isGuardrail: false,\n requiredFields: [\"input\", \"contexts\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the recall of the context.\"\n }\n}\n },\n \"legacy/ragas_context_relevancy\": {\n name: `Ragas Context Relevancy`,\n description: `\nThis metric gauges the relevancy of the retrieved context, calculated based on both the question and contexts. The values fall within the range of (0, 1), with higher values indicating better relevancy.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/context_relevancy.html\",\n isGuardrail: false,\n requiredFields: [\"output\", \"contexts\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the relevancy of the context.\"\n }\n}\n },\n \"legacy/ragas_context_utilization\": {\n name: `Ragas Context Utilization`,\n description: `\nThis metric evaluates whether all of the output relevant items present in the contexts are ranked higher or not. Higher scores indicate better utilization.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/context_precision.html\",\n isGuardrail: false,\n requiredFields: [\"input\", \"output\", \"contexts\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the utilization of the context.\"\n }\n}\n },\n \"legacy/ragas_faithfulness\": {\n name: `Ragas Faithfulness`,\n description: `\nThis evaluator assesses the extent to which the generated answer is consistent with the provided context. Higher scores indicate better faithfulness to the context, useful for detecting hallucinations.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/latest/concepts/metrics/faithfulness.html\",\n isGuardrail: false,\n requiredFields: [\"output\", \"contexts\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the faithfulness of the answer.\"\n }\n}\n },\n \"presidio/pii_detection\": {\n name: `Presidio PII Detection`,\n description: `\nDetects personally identifiable information in text, including phone numbers, email addresses, and\nsocial security numbers. It allows customization of the detection threshold and the specific types of PII to check.\n`,\n category: \"safety\",\n docsUrl: \"https://microsoft.github.io/presidio\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\"],\n settings: {\n \"entities\": {\n \"description\": \"The types of PII to check for in the input.\",\n \"default\": {\n \"credit_card\": true,\n \"crypto\": true,\n \"email_address\": true,\n \"iban_code\": true,\n \"ip_address\": true,\n \"location\": false,\n \"person\": false,\n \"phone_number\": true,\n \"medical_license\": true,\n \"us_bank_number\": false,\n \"us_driver_license\": false,\n \"us_itin\": false,\n \"us_passport\": false,\n \"us_ssn\": false,\n \"uk_nhs\": false,\n \"sg_nric_fin\": false,\n \"au_abn\": false,\n \"au_acn\": false,\n \"au_tfn\": false,\n \"au_medicare\": false,\n \"in_pan\": false,\n \"in_aadhaar\": false,\n \"in_vehicle_registration\": false,\n \"in_voter\": false,\n \"in_passport\": false\n }\n },\n \"min_threshold\": {\n \"description\": \"The minimum confidence required for failing the evaluation on a PII match.\",\n \"default\": 0.5\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Amount of PII detected, 0 means no PII detected\"\n },\n \"passed\": {\n \"description\": \"If true then no PII was detected, if false then at least one PII was detected\"\n }\n}\n },\n \"lingua/language_detection\": {\n name: `Lingua Language Detection`,\n description: `\nThis evaluator detects the language of the input and output text to check for example if the generated answer is in the same language as the prompt,\nor if it's in a specific expected language.\n`,\n category: \"quality\",\n docsUrl: \"https://github.com/pemistahl/lingua-py\",\n isGuardrail: true,\n requiredFields: [\"output\"],\n optionalFields: [\"input\"],\n settings: {\n \"check_for\": {\n \"description\": \"What should be checked\",\n \"default\": \"input_matches_output\"\n },\n \"expected_language\": {\n \"description\": \"The specific language that the output is expected to be\",\n \"default\": undefined\n },\n \"min_words\": {\n \"description\": \"Minimum number of words to check, as the language detection can be unreliable for very short texts. Inputs shorter than the minimum will be skipped.\",\n \"default\": 7\n },\n \"threshold\": {\n \"description\": \"Minimum confidence threshold for the language detection. If the confidence is lower than this, the evaluation will be skipped.\",\n \"default\": 0.25\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"Passes if the detected language on the output matches the detected language on the input, or if the output matches the expected language\"\n },\n \"label\": {\n \"description\": \"Language detected on the input for input_matches_output, or language detected on the output for output_matches_language\"\n }\n}\n },\n \"openai/moderation\": {\n name: `OpenAI Moderation`,\n description: `\nThis evaluator uses OpenAI's moderation API to detect potentially harmful content in text,\nincluding harassment, hate speech, self-harm, sexual content, and violence.\n`,\n category: \"safety\",\n docsUrl: \"https://platform.openai.com/docs/guides/moderation/overview\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\"],\n settings: {\n \"model\": {\n \"description\": \"The model version to use, `text-moderation-latest` will be automatically upgraded over time, while `text-moderation-stable` will only be updated with advanced notice by OpenAI.\",\n \"default\": \"text-moderation-stable\"\n },\n \"categories\": {\n \"description\": \"The categories of content to check for moderation.\",\n \"default\": {\n \"harassment\": true,\n \"harassment_threatening\": true,\n \"hate\": true,\n \"hate_threatening\": true,\n \"self_harm\": true,\n \"self_harm_instructions\": true,\n \"self_harm_intent\": true,\n \"sexual\": true,\n \"sexual_minors\": true,\n \"violence\": true,\n \"violence_graphic\": true\n }\n }\n},\n envVars: [\"OPENAI_API_KEY\"],\n result: {\n \"score\": {\n \"description\": \"The model's confidence on primary category where the input violates the OpenAI's policy. The value is between 0 and 1, where higher values denote higher confidence.\"\n },\n \"passed\": {\n \"description\": \"Fails if any moderation category is flagged\"\n }\n}\n },\n \"ragas/bleu_score\": {\n name: `BLEU Score`,\n description: `\nTraditional NLP metric. BLEU score for evaluating the similarity between two strings.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/traditional/#bleu-score\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [],\n settings: {},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"BLEU similarity score\"\n }\n}\n },\n \"ragas/context_f1\": {\n name: `Context F1`,\n description: `\nBalances between precision and recall for context retrieval, increasing it means a better signal-to-noise ratio. Uses traditional string distance metrics.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/context_F1/#non-llm-based-context-F1\",\n isGuardrail: false,\n requiredFields: [\"contexts\", \"expected_contexts\"],\n optionalFields: [],\n settings: {\n \"distance_measure\": {\n \"description\": undefined,\n \"default\": \"levenshtein\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the F1 score.\"\n }\n}\n },\n \"ragas/context_precision\": {\n name: `Context Precision`,\n description: `\nMeasures how accurate is the retrieval compared to expected contexts, increasing it means less noise in the retrieval. Uses traditional string distance metrics.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/context_precision/#non-llm-based-context-precision\",\n isGuardrail: false,\n requiredFields: [\"contexts\", \"expected_contexts\"],\n optionalFields: [],\n settings: {\n \"distance_measure\": {\n \"description\": undefined,\n \"default\": \"levenshtein\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the precision score.\"\n }\n}\n },\n \"ragas/context_recall\": {\n name: `Context Recall`,\n description: `\nMeasures how many relevant contexts were retrieved compared to expected contexts, increasing it means more signal in the retrieval. Uses traditional string distance metrics.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/context_recall/#non-llm-based-context-recall\",\n isGuardrail: false,\n requiredFields: [\"contexts\", \"expected_contexts\"],\n optionalFields: [],\n settings: {\n \"distance_measure\": {\n \"description\": undefined,\n \"default\": \"levenshtein\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the Recall score.\"\n }\n}\n },\n \"ragas/factual_correctness\": {\n name: `LLM Factual Match`,\n description: `\nComputes with an LLM how factually similar the generated answer is to the expected output.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/factual_correctness/\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n },\n \"mode\": {\n \"description\": \"The mode to use for the factual correctness metric.\",\n \"default\": \"f1\"\n },\n \"atomicity\": {\n \"description\": \"The level of atomicity for claim decomposition.\",\n \"default\": \"low\"\n },\n \"coverage\": {\n \"description\": \"The level of coverage for claim decomposition.\",\n \"default\": \"low\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating how factually similar the generated answer is to the expected output.\"\n }\n}\n },\n \"ragas/faithfulness\": {\n name: `Ragas Faithfulness`,\n description: `\nThis evaluator assesses the extent to which the generated answer is consistent with the provided context. Higher scores indicate better faithfulness to the context, useful for detecting hallucinations.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/faithfulness/\",\n isGuardrail: false,\n requiredFields: [\"output\", \"contexts\"],\n optionalFields: [\"input\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n },\n \"autodetect_dont_know\": {\n \"description\": \"Whether to autodetect 'I don't know' in the output to avoid failing the evaluation.\",\n \"default\": true\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the faithfulness of the answer.\"\n }\n}\n },\n \"ragas/response_context_precision\": {\n name: `Ragas Response Context Precision`,\n description: `\nUses an LLM to measure the proportion of chunks in the retrieved context that were relevant to generate the output or the expected output.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/context_precision/#context-precision-without-reference\",\n isGuardrail: false,\n requiredFields: [\"input\", \"contexts\"],\n optionalFields: [\"output\", \"expected_output\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the precision of the retrieved context.\"\n }\n}\n },\n \"ragas/response_context_recall\": {\n name: `Ragas Response Context Recall`,\n description: `\nUses an LLM to measure how many of relevant documents attributable the claims in the output were successfully retrieved in order to generate an expected output.\n`,\n category: \"rag\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/context_recall/#llm-based-context-recall\",\n isGuardrail: false,\n requiredFields: [\"input\", \"output\", \"contexts\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the recall of the retrieved context.\"\n }\n}\n },\n \"ragas/response_relevancy\": {\n name: `Ragas Response Relevancy`,\n description: `\nEvaluates how pertinent the generated answer is to the given prompt. Higher scores indicate better relevancy.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/answer_relevance/\",\n isGuardrail: false,\n requiredFields: [\"input\", \"output\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n },\n \"embeddings_model\": {\n \"description\": \"The model to use for embeddings.\",\n \"default\": \"openai/text-embedding-ada-002\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the relevance of the answer.\"\n }\n}\n },\n \"ragas/rouge_score\": {\n name: `ROUGE Score`,\n description: `\nTraditional NLP metric. ROUGE score for evaluating the similarity between two strings.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/traditional/#rouge-score\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"rouge_type\": {\n \"description\": \"ROUGE type\",\n \"default\": \"rouge1\"\n },\n \"measure_type\": {\n \"description\": \"ROUGE measure type\",\n \"default\": \"fmeasure\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"ROUGE similarity score\"\n }\n}\n },\n \"ragas/rubrics_based_scoring\": {\n name: `Rubrics Based Scoring`,\n description: `\nRubric-based evaluation metric that is used to evaluate responses. The rubric consists of descriptions for each score, typically ranging from 1 to 5\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/general_purpose/#rubrics-based-criteria-scoring\",\n isGuardrail: false,\n requiredFields: [\"input\", \"output\"],\n optionalFields: [\"expected_output\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n },\n \"rubrics\": {\n \"description\": undefined,\n \"default\": [\n {\n \"description\": \"The response is incorrect, irrelevant.\"\n },\n {\n \"description\": \"The response partially answers the question but includes significant errors, omissions, or irrelevant information.\"\n },\n {\n \"description\": \"The response partially answers the question but includes minor errors, omissions, or irrelevant information.\"\n },\n {\n \"description\": \"The response fully answers the question and includes minor errors, omissions, or irrelevant information.\"\n },\n {\n \"description\": \"The response fully answers the question and includes no errors, omissions, or irrelevant information.\"\n }\n ]\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score according to the rubrics, typically between 1 and 5.\"\n }\n}\n },\n \"ragas/sql_query_equivalence\": {\n name: `SQL Query Equivalence`,\n description: `\nChecks if the SQL query is equivalent to a reference one by using an LLM to infer if it would generate the same results given the table schemas.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/sql/#sql-query-semantic-equivalence\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\", \"expected_contexts\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"Whether the SQL query is equivalent to the expected one.\"\n }\n}\n },\n \"ragas/summarization_score\": {\n name: `Summarization Score`,\n description: `\nMeasures how well the summary captures important information from the retrieved contexts.\n`,\n category: \"quality\",\n docsUrl: \"https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/summarization_score/\",\n isGuardrail: false,\n requiredFields: [\"output\", \"contexts\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation.\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.\",\n \"default\": 2048\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"A score between 0.0 and 1.0 indicating the summarization quality.\"\n }\n}\n },\n \"azure/content_safety\": {\n name: `Azure Content Safety`,\n description: `\nThis evaluator detects potentially unsafe content in text, including hate speech,\nself-harm, sexual content, and violence. It allows customization of the severity\nthreshold and the specific categories to check.\n`,\n category: \"safety\",\n docsUrl: \"https://learn.microsoft.com/en-us/azure/ai-services/content-safety/quickstart-text\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\"],\n settings: {\n \"severity_threshold\": {\n \"description\": \"The minimum severity level to consider content as unsafe, from 1 to 7.\",\n \"default\": 1\n },\n \"categories\": {\n \"description\": \"The categories of moderation to check for.\",\n \"default\": {\n \"Hate\": true,\n \"SelfHarm\": true,\n \"Sexual\": true,\n \"Violence\": true\n }\n },\n \"output_type\": {\n \"description\": \"The type of severity levels to return on the full 0-7 severity scale, it can be either the trimmed version with four values (0, 2, 4, 6 scores) or the whole range.\",\n \"default\": \"FourSeverityLevels\"\n }\n},\n envVars: [\"AZURE_CONTENT_SAFETY_ENDPOINT\", \"AZURE_CONTENT_SAFETY_KEY\"],\n result: {\n \"score\": {\n \"description\": \"The severity level of the detected content from 0 to 7. A higher score indicates higher severity.\"\n }\n}\n },\n \"azure/jailbreak\": {\n name: `Azure Jailbreak Detection`,\n description: `\nThis evaluator checks for jailbreak-attempt in the input using Azure's Content Safety API.\n`,\n category: \"safety\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [\"input\"],\n optionalFields: [],\n settings: {},\n envVars: [\"AZURE_CONTENT_SAFETY_ENDPOINT\", \"AZURE_CONTENT_SAFETY_KEY\"],\n result: {\n \"passed\": {\n \"description\": \"If true then no jailbreak was detected, if false then a jailbreak was detected\"\n }\n}\n },\n \"azure/prompt_injection\": {\n name: `Azure Prompt Shield`,\n description: `\nThis evaluator checks for prompt injection attempt in the input and the contexts using Azure's Content Safety API.\n`,\n category: \"safety\",\n docsUrl: \"https://learn.microsoft.com/en-us/azure/ai-services/content-safety/concepts/jailbreak-detection\",\n isGuardrail: true,\n requiredFields: [\"input\"],\n optionalFields: [\"contexts\"],\n settings: {},\n envVars: [\"AZURE_CONTENT_SAFETY_ENDPOINT\", \"AZURE_CONTENT_SAFETY_KEY\"],\n result: {\n \"passed\": {\n \"description\": \"If true then no prompt injection was detected, if false then a prompt injection was detected\"\n }\n}\n },\n \"langevals/basic\": {\n name: `Custom Basic Evaluator`,\n description: `\nAllows you to check for simple text matches or regex evaluation.\n`,\n category: \"custom\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\"],\n settings: {\n \"rules\": {\n \"description\": \"List of rules to check, the message must pass all of them\",\n \"default\": [\n {\n \"field\": \"output\",\n \"rule\": \"not_contains\",\n \"value\": \"artificial intelligence\"\n }\n ]\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"True if all rules pass, False if any rule fails\"\n }\n}\n },\n \"langevals/competitor_blocklist\": {\n name: `Competitor Blocklist`,\n description: `\nThis evaluator checks if any of the specified competitors was mentioned\n`,\n category: \"policy\",\n docsUrl: \"https://path/to/official/docs\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"output\", \"input\"],\n settings: {\n \"competitors\": {\n \"description\": \"The competitors that must not be mentioned.\",\n \"default\": [\n \"OpenAI\",\n \"Google\",\n \"Microsoft\"\n ]\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Number of competitors mentioned in the input and output\"\n },\n \"passed\": {\n \"description\": \"Is the message containing explicit mention of competitor\"\n }\n}\n },\n \"langevals/competitor_llm\": {\n name: `Competitor Allowlist Check`,\n description: `\nThis evaluator use an LLM-as-judge to check if the conversation is related to competitors, without having to name them explicitly\n`,\n category: \"policy\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"output\", \"input\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"name\": {\n \"description\": \"The name of your company\",\n \"default\": \"LangWatch\"\n },\n \"description\": {\n \"description\": \"Description of what your company is specializing at\",\n \"default\": \"We are providing an LLM observability and evaluation platform\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Confidence that the message is competitor free\"\n },\n \"passed\": {\n \"description\": \"Is the message related to the competitors\"\n }\n}\n },\n \"langevals/competitor_llm_function_call\": {\n name: `Competitor LLM Check`,\n description: `\nThis evaluator implements LLM-as-a-judge with a function call approach to check if the message contains a mention of a competitor.\n`,\n category: \"policy\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"output\", \"input\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"name\": {\n \"description\": \"The name of your company\",\n \"default\": \"LangWatch\"\n },\n \"description\": {\n \"description\": \"Description of what your company is specializing at\",\n \"default\": \"We are providing an LLM observability and evaluation platform\"\n },\n \"competitors\": {\n \"description\": \"The competitors that must not be mentioned.\",\n \"default\": [\n \"OpenAI\",\n \"Google\",\n \"Microsoft\"\n ]\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Number of unique competitors mentioned\"\n },\n \"passed\": {\n \"description\": \"Is the message related to the competitors\"\n }\n}\n },\n \"langevals/exact_match\": {\n name: `Exact Match Evaluator`,\n description: `\nA simple evaluator that checks if the output matches the expected_output exactly.\n`,\n category: \"quality\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [],\n settings: {\n \"case_sensitive\": {\n \"description\": \"True if the comparison should be case-sensitive, False otherwise\",\n \"default\": false\n },\n \"trim_whitespace\": {\n \"description\": \"True if the comparison should trim whitespace, False otherwise\",\n \"default\": true\n },\n \"remove_punctuation\": {\n \"description\": \"True if the comparison should remove punctuation, False otherwise\",\n \"default\": true\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"True if the output matched the expected_output exactly, False otherwise\"\n }\n}\n },\n \"langevals/llm_answer_match\": {\n name: `LLM Answer Match`,\n description: `\nUses an LLM to check if the generated output answers a question correctly the same way as the expected output, even if their style is different.\n`,\n category: \"quality\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [\"output\", \"expected_output\"],\n optionalFields: [\"input\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"prompt\": {\n \"description\": \"Prompt for the comparison\",\n \"default\": \"Verify that the predicted answer matches the gold answer for the question. Style does not matter, for example the gold answer may be more direct while the predicted answer more verbose and still be correct.\"\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"Whether the predicted answer matches the gold answer\"\n }\n}\n },\n \"langevals/llm_boolean\": {\n name: `LLM-as-a-Judge Boolean Evaluator`,\n description: `\nUse an LLM as a judge with a custom prompt to do a true/false boolean evaluation of the message.\n`,\n category: \"custom\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\", \"contexts\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"prompt\": {\n \"description\": \"The system prompt to use for the LLM to run the evaluation\",\n \"default\": \"You are an LLM evaluator. We need the guarantee that the output answers what is being asked on the input, please evaluate as False if it doesn't\"\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"The veredict given by the LLM\"\n }\n}\n },\n \"langevals/llm_category\": {\n name: `LLM-as-a-Judge Category Evaluator`,\n description: `\nUse an LLM as a judge with a custom prompt to classify the message into custom defined categories.\n`,\n category: \"custom\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [],\n optionalFields: [\"input\", \"output\", \"contexts\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"prompt\": {\n \"description\": \"The system prompt to use for the LLM to run the evaluation\",\n \"default\": \"You are an LLM category evaluator. Please categorize the message in one of the following categories\"\n },\n \"categories\": {\n \"description\": \"The categories to use for the evaluation\",\n \"default\": [\n {\n \"name\": \"smalltalk\",\n \"description\": \"Smalltalk with the user\"\n },\n {\n \"name\": \"company\",\n \"description\": \"Questions about the company, what we do, etc\"\n }\n ]\n }\n},\n envVars: [],\n result: {\n \"label\": {\n \"description\": \"The detected category of the message\"\n }\n}\n },\n \"langevals/llm_score\": {\n name: `LLM-as-a-Judge Score Evaluator`,\n description: `\nUse an LLM as a judge with custom prompt to do a numeric score evaluation of the message.\n`,\n category: \"custom\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [],\n optionalFields: [\"input\", \"output\", \"contexts\"],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"prompt\": {\n \"description\": \"The system prompt to use for the LLM to run the evaluation\",\n \"default\": \"You are an LLM evaluator. Please score from 0.0 to 1.0 how likely the user is to be satisfied with this answer, from 0.0 being not satisfied at all to 1.0 being completely satisfied\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"The score given by the LLM, according to the prompt\"\n }\n}\n },\n \"langevals/off_topic\": {\n name: `Off Topic Evaluator`,\n description: `\nThis evaluator checks if the user message is concerning one of the allowed topics of the chatbot\n`,\n category: \"policy\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [\"input\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n },\n \"allowed_topics\": {\n \"description\": \"The list of topics and their short descriptions that the chatbot is allowed to talk about\",\n \"default\": [\n {\n \"topic\": \"simple_chat\",\n \"description\": \"Smalltalk with the user\"\n },\n {\n \"topic\": \"company\",\n \"description\": \"Questions about the company, what we do, etc\"\n }\n ]\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Confidence level of the intent prediction\"\n },\n \"passed\": {\n \"description\": \"Is the message concerning allowed topic\"\n },\n \"label\": {\n \"description\": \"The detected intent or 'other' if the intent is not in the allowed topics\"\n }\n}\n },\n \"langevals/query_resolution\": {\n name: `Query Resolution`,\n description: `\nThis evaluator checks if all the user queries in the conversation were resolved. Useful to detect when the bot doesn't know how to answer or can't help the user.\n`,\n category: \"quality\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [\"conversation\"],\n optionalFields: [],\n settings: {\n \"model\": {\n \"description\": \"The model to use for evaluation\",\n \"default\": \"openai/gpt-5\"\n },\n \"max_tokens\": {\n \"description\": \"Max tokens allowed for evaluation\",\n \"default\": 128000\n }\n},\n envVars: [],\n result: {}\n },\n \"langevals/sentiment\": {\n name: `Sentiment Evaluator`,\n description: `\nAnalyzes the sentiment of the input text by comparing its embedding similarity\nto positive and negative reference phrases. Returns a score from -1.0 (very negative)\nto 1.0 (very positive) and a corresponding label.\n`,\n category: \"quality\",\n docsUrl: \"\",\n isGuardrail: false,\n requiredFields: [\"input\"],\n optionalFields: [],\n settings: {\n \"embeddings_model\": {\n \"description\": \"The embeddings model to use for sentiment analysis\",\n \"default\": \"openai/text-embedding-3-small\"\n },\n \"positive_reference\": {\n \"description\": \"Reference phrase representing the positive end of the sentiment scale\",\n \"default\": \"Comment of a very happy and satisfied user\"\n },\n \"negative_reference\": {\n \"description\": \"Reference phrase representing the negative end of the sentiment scale\",\n \"default\": \"Comment of a user who is extremely dissatisfied\"\n },\n \"normalization_factor\": {\n \"description\": \"Controls sentiment sensitivity. Decrease to make scores more extreme (fewer neutrals), increase to make scores more moderate (more neutrals)\",\n \"default\": 0.1\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"Sentiment score from -1.0 (very negative) to 1.0 (very positive)\"\n },\n \"label\": {\n \"description\": \"Sentiment label: 'positive' or 'negative'\"\n }\n}\n },\n \"langevals/similarity\": {\n name: `Semantic Similarity Evaluator`,\n description: `\nAllows you to check for semantic similarity or dissimilarity between input and output and a\ntarget value, so you can avoid sentences that you don't want to be present without having to\nmatch on the exact text.\n`,\n category: \"custom\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"input\", \"output\"],\n settings: {\n \"field\": {\n \"description\": undefined,\n \"default\": \"output\"\n },\n \"rule\": {\n \"description\": undefined,\n \"default\": \"is_not_similar_to\"\n },\n \"value\": {\n \"description\": undefined,\n \"default\": \"example\"\n },\n \"threshold\": {\n \"description\": undefined,\n \"default\": 0.3\n },\n \"embeddings_model\": {\n \"description\": undefined,\n \"default\": \"openai/text-embedding-3-small\"\n }\n},\n envVars: [],\n result: {\n \"score\": {\n \"description\": \"How similar the input and output semantically, from 0.0 to 1.0, with 1.0 meaning the sentences are identical\"\n },\n \"passed\": {\n \"description\": \"Passes if the cosine similarity crosses the threshold for the defined rule\"\n }\n}\n },\n \"langevals/valid_format\": {\n name: `Valid Format Evaluator`,\n description: `\nAllows you to check if the output is a valid json, markdown, python, sql, etc.\nFor JSON, can optionally validate against a provided schema.\n`,\n category: \"quality\",\n docsUrl: \"\",\n isGuardrail: true,\n requiredFields: [],\n optionalFields: [\"output\"],\n settings: {\n \"format\": {\n \"description\": undefined,\n \"default\": \"json\"\n },\n \"json_schema\": {\n \"description\": \"JSON schema to validate against when format is 'json'\",\n \"default\": undefined\n }\n},\n envVars: [],\n result: {\n \"passed\": {\n \"description\": \"True if the output is formatted correctly, False otherwise\"\n }\n}\n },\n};\n","import { AVAILABLE_EVALUATORS } from \"../../../langevals/ts-integration/evaluators.generated.js\";\nimport type { EvaluatorDefinition, EvaluatorTypes } from \"../../../langevals/ts-integration/evaluators.generated.js\";\n\n/**\n * Formats evaluator schema information for the discover_schema tool.\n *\n * Two levels of detail:\n * - Overview (no evaluatorType): compact list of all evaluator types\n * - Detail (with evaluatorType): full schema for one evaluator type\n */\nexport function formatEvaluatorSchema(evaluatorType?: string): string {\n if (evaluatorType) {\n return formatEvaluatorDetail(evaluatorType);\n }\n return formatEvaluatorOverview();\n}\n\n/**\n * Returns a compact overview of all available evaluator types.\n * Shows type, name, category, and a one-line description.\n */\nfunction formatEvaluatorOverview(): string {\n const lines: string[] = [];\n lines.push(\"# Available Evaluator Types\\n\");\n\n const byCategory = new Map<string, { type: string; name: string; description: string }[]>();\n\n for (const [type, def] of Object.entries(AVAILABLE_EVALUATORS)) {\n const evalDef = def as EvaluatorDefinition<EvaluatorTypes>;\n const oneLine = extractFirstLine(evalDef.description);\n const entry = { type, name: evalDef.name, description: oneLine };\n\n const list = byCategory.get(evalDef.category) ?? [];\n list.push(entry);\n byCategory.set(evalDef.category, list);\n }\n\n for (const [category, entries] of byCategory) {\n lines.push(`## ${category}\\n`);\n for (const entry of entries) {\n lines.push(`- **${entry.type}** (${entry.name}): ${entry.description}`);\n }\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `discover_schema({ category: 'evaluators', evaluatorType: '<type>' })` for full details on a specific evaluator type.\",\n );\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Returns the full schema for a specific evaluator type.\n * Includes settings with descriptions and defaults, required/optional fields, env vars, and result fields.\n */\nfunction formatEvaluatorDetail(evaluatorType: string): string {\n const def = AVAILABLE_EVALUATORS[evaluatorType as EvaluatorTypes] as\n | EvaluatorDefinition<EvaluatorTypes>\n | undefined;\n\n if (!def) {\n return `Unknown evaluator type: \"${evaluatorType}\". Use \\`discover_schema({ category: 'evaluators' })\\` to see all available types.`;\n }\n\n const lines: string[] = [];\n lines.push(`# ${def.name} (\\`${evaluatorType}\\`)\\n`);\n lines.push(`**Category**: ${def.category}`);\n lines.push(`**Is Guardrail**: ${def.isGuardrail ? \"Yes\" : \"No\"}`);\n if (def.docsUrl) {\n lines.push(`**Docs**: ${def.docsUrl}`);\n }\n lines.push(\"\");\n lines.push(`## Description\\n`);\n lines.push(def.description.trim());\n\n // Required and optional fields\n lines.push(\"\\n## Fields\\n\");\n if (def.requiredFields.length > 0) {\n lines.push(`**Required**: ${def.requiredFields.join(\", \")}`);\n } else {\n lines.push(\"**Required**: none\");\n }\n if (def.optionalFields.length > 0) {\n lines.push(`**Optional**: ${def.optionalFields.join(\", \")}`);\n }\n\n // Settings\n const settingsEntries = Object.entries(def.settings);\n if (settingsEntries.length > 0) {\n lines.push(\"\\n## Settings\\n\");\n for (const [key, setting] of settingsEntries) {\n const s = setting as { description?: string; default: unknown };\n const defaultStr = JSON.stringify(s.default);\n const desc = s.description ? ` - ${s.description}` : \"\";\n lines.push(`- **${key}**${desc}`);\n lines.push(` Default: \\`${defaultStr}\\``);\n }\n }\n\n // Env vars\n if (def.envVars.length > 0) {\n lines.push(\"\\n## Required Environment Variables\\n\");\n for (const envVar of def.envVars) {\n lines.push(`- \\`${envVar}\\``);\n }\n }\n\n // Result fields\n const resultEntries = Object.entries(def.result);\n if (resultEntries.length > 0) {\n lines.push(\"\\n## Result Fields\\n\");\n for (const [key, value] of resultEntries) {\n const v = value as { description: string };\n lines.push(`- **${key}**: ${v.description}`);\n }\n }\n\n lines.push(\"\\n## Usage Example\\n\");\n lines.push(\"```json\");\n lines.push(JSON.stringify({\n evaluatorType: evaluatorType,\n settings: Object.fromEntries(\n settingsEntries.map(([key, setting]) => [key, (setting as { default: unknown }).default]),\n ),\n }, null, 2));\n lines.push(\"```\");\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Extracts the first meaningful line from a multi-line description.\n */\nfunction extractFirstLine(description: string): string {\n const trimmed = description.trim();\n const firstLine = trimmed.split(\"\\n\")[0]?.trim() ?? trimmed;\n // Limit to a reasonable length\n if (firstLine.length > 120) {\n return firstLine.slice(0, 117) + \"...\";\n }\n return firstLine;\n}\n"],"mappings":";AAg4BO,IAAM,uBAET;AAAA,EACF,mCAAmC;AAAA,IACjC,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA,IAGb,UAAU;AAAA,IACV,SAAS;AAAA,IACT,aAAa;AAAA,IACb,gBAAgB,CAAC,UAAU,iBAAiB;AAAA,IAC5C,gBAAgB,CAAC,OAAO;AAAA,IACxB,UAAU;AAAA,MACR,SAAS;AAAA,QACH,eAAe;AAAA,QACf,WAAW;AAAA,MACjB;AAAA,MACA,oBAAoB;AAAA,QACd,eAAe;AAAA,QACf,WAAW;AAAA,MACjB;AAAA,MACA,cAAc;AAAA,QACR,eAAe;A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AA,IACA,UAAU,OAAO;AAAA,MACf,gBAAgB,IAAI,CAAC,CAAC,KAAK,OAAO,MAAM,CAAC,KAAM,QAAiC,OAAO,CAAC;AAAA,IAC1F;AAAA,EACF,GAAG,MAAM,CAAC,CAAC;AACX,QAAM,KAAK,KAAK;AAEhB,SAAO,MAAM,KAAK,IAAI;AACxB;AAKA,SAAS,iBAAiB,aAA6B;AACrD,QAAM,UAAU,YAAY,KAAK;AACjC,QAAM,YAAY,QAAQ,MAAM,IAAI,EAAE,CAAC,GAAG,KAAK,KAAK;AAEpD,MAAI,UAAU,SAAS,KAAK;AAC1B,WAAO,UAAU,MAAM,GAAG,GAAG,IAAI;AAAA,EACnC;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// src/tools/discover-scenario-schema.ts
|
|
2
|
+
function formatScenarioSchema() {
|
|
3
|
+
const lines = [];
|
|
4
|
+
lines.push("# Scenario Schema\n");
|
|
5
|
+
lines.push("## Fields\n");
|
|
6
|
+
lines.push(
|
|
7
|
+
'- **name** (required): A short, descriptive name (e.g., "billing dispute resolution", "password reset with 2FA unavailable")'
|
|
8
|
+
);
|
|
9
|
+
lines.push(
|
|
10
|
+
"- **situation** (required): The context that guides the user simulator \u2014 who the user is, what they want, and any constraints (see Writing a Good Situation below)"
|
|
11
|
+
);
|
|
12
|
+
lines.push(
|
|
13
|
+
"- **criteria** (array of strings): Pass/fail conditions a judge evaluates the agent against (see Writing Good Criteria below)"
|
|
14
|
+
);
|
|
15
|
+
lines.push(
|
|
16
|
+
'- **labels** (array of strings): Tags for organizing scenarios (e.g., "auth", "happy-path", "edge-case")'
|
|
17
|
+
);
|
|
18
|
+
lines.push("\n## Writing a Good Situation\n");
|
|
19
|
+
lines.push(
|
|
20
|
+
"The situation drives the user simulator. Include these elements:"
|
|
21
|
+
);
|
|
22
|
+
lines.push("- **Persona**: Who is the user? (e.g., a stressed small business owner, a confused teenager)");
|
|
23
|
+
lines.push("- **Emotional state**: How are they feeling? (e.g., frustrated, anxious, impatient)");
|
|
24
|
+
lines.push("- **Background/Context**: What happened before this conversation?");
|
|
25
|
+
lines.push("- **Intent**: What do they want to accomplish?");
|
|
26
|
+
lines.push("- **Constraints**: What limitations do they have? (e.g., no phone for 2FA, unfamiliar with technical terms)");
|
|
27
|
+
lines.push("\nExample:");
|
|
28
|
+
lines.push("```");
|
|
29
|
+
lines.push("User is a small business owner stressed about tax deadline.");
|
|
30
|
+
lines.push("They need help categorizing expenses but aren't familiar with");
|
|
31
|
+
lines.push("accounting terms. They appreciate patient explanations and examples.");
|
|
32
|
+
lines.push("They have a spreadsheet of transactions but aren't sure which");
|
|
33
|
+
lines.push("categories apply to their consulting business.");
|
|
34
|
+
lines.push("```");
|
|
35
|
+
lines.push("\n## Writing Good Criteria\n");
|
|
36
|
+
lines.push("Criteria are what the judge uses to pass or fail the agent. Each criterion should be:");
|
|
37
|
+
lines.push('- **Specific and testable** \u2014 not vague like "responds helpfully"');
|
|
38
|
+
lines.push("- **Behavioral** \u2014 describes what the agent should *do*, not how it works internally");
|
|
39
|
+
lines.push("- **Independent** \u2014 each criterion checks one thing");
|
|
40
|
+
lines.push("\nGood criteria patterns:");
|
|
41
|
+
lines.push(`- **Information gathering**: "Agent asks for the user's account number before proceeding"`);
|
|
42
|
+
lines.push('- **Safety/guardrails**: "Agent does not reveal internal system details or error stack traces"');
|
|
43
|
+
lines.push('- **Clarification**: "Agent asks clarifying questions before taking irreversible action"');
|
|
44
|
+
lines.push('- **Tone**: "Agent maintains a professional and empathetic tone throughout"');
|
|
45
|
+
lines.push('- **Completeness**: "Agent confirms the user understands the solution before ending"');
|
|
46
|
+
lines.push('- **Domain-specific**: "Agent recommends releasing a wild frog rather than keeping it as a pet"');
|
|
47
|
+
lines.push("\nAvoid vague criteria like:");
|
|
48
|
+
lines.push('- "Responds correctly" \u2014 correct how?');
|
|
49
|
+
lines.push('- "Is helpful" \u2014 helpful in what way?');
|
|
50
|
+
lines.push('- "Works well" \u2014 not testable');
|
|
51
|
+
lines.push("\n## Target Types\n");
|
|
52
|
+
lines.push("Scenarios can target different execution backends:");
|
|
53
|
+
lines.push("- **prompt**: Test a prompt template with variable substitution");
|
|
54
|
+
lines.push("- **http**: Test an HTTP endpoint (e.g., a deployed agent API)");
|
|
55
|
+
lines.push("- **code**: Test a code function directly");
|
|
56
|
+
lines.push("\n## Tips\n");
|
|
57
|
+
lines.push("- Start simple, then layer complexity (add constraints, edge cases)");
|
|
58
|
+
lines.push("- Test edge cases: user changes their mind, gives ambiguous input, makes mistakes");
|
|
59
|
+
lines.push("- Use `fetch_scenario_docs` for the full authoring guide and advanced patterns");
|
|
60
|
+
return lines.join("\n");
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
formatScenarioSchema
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=discover-scenario-schema-MEEEVND7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/discover-scenario-schema.ts"],"sourcesContent":["/**\n * Returns a human-readable description of the scenario schema,\n * including field descriptions, authoring guidance, and examples.\n */\nexport function formatScenarioSchema(): string {\n const lines: string[] = [];\n\n lines.push(\"# Scenario Schema\\n\");\n\n lines.push(\"## Fields\\n\");\n lines.push(\n '- **name** (required): A short, descriptive name (e.g., \"billing dispute resolution\", \"password reset with 2FA unavailable\")',\n );\n lines.push(\n \"- **situation** (required): The context that guides the user simulator — who the user is, what they want, and any constraints (see Writing a Good Situation below)\",\n );\n lines.push(\n \"- **criteria** (array of strings): Pass/fail conditions a judge evaluates the agent against (see Writing Good Criteria below)\",\n );\n lines.push(\n '- **labels** (array of strings): Tags for organizing scenarios (e.g., \"auth\", \"happy-path\", \"edge-case\")',\n );\n\n lines.push(\"\\n## Writing a Good Situation\\n\");\n lines.push(\n \"The situation drives the user simulator. Include these elements:\",\n );\n lines.push(\"- **Persona**: Who is the user? (e.g., a stressed small business owner, a confused teenager)\");\n lines.push(\"- **Emotional state**: How are they feeling? (e.g., frustrated, anxious, impatient)\");\n lines.push(\"- **Background/Context**: What happened before this conversation?\");\n lines.push(\"- **Intent**: What do they want to accomplish?\");\n lines.push(\"- **Constraints**: What limitations do they have? (e.g., no phone for 2FA, unfamiliar with technical terms)\");\n lines.push(\"\\nExample:\");\n lines.push(\"```\");\n lines.push(\"User is a small business owner stressed about tax deadline.\");\n lines.push(\"They need help categorizing expenses but aren't familiar with\");\n lines.push(\"accounting terms. They appreciate patient explanations and examples.\");\n lines.push(\"They have a spreadsheet of transactions but aren't sure which\");\n lines.push(\"categories apply to their consulting business.\");\n lines.push(\"```\");\n\n lines.push(\"\\n## Writing Good Criteria\\n\");\n lines.push(\"Criteria are what the judge uses to pass or fail the agent. Each criterion should be:\");\n lines.push(\"- **Specific and testable** — not vague like \\\"responds helpfully\\\"\");\n lines.push(\"- **Behavioral** — describes what the agent should *do*, not how it works internally\");\n lines.push(\"- **Independent** — each criterion checks one thing\");\n lines.push(\"\\nGood criteria patterns:\");\n lines.push(\"- **Information gathering**: \\\"Agent asks for the user's account number before proceeding\\\"\");\n lines.push(\"- **Safety/guardrails**: \\\"Agent does not reveal internal system details or error stack traces\\\"\");\n lines.push(\"- **Clarification**: \\\"Agent asks clarifying questions before taking irreversible action\\\"\");\n lines.push(\"- **Tone**: \\\"Agent maintains a professional and empathetic tone throughout\\\"\");\n lines.push(\"- **Completeness**: \\\"Agent confirms the user understands the solution before ending\\\"\");\n lines.push(\"- **Domain-specific**: \\\"Agent recommends releasing a wild frog rather than keeping it as a pet\\\"\");\n lines.push(\"\\nAvoid vague criteria like:\");\n lines.push('- \"Responds correctly\" — correct how?');\n lines.push('- \"Is helpful\" — helpful in what way?');\n lines.push('- \"Works well\" — not testable');\n\n lines.push(\"\\n## Target Types\\n\");\n lines.push(\"Scenarios can target different execution backends:\");\n lines.push(\"- **prompt**: Test a prompt template with variable substitution\");\n lines.push(\"- **http**: Test an HTTP endpoint (e.g., a deployed agent API)\");\n lines.push(\"- **code**: Test a code function directly\");\n\n lines.push(\"\\n## Tips\\n\");\n lines.push(\"- Start simple, then layer complexity (add constraints, edge cases)\");\n lines.push(\"- Test edge cases: user changes their mind, gives ambiguous input, makes mistakes\");\n lines.push(\"- Use `fetch_scenario_docs` for the full authoring guide and advanced patterns\");\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";AAIO,SAAS,uBAA+B;AAC7C,QAAM,QAAkB,CAAC;AAEzB,QAAM,KAAK,qBAAqB;AAEhC,QAAM,KAAK,aAAa;AACxB,QAAM;AAAA,IACJ;AAAA,EACF;AACA,QAAM;AAAA,IACJ;AAAA,EACF;AACA,QAAM;AAAA,IACJ;AAAA,EACF;AACA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,QAAM,KAAK,iCAAiC;AAC5C,QAAM;AAAA,IACJ;AAAA,EACF;AACA,QAAM,KAAK,8FAA8F;AACzG,QAAM,KAAK,qFAAqF;AAChG,QAAM,KAAK,mEAAmE;AAC9E,QAAM,KAAK,gDAAgD;AAC3D,QAAM,KAAK,6GAA6G;AACxH,QAAM,KAAK,YAAY;AACvB,QAAM,KAAK,KAAK;AAChB,QAAM,KAAK,6DAA6D;AACxE,QAAM,KAAK,+DAA+D;AAC1E,QAAM,KAAK,sEAAsE;AACjF,QAAM,KAAK,+DAA+D;AAC1E,QAAM,KAAK,gDAAgD;AAC3D,QAAM,KAAK,KAAK;AAEhB,QAAM,KAAK,8BAA8B;AACzC,QAAM,KAAK,uFAAuF;AAClG,QAAM,KAAK,wEAAqE;AAChF,QAAM,KAAK,2FAAsF;AACjG,QAAM,KAAK,0DAAqD;AAChE,QAAM,KAAK,2BAA2B;AACtC,QAAM,KAAK,2FAA6F;AACxG,QAAM,KAAK,gGAAkG;AAC7G,QAAM,KAAK,0FAA4F;AACvG,QAAM,KAAK,6EAA+E;AAC1F,QAAM,KAAK,sFAAwF;AACnG,QAAM,KAAK,iGAAmG;AAC9G,QAAM,KAAK,8BAA8B;AACzC,QAAM,KAAK,4CAAuC;AAClD,QAAM,KAAK,4CAAuC;AAClD,QAAM,KAAK,oCAA+B;AAE1C,QAAM,KAAK,qBAAqB;AAChC,QAAM,KAAK,oDAAoD;AAC/D,QAAM,KAAK,iEAAiE;AAC5E,QAAM,KAAK,gEAAgE;AAC3E,QAAM,KAAK,2CAA2C;AAEtD,QAAM,KAAK,aAAa;AACxB,QAAM,KAAK,qEAAqE;AAChF,QAAM,KAAK,mFAAmF;AAC9F,QAAM,KAAK,gFAAgF;AAE3F,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ZXKLPC2E.js";
|
|
4
4
|
import {
|
|
5
5
|
getAnalyticsTimeseries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LLRQIF52.js";
|
|
7
7
|
import "./chunk-AAQNA53E.js";
|
|
8
8
|
|
|
9
9
|
// src/tools/get-analytics.ts
|
|
@@ -52,4 +52,4 @@ async function handleGetAnalytics(params) {
|
|
|
52
52
|
export {
|
|
53
53
|
handleGetAnalytics
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=get-analytics-
|
|
55
|
+
//# sourceMappingURL=get-analytics-4YJW4S5L.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getEvaluator,
|
|
3
|
+
getEvaluatorType
|
|
4
|
+
} from "./chunk-5UOPNRXW.js";
|
|
5
|
+
import "./chunk-LLRQIF52.js";
|
|
6
|
+
import "./chunk-AAQNA53E.js";
|
|
7
|
+
|
|
8
|
+
// src/tools/get-evaluator.ts
|
|
9
|
+
async function handleGetEvaluator(params) {
|
|
10
|
+
const evaluator = await getEvaluator(params.idOrSlug);
|
|
11
|
+
const evaluatorType = getEvaluatorType(evaluator);
|
|
12
|
+
const lines = [];
|
|
13
|
+
lines.push(`# Evaluator: ${evaluator.name}
|
|
14
|
+
`);
|
|
15
|
+
lines.push(`**ID**: ${evaluator.id}`);
|
|
16
|
+
if (evaluator.slug) lines.push(`**Slug**: ${evaluator.slug}`);
|
|
17
|
+
lines.push(`**Kind**: ${evaluator.type}`);
|
|
18
|
+
if (evaluatorType) lines.push(`**Evaluator Type**: ${evaluatorType}`);
|
|
19
|
+
if (evaluator.config) {
|
|
20
|
+
lines.push("\n## Config");
|
|
21
|
+
lines.push("```json");
|
|
22
|
+
lines.push(JSON.stringify(evaluator.config, null, 2));
|
|
23
|
+
lines.push("```");
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(evaluator.fields) && evaluator.fields.length > 0) {
|
|
26
|
+
lines.push("\n## Input Fields");
|
|
27
|
+
for (const field of evaluator.fields) {
|
|
28
|
+
const opt = field.optional ? " (optional)" : "";
|
|
29
|
+
lines.push(`- **${field.identifier}** (${field.type})${opt}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (Array.isArray(evaluator.outputFields) && evaluator.outputFields.length > 0) {
|
|
33
|
+
lines.push("\n## Output Fields");
|
|
34
|
+
for (const field of evaluator.outputFields) {
|
|
35
|
+
lines.push(`- **${field.identifier}** (${field.type})`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (evaluator.workflowName) {
|
|
39
|
+
lines.push(`
|
|
40
|
+
**Workflow**: ${evaluator.workflowName}`);
|
|
41
|
+
}
|
|
42
|
+
return lines.join("\n");
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
handleGetEvaluator
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=get-evaluator-WDEH2F7M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/get-evaluator.ts"],"sourcesContent":["import {\n getEvaluator as apiGetEvaluator,\n getEvaluatorType,\n} from \"../langwatch-api-evaluators.js\";\n\n/**\n * Handles the platform_get_evaluator MCP tool invocation.\n *\n * Retrieves a specific evaluator by ID or slug and formats it as\n * AI-readable markdown.\n */\nexport async function handleGetEvaluator(params: {\n idOrSlug: string;\n}): Promise<string> {\n const evaluator = await apiGetEvaluator(params.idOrSlug);\n\n const evaluatorType = getEvaluatorType(evaluator);\n\n const lines: string[] = [];\n lines.push(`# Evaluator: ${evaluator.name}\\n`);\n lines.push(`**ID**: ${evaluator.id}`);\n if (evaluator.slug) lines.push(`**Slug**: ${evaluator.slug}`);\n lines.push(`**Kind**: ${evaluator.type}`);\n if (evaluatorType) lines.push(`**Evaluator Type**: ${evaluatorType}`);\n\n if (evaluator.config) {\n lines.push(\"\\n## Config\");\n lines.push(\"```json\");\n lines.push(JSON.stringify(evaluator.config, null, 2));\n lines.push(\"```\");\n }\n\n if (Array.isArray(evaluator.fields) && evaluator.fields.length > 0) {\n lines.push(\"\\n## Input Fields\");\n for (const field of evaluator.fields) {\n const opt = field.optional ? \" (optional)\" : \"\";\n lines.push(`- **${field.identifier}** (${field.type})${opt}`);\n }\n }\n\n if (Array.isArray(evaluator.outputFields) && evaluator.outputFields.length > 0) {\n lines.push(\"\\n## Output Fields\");\n for (const field of evaluator.outputFields) {\n lines.push(`- **${field.identifier}** (${field.type})`);\n }\n }\n\n if (evaluator.workflowName) {\n lines.push(`\\n**Workflow**: ${evaluator.workflowName}`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,mBAAmB,QAErB;AAClB,QAAM,YAAY,MAAM,aAAgB,OAAO,QAAQ;AAEvD,QAAM,gBAAgB,iBAAiB,SAAS;AAEhD,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,gBAAgB,UAAU,IAAI;AAAA,CAAI;AAC7C,QAAM,KAAK,WAAW,UAAU,EAAE,EAAE;AACpC,MAAI,UAAU,KAAM,OAAM,KAAK,aAAa,UAAU,IAAI,EAAE;AAC5D,QAAM,KAAK,aAAa,UAAU,IAAI,EAAE;AACxC,MAAI,cAAe,OAAM,KAAK,uBAAuB,aAAa,EAAE;AAEpE,MAAI,UAAU,QAAQ;AACpB,UAAM,KAAK,aAAa;AACxB,UAAM,KAAK,SAAS;AACpB,UAAM,KAAK,KAAK,UAAU,UAAU,QAAQ,MAAM,CAAC,CAAC;AACpD,UAAM,KAAK,KAAK;AAAA,EAClB;AAEA,MAAI,MAAM,QAAQ,UAAU,MAAM,KAAK,UAAU,OAAO,SAAS,GAAG;AAClE,UAAM,KAAK,mBAAmB;AAC9B,eAAW,SAAS,UAAU,QAAQ;AACpC,YAAM,MAAM,MAAM,WAAW,gBAAgB;AAC7C,YAAM,KAAK,OAAO,MAAM,UAAU,OAAO,MAAM,IAAI,IAAI,GAAG,EAAE;AAAA,IAC9D;AAAA,EACF;AAEA,MAAI,MAAM,QAAQ,UAAU,YAAY,KAAK,UAAU,aAAa,SAAS,GAAG;AAC9E,UAAM,KAAK,oBAAoB;AAC/B,eAAW,SAAS,UAAU,cAAc;AAC1C,YAAM,KAAK,OAAO,MAAM,UAAU,OAAO,MAAM,IAAI,GAAG;AAAA,IACxD;AAAA,EACF;AAEA,MAAI,UAAU,cAAc;AAC1B,UAAM,KAAK;AAAA,gBAAmB,UAAU,YAAY,EAAE;AAAA,EACxD;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPrompt
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLRQIF52.js";
|
|
4
4
|
import "./chunk-AAQNA53E.js";
|
|
5
5
|
|
|
6
6
|
// src/tools/get-prompt.ts
|
|
@@ -13,13 +13,10 @@ async function handleGetPrompt(params) {
|
|
|
13
13
|
);
|
|
14
14
|
if (prompt.handle) lines.push(`**Handle**: ${prompt.handle}`);
|
|
15
15
|
if (prompt.id) lines.push(`**ID**: ${prompt.id}`);
|
|
16
|
-
if (prompt.description) lines.push(`**Description**: ${prompt.description}`);
|
|
17
16
|
if (prompt.latestVersionNumber != null)
|
|
18
17
|
lines.push(`**Latest Version**: v${prompt.latestVersionNumber}`);
|
|
19
18
|
const version = prompt.versions?.[0] ?? prompt;
|
|
20
19
|
if (version.model) lines.push(`**Model**: ${version.model}`);
|
|
21
|
-
if (version.modelProvider)
|
|
22
|
-
lines.push(`**Provider**: ${version.modelProvider}`);
|
|
23
20
|
const messages = version.messages || prompt.prompt || [];
|
|
24
21
|
if (Array.isArray(messages) && messages.length > 0) {
|
|
25
22
|
lines.push("\n## Messages");
|
|
@@ -45,4 +42,4 @@ async function handleGetPrompt(params) {
|
|
|
45
42
|
export {
|
|
46
43
|
handleGetPrompt
|
|
47
44
|
};
|
|
48
|
-
//# sourceMappingURL=get-prompt-
|
|
45
|
+
//# sourceMappingURL=get-prompt-F6PDVC76.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/get-prompt.ts"],"sourcesContent":["import { getPrompt as apiGetPrompt } from \"../langwatch-api.js\";\n\n/**\n * Handles the platform_get_prompt MCP tool invocation.\n *\n * Retrieves a specific prompt by ID or handle and formats it as\n * AI-readable markdown, including messages, model config, and version history.\n */\nexport async function handleGetPrompt(params: {\n idOrHandle: string;\n version?: number;\n}): Promise<string> {\n const prompt = await apiGetPrompt(params.idOrHandle, params.version);\n\n const lines: string[] = [];\n lines.push(\n `# Prompt: ${prompt.name || prompt.handle || prompt.id}\\n`\n );\n\n if (prompt.handle) lines.push(`**Handle**: ${prompt.handle}`);\n if (prompt.id) lines.push(`**ID**: ${prompt.id}`);\n if (prompt.latestVersionNumber != null)\n lines.push(`**Latest Version**: v${prompt.latestVersionNumber}`);\n\n // Show model config\n const version = prompt.versions?.[0] ?? prompt;\n if (version.model) lines.push(`**Model**: ${version.model}`);\n\n // Show messages\n const messages = version.messages || prompt.prompt || [];\n if (Array.isArray(messages) && messages.length > 0) {\n lines.push(\"\\n## Messages\");\n for (const msg of messages) {\n lines.push(`\\n### ${msg.role}`);\n lines.push(msg.content);\n }\n }\n\n // Show version history\n if (prompt.versions && prompt.versions.length > 0) {\n lines.push(\"\\n## Version History\");\n for (const v of prompt.versions.slice(0, 10)) {\n const versionNum = v.version ?? \"?\";\n const commitMsg = v.commitMessage || \"No message\";\n lines.push(`- **v${versionNum}**: ${commitMsg}`);\n }\n if (prompt.versions.length > 10) {\n lines.push(`... and ${prompt.versions.length - 10} more versions`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAQA,eAAsB,gBAAgB,QAGlB;AAClB,QAAM,SAAS,MAAM,UAAa,OAAO,YAAY,OAAO,OAAO;AAEnE,QAAM,QAAkB,CAAC;AACzB,QAAM;AAAA,IACJ,aAAa,OAAO,QAAQ,OAAO,UAAU,OAAO,EAAE;AAAA;AAAA,EACxD;AAEA,MAAI,OAAO,OAAQ,OAAM,KAAK,eAAe,OAAO,MAAM,EAAE;AAC5D,MAAI,OAAO,GAAI,OAAM,KAAK,WAAW,OAAO,EAAE,EAAE;AAChD,MAAI,OAAO,uBAAuB;AAChC,UAAM,KAAK,wBAAwB,OAAO,mBAAmB,EAAE;AAGjE,QAAM,UAAU,OAAO,WAAW,CAAC,KAAK;AACxC,MAAI,QAAQ,MAAO,OAAM,KAAK,cAAc,QAAQ,KAAK,EAAE;AAG3D,QAAM,WAAW,QAAQ,YAAY,OAAO,UAAU,CAAC;AACvD,MAAI,MAAM,QAAQ,QAAQ,KAAK,SAAS,SAAS,GAAG;AAClD,UAAM,KAAK,eAAe;AAC1B,eAAW,OAAO,UAAU;AAC1B,YAAM,KAAK;AAAA,MAAS,IAAI,IAAI,EAAE;AAC9B,YAAM,KAAK,IAAI,OAAO;AAAA,IACxB;AAAA,EACF;AAGA,MAAI,OAAO,YAAY,OAAO,SAAS,SAAS,GAAG;AACjD,UAAM,KAAK,sBAAsB;AACjC,eAAW,KAAK,OAAO,SAAS,MAAM,GAAG,EAAE,GAAG;AAC5C,YAAM,aAAa,EAAE,WAAW;AAChC,YAAM,YAAY,EAAE,iBAAiB;AACrC,YAAM,KAAK,QAAQ,UAAU,OAAO,SAAS,EAAE;AAAA,IACjD;AACA,QAAI,OAAO,SAAS,SAAS,IAAI;AAC/B,YAAM,KAAK,WAAW,OAAO,SAAS,SAAS,EAAE,gBAAgB;AAAA,IACnE;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getScenario
|
|
3
|
+
} from "./chunk-6U4TCGFC.js";
|
|
4
|
+
import "./chunk-LLRQIF52.js";
|
|
5
|
+
import "./chunk-AAQNA53E.js";
|
|
6
|
+
|
|
7
|
+
// src/tools/get-scenario.ts
|
|
8
|
+
async function handleGetScenario(params) {
|
|
9
|
+
const scenario = await getScenario(params.scenarioId);
|
|
10
|
+
if (params.format === "json") {
|
|
11
|
+
return JSON.stringify(scenario, null, 2);
|
|
12
|
+
}
|
|
13
|
+
const lines = [];
|
|
14
|
+
lines.push(`# Scenario: ${scenario.name}
|
|
15
|
+
`);
|
|
16
|
+
lines.push(`**ID**: ${scenario.id}`);
|
|
17
|
+
lines.push(`**Situation**: ${scenario.situation}`);
|
|
18
|
+
if (Array.isArray(scenario.criteria) && scenario.criteria.length > 0) {
|
|
19
|
+
lines.push("\n## Criteria");
|
|
20
|
+
for (const criterion of scenario.criteria) {
|
|
21
|
+
lines.push(`- ${criterion}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (Array.isArray(scenario.labels) && scenario.labels.length > 0) {
|
|
25
|
+
lines.push(`
|
|
26
|
+
**Labels**: ${scenario.labels.join(", ")}`);
|
|
27
|
+
}
|
|
28
|
+
return lines.join("\n");
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
handleGetScenario
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=get-scenario-H24ZYNT5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/get-scenario.ts"],"sourcesContent":["import { getScenario as apiGetScenario } from \"../langwatch-api-scenarios.js\";\n\n/**\n * Handles the get_scenario MCP tool invocation.\n *\n * Retrieves a specific scenario by ID and formats it as\n * AI-readable markdown or raw JSON.\n */\nexport async function handleGetScenario(params: {\n scenarioId: string;\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const scenario = await apiGetScenario(params.scenarioId);\n\n if (params.format === \"json\") {\n return JSON.stringify(scenario, null, 2);\n }\n\n const lines: string[] = [];\n lines.push(`# Scenario: ${scenario.name}\\n`);\n lines.push(`**ID**: ${scenario.id}`);\n lines.push(`**Situation**: ${scenario.situation}`);\n\n if (Array.isArray(scenario.criteria) && scenario.criteria.length > 0) {\n lines.push(\"\\n## Criteria\");\n for (const criterion of scenario.criteria) {\n lines.push(`- ${criterion}`);\n }\n }\n\n if (Array.isArray(scenario.labels) && scenario.labels.length > 0) {\n lines.push(`\\n**Labels**: ${scenario.labels.join(\", \")}`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,kBAAkB,QAGpB;AAClB,QAAM,WAAW,MAAM,YAAe,OAAO,UAAU;AAEvD,MAAI,OAAO,WAAW,QAAQ;AAC5B,WAAO,KAAK,UAAU,UAAU,MAAM,CAAC;AAAA,EACzC;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,eAAe,SAAS,IAAI;AAAA,CAAI;AAC3C,QAAM,KAAK,WAAW,SAAS,EAAE,EAAE;AACnC,QAAM,KAAK,kBAAkB,SAAS,SAAS,EAAE;AAEjD,MAAI,MAAM,QAAQ,SAAS,QAAQ,KAAK,SAAS,SAAS,SAAS,GAAG;AACpE,UAAM,KAAK,eAAe;AAC1B,eAAW,aAAa,SAAS,UAAU;AACzC,YAAM,KAAK,KAAK,SAAS,EAAE;AAAA,IAC7B;AAAA,EACF;AAEA,MAAI,MAAM,QAAQ,SAAS,MAAM,KAAK,SAAS,OAAO,SAAS,GAAG;AAChE,UAAM,KAAK;AAAA,cAAiB,SAAS,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EAC1D;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTraceById
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLRQIF52.js";
|
|
4
4
|
import "./chunk-AAQNA53E.js";
|
|
5
5
|
|
|
6
6
|
// src/tools/get-trace.ts
|
|
@@ -47,4 +47,4 @@ ${result.formatted_trace}`);
|
|
|
47
47
|
export {
|
|
48
48
|
handleGetTrace
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=get-trace-
|
|
50
|
+
//# sourceMappingURL=get-trace-27USKGO7.js.map
|