Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ts example #128

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export class IsProfessionalTone extends BaseTestEvaluator<
> {
id = 'is-professional-tone';

// Since this evaluator makes calls to an external service (openai),
// restrict how many evaluations can be made concurrently
// with this evaluator.
maxConcurrency = 2;

prompt = `Please evaluate the provided text for its professionalism in the context of formal communication.
Consider the following criteria in your assessment:

Expand Down Expand Up @@ -79,6 +84,11 @@ export class IsSupportedByNotes extends BaseTestEvaluator<
> {
id = 'is-supported-by-notes';

// Since this evaluator makes calls to an external service (openai),
// restrict how many evaluations can be made concurrently
// with this evaluator.
maxConcurrency = 2;

prompt = `Given some notes by a student and a flashcard in the form of a question and answer, evaluate whether the flashcard's question and answer are supported by the notes.
It's possible the question and answer aren't in the notes verbatim.
If the notes provide enough context or information to support the question and answer, consider that sufficient support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ export async function run() {
fn: (args: { testCase: TestCase }) =>
genFlashcardsFromNotes(args.testCase.notes),
maxTestCaseConcurrency: 5,
maxEvaluatorConcurrency: 1,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ export async function run() {
fn: (args: { testCase: TestCase }) =>
genStudyGuideOutline(args.testCase.topic),
maxTestCaseConcurrency: 5,
maxEvaluatorConcurrency: 2,
});
}
Loading