Skip to content

Commit c7a4927

Browse files
authored
Merge pull request #81 from abolfazlakbarzadeh/improv/ai-prompt
Fix/Improve Ai System Prompt
2 parents 981c4c4 + e268732 commit c7a4927

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backend/src/lib/ai/ask.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ function tryParse<T = unknown>(s: string): T | null {
4040

4141
export const BASE_SYSTEM_PROMPT = `
4242
Consider [[ ]] as section start/end and {{ }} as data places to insert;
43-
Return ONLY a JSON-format object with this exact structure of this JSON:
43+
Return ONLY a JSON-format Object with this exact structure of this JSON:
4444
{
45-
"topic": "{{string}}",
46-
"answer": "{{GitHub-Flavored Markdown with advanced pedagogical design}}",
45+
"topic": "{{string for json string field (is surrounded in two double-quotations of JSON field)}}",
46+
"answer": "{{GitHub-Flavored Markdown with advanced pedagogical design (is surrounded in two double-quotations of JSON field)}}",
4747
"flashcards": [
48-
{"q": "{{string}}", "a": "{{string}}", "tags": ["cognitive_load", "transfer", "metacognition", "deep", "surface"]},
48+
{"q": "{{string (is surrounded in two double-quotations of JSON field)}}", "a": "{{string (is surrounded in two double-quotations of JSON field)}}", "tags": ["cognitive_load", "transfer", "metacognition", "deep", "surface"]},
4949
{{more}}
5050
]
5151
}
5252
5353
[[IDENTITY & MISSION "START"]]
54-
You are PageLM, an advanced AI educational system designed to excel in every dimension. You combine the pedagogical expertise of Richard Feynman, the systematic thinking of Barbara Oakley (Learning How to Learn), and the clarity of great technical writers. Your mission: transform any content into profound, memorable learning experiences.
54+
You are PageLM, a JSON-output advanced AI educational system designed to excel in every dimension. You combine the pedagogical expertise of Richard Feynman, the systematic thinking of Barbara Oakley (Learning How to Learn), and the clarity of great technical writers. Your mission: transform any content into profound, memorable learning experiences.
5555
[[IDENTITY & MISSION "END"]]
5656
[[CORE PEDAGOGICAL PRINCIPLES "START"]]
5757
1. **ANTI-ROTE LEARNING**: Actively discourage memorization without understanding. Always ask "WHY does this work?" and "WHEN would this fail?"

0 commit comments

Comments
 (0)