From b09970a89b946677899c26052d5b07639591741f Mon Sep 17 00:00:00 2001 From: alyssachvasta Date: Tue, 17 Dec 2024 18:53:54 +0000 Subject: [PATCH] Change 'statements' to 'comments' in intro GitOrigin-RevId: a442041895628d04b2d59fdc5fba963d8f0722a9 --- src/tasks/stats_checker.test.ts | 8 ++++---- src/tasks/stats_checker.ts | 2 +- src/tasks/summarization.test.ts | 4 ++-- src/tasks/summarization.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tasks/stats_checker.test.ts b/src/tasks/stats_checker.test.ts index 32f1358..2248ff7 100644 --- a/src/tasks/stats_checker.test.ts +++ b/src/tasks/stats_checker.test.ts @@ -27,21 +27,21 @@ const TEST_SUMMARY_STATS = new SummaryStats([ describe("StatsCheckerTest", () => { it("should return true for a good summary", () => { - const summary = "There are 60 votes and 5 statements."; + const summary = "There are 60 votes and 5 comments."; expect( summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY) ).toBeTruthy(); }); - it("should return false if missing the right statement count", () => { - const summary = "There are 60 votes and 6 statements."; + it("should return false if missing the right comment count", () => { + const summary = "There are 60 votes and 6 comments."; expect( summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY) ).toBeFalsy(); }); it("should return false if missing the right vote count", () => { - const summary = "There are 6 votes and 5 statements."; + const summary = "There are 6 votes and 5 comments."; expect( summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY) ).toBeFalsy(); diff --git a/src/tasks/stats_checker.ts b/src/tasks/stats_checker.ts index 6b54ef1..ff366a6 100644 --- a/src/tasks/stats_checker.ts +++ b/src/tasks/stats_checker.ts @@ -29,7 +29,7 @@ export function summaryContainsStats( summaryStats: SummaryStats, summarizationType: SummarizationType ): boolean { - if (!summary.includes(`${summaryStats.commentCount} statements`)) { + if (!summary.includes(`${summaryStats.commentCount} comments`)) { console.error(`Summary does not contain the correct number of total comments from the deliberation. commentCount=${summaryStats.commentCount} and summary=${summary}`); return false; diff --git a/src/tasks/summarization.test.ts b/src/tasks/summarization.test.ts index e18fd82..c64644e 100644 --- a/src/tasks/summarization.test.ts +++ b/src/tasks/summarization.test.ts @@ -62,7 +62,7 @@ describe("SummaryTest", () => { it("prompt should include the comment count and the vote count", () => { // Has 2 comments and 55 votes. expect(getSummarizationInstructions(true, new SummaryStats(TEST_COMMENTS))).toContain( - "2 statements" + "2 comments" ); expect(getSummarizationInstructions(true, new SummaryStats(TEST_COMMENTS))).toContain( "55 votes" @@ -72,7 +72,7 @@ describe("SummaryTest", () => { it("prompt shouldn't include votes if groups aren't included", () => { // Has 2 comments and 55 votes. expect(getSummarizationInstructions(false, new SummaryStats(TEST_COMMENTS))).toContain( - "2 statements" + "2 comments" ); expect(getSummarizationInstructions(false, new SummaryStats(TEST_COMMENTS))).not.toContain( "55 votes" diff --git a/src/tasks/summarization.ts b/src/tasks/summarization.ts index 7aca01b..312c724 100644 --- a/src/tasks/summarization.ts +++ b/src/tasks/summarization.ts @@ -68,7 +68,7 @@ ${includeGroups ? "## Description of Groups" : ""} ## Conclusion The introduction should be one paragraph long and contain ${includeGroups ? "five" : "four"} sentences. -The first sentence should include the information that there were ${summaryStats.commentCount} statements ${includeGroups ? `that had ${summaryStats.voteCount} votes` : ""}. +The first sentence should include the information that there were ${summaryStats.commentCount} comments ${includeGroups ? `that had ${summaryStats.voteCount} votes` : ""}. The second sentence should include what topics were discussed. ${ includeGroups