Skip to content

Commit 4cf31c7

Browse files
authored
Fixed some minor Typos (#796)
Typos made it hard to copy paste and use without syntax correcting manually
1 parent e141f51 commit 4cf31c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/evaluation/tutorials/rag.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ One way to think about different types of RAG evaluators is as a tuple of what i
453453
STUDENT ANSWER: \${outputs.answer}\`
454454
455455
// Run evaluator
456-
const grade = graderLLM.invoke([{role: "system", content: correctnessInstructions}, {role: "user", content: answer}])\
456+
const grade = graderLLM.invoke([{role: "system", content: correctnessInstructions}, {role: "user", content: answer}])
457457
return grade.score
458458
};
459459
`,
@@ -552,7 +552,7 @@ Without a reference answer we can't grade accuracy, but can still grade relevanc
552552
STUDENT ANSWER: \${outputs.answer}\`
553553
554554
// Run evaluator
555-
const grade = relevanceLLM.invoke([{role: "system", content: relevanceInstructions}, {role: "user", content: answer}])\
555+
const grade = relevanceLLM.invoke([{role: "system", content: relevanceInstructions}, {role: "user", content: answer}])
556556
return grade.relevant
557557
};
558558
`,
@@ -649,7 +649,7 @@ Another useful way to evaluate responses without needing reference answers is to
649649
STUDENT ANSWER: \${outputs.answer}\`
650650
651651
// Run evaluator
652-
const grade = groundedLLM.invoke([{role: "system", content: groundedInstructions}, {role: "user", content: answer}])\
652+
const grade = groundedLLM.invoke([{role: "system", content: groundedInstructions}, {role: "user", content: answer}])
653653
return grade.grounded
654654
};
655655
`,
@@ -750,7 +750,7 @@ Another useful way to evaluate responses without needing reference answers is to
750750
QUESTION: \${inputs.question}\`
751751
752752
// Run evaluator
753-
const grade = retrievalRelevanceLLM.invoke([{role: "system", content: retrievalRelevanceInstructions}, {role: "user", content: answer}])\
753+
const grade = retrievalRelevanceLLM.invoke([{role: "system", content: retrievalRelevanceInstructions}, {role: "user", content: answer}])
754754
return grade.relevant
755755
};
756756
`,
@@ -781,7 +781,7 @@ We can now kick off our evaluation job with all of our different evaluators.
781781
typescript`
782782
import { evaluate } from "langsmith/evaluation";
783783
784-
const targetFunc = (input: Record<string, any>) => {
784+
const targetFunc = (inputs: Record<string, any>) => {
785785
return ragBot(inputs.question)
786786
};
787787
@@ -1251,7 +1251,7 @@ Here's a consolidated script with all the above code:
12511251
STUDENT ANSWER: \${outputs.answer}\`
12521252
12531253
// Run evaluator
1254-
const grade = graderLLM.invoke([{role: "system", content: correctnessInstructions}, {role: "user", content: answer}])\
1254+
const grade = graderLLM.invoke([{role: "system", content: correctnessInstructions}, {role: "user", content: answer}])
12551255
return grade.score
12561256
};
12571257
@@ -1299,7 +1299,7 @@ Here's a consolidated script with all the above code:
12991299
STUDENT ANSWER: \${outputs.answer}\`
13001300
13011301
// Run evaluator
1302-
const grade = relevanceLLM.invoke([{role: "system", content: relevanceInstructions}, {role: "user", content: answer}])\
1302+
const grade = relevanceLLM.invoke([{role: "system", content: relevanceInstructions}, {role: "user", content: answer}])
13031303
return grade.relevant
13041304
};
13051305
@@ -1348,7 +1348,7 @@ Here's a consolidated script with all the above code:
13481348
STUDENT ANSWER: \${outputs.answer}\`
13491349
13501350
// Run evaluator
1351-
const grade = groundedLLM.invoke([{role: "system", content: groundedInstructions}, {role: "user", content: answer}])\
1351+
const grade = groundedLLM.invoke([{role: "system", content: groundedInstructions}, {role: "user", content: answer}])
13521352
return grade.grounded
13531353
};
13541354
@@ -1398,7 +1398,7 @@ Here's a consolidated script with all the above code:
13981398
QUESTION: \${inputs.question}\`
13991399
14001400
// Run evaluator
1401-
const grade = retrievalRelevanceLLM.invoke([{role: "system", content: retrievalRelevanceInstructions}, {role: "user", content: answer}])\
1401+
const grade = retrievalRelevanceLLM.invoke([{role: "system", content: retrievalRelevanceInstructions}, {role: "user", content: answer}])
14021402
return grade.relevant
14031403
};
14041404

0 commit comments

Comments
 (0)