From 3345a9db9bf043690225082882fc14c63585344d Mon Sep 17 00:00:00 2001 From: Joel Alexander Date: Wed, 13 Mar 2024 19:48:08 -0400 Subject: [PATCH] feat(evals): async evals + cookbook using deployments --- .../tracing_with_fetched_deployed_prompt.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/cookbook/tracing_with_fetched_deployed_prompt.ts b/src/cookbook/tracing_with_fetched_deployed_prompt.ts index 5cc4ac2..a5ac83b 100644 --- a/src/cookbook/tracing_with_fetched_deployed_prompt.ts +++ b/src/cookbook/tracing_with_fetched_deployed_prompt.ts @@ -75,6 +75,19 @@ async function llmJudgeEval(log: Log): Promise { } const _ragTemplate = async (deployment_id: string, llm_inputs: Record): Promise => { + // The Deployed Prompt is: + // Use the following pieces of context to answer the question. Do not make up an answer if no context is provided to help answer it. + // + // Context: + // --------- + // {{context}} + // + // --------- + // Question: {{question}} + // --------- + // + // Answer: + const deployedPrompt: UseDeployedPromptResponse = await getPrompt(deployment_id, llm_inputs); const response = await callOpenAI( deployedPrompt.prompt?.messages,