Skip to content

Commit 14d98e8

Browse files
committed
feat: improve prompt
1 parent 629895e commit 14d98e8

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/scripts/glossary.genai.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GenAIScript to create a shared glossary from markdown files in lessons
22
script({
3-
title: "Generate Glossary from Lessons",
3+
title: "Generate glossary from lessons",
44
description: "Process all markdown files under /lessons/** to create a shared glossary.md file",
55
parameters: {
66
force: {
@@ -57,7 +57,7 @@ You are tasked with creating a comprehensive glossary of technical terms from th
5757
${allContent}
5858
5959
## Instructions:
60-
1. Extract technical terms related to:
60+
1. Extract technical terms from the content to analyze related to:
6161
- Generative AI and Machine Learning concepts
6262
- Programming and development terms
6363
- Web development technologies
@@ -69,13 +69,14 @@ ${allContent}
6969
7070
3. Focus on terms that would be valuable for developers learning about AI and JavaScript. Avoid terms that are too basic or not relevant to the context of AI and JavaScript development
7171
72-
4. Exclude common programming terms that most developers would know (like "function", "variable", "array") and historical terms that are only there for the storytelling aspect of the lessons.
72+
4. Exclude thise terms and concepts:
73+
- Common programming terms that most developers would know (like "function", "variable", "array")
74+
- Historical terms or concepts that are only there for the storytelling aspect of the lessons
75+
- Terms that are too similar to existing terms. For example, "Chain of Thought" and "Chain of Thought Prompting" are too similar and should not both be included.
7376
74-
5. Exclude terms that are too similar to existing terms. For example, "Chain of Thought" and "Chain of Thought Prompting" are too similar and should not both be included.
77+
5. Format each entry as: **Term**: Definition
7578
76-
6. Format each entry as: **Term**: Definition
77-
78-
7. It's OK to not output anything if no new terms are found. In that case, just return an empty string.
79+
6. It's OK to not output anything if no new terms are found. In that case, just return an empty string.
7980
8081
${
8182
existingTerms.size > 0
@@ -170,5 +171,5 @@ await workspace.writeText(glossaryPath, finalGlossary);
170171
console.log(`Glossary saved to ${glossaryPath}`);
171172

172173
env.output.appendContent(`Glossary generated with ${glossarySize} terms (previously ${previousSize} terms).\n\n`);
173-
env.output.appendContent(`Glossary saved to \`${glossaryPath}\``);
174-
174+
env.output.appendContent(`Glossary saved to \`${glossaryPath}\`.\n`);
175+
env.output.appendContent(`Make sure to perform a manual review before committing the changes to ensure accuracy and relevance of the terms.\n\n`);

0 commit comments

Comments
 (0)