Skip to content

Commit

Permalink
feat: add summarization prompts (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpidanny authored May 12, 2023
1 parent 24698a8 commit 693ee2b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/chrome-extension/src/pages/Content/prompts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
BasicSummarizationPrompt,
CodeErrorHelpPrompt,
GeneralKnowledgePrompt,
IPrompt,
Expand All @@ -8,6 +9,7 @@ import {
QuestionWithContextPrompt,
QuestionWithReasoningPrompt,
SQLQueryPrompt,
SummarizationIntoListPrompt,
WriteTestsPrompt,
ZeroShotCoTAPEPrompt,
ZeroShotCoTPrompt,
Expand All @@ -30,6 +32,8 @@ const generalPrompts: IPrompt[] = [
QuestionWithContextPrompt,
ZeroShotCoTPrompt,
ZeroShotCoTAPEPrompt,
BasicSummarizationPrompt,
SummarizationIntoListPrompt,
GeneralKnowledgePrompt,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,36 @@ export const ZeroShotCoTAPEPrompt: IPrompt = {
Let's work this out in a step by step way to be sure we have the right answer.`,
};

export const BasicSummarizationPrompt: IPrompt = {
name: 'Basic Summarization',
description: `This prompt asks the LLM to summarize a given text.`,
tags: [Tag.Summarization],
category: PromptCategory.General,
content: `Write a concise summary of the following text delimited by triple backquotes.
Please provide your output in a manner that a 5 year old would understand.
\`\`\`
{text}
\`\`\`
SUMMARY:`,
};

export const SummarizationIntoListPrompt: IPrompt = {
name: 'Summarization Into List',
description: `This prompt asks the LLM to summarize a given text into a list of bullet points.`,
tags: [Tag.Summarization],
category: PromptCategory.General,
content: `Write a concise summary of the following text delimited by triple backquotes.
Return your response in bullet points which covers the key points of the text.
\`\`\`
{text}
\`\`\`
BULLET POINT SUMMARY:`,
};

// https://arxiv.org/abs/2110.08387
export const GeneralKnowledgePrompt: IPrompt = {
name: 'General Knowledge',
Expand Down
2 changes: 1 addition & 1 deletion libs/llm-prompt-templates/src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './categories.enum';
export * from './code';
export * from './general';
export * from './interfaces';
export * from './pal';
export * from './question';
export * from './tags.enum';
1 change: 1 addition & 0 deletions libs/llm-prompt-templates/src/core/tags.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export enum Tag {
Error = 'error',
Debugging = 'debugging',
SQL = 'sql',
Summarization = 'summarization',
}

0 comments on commit 693ee2b

Please sign in to comment.