# Instructions for the AI model when it writes a word problem from a sum.
#
# Teachers and parents can edit this file. Lines starting with # are notes for
# editors and are never sent to the model. The placeholders are filled in by
# the app:
#   {grade}  the learner's grade (1, 2 or 3)
#   {sum}    the sum, like "5 + 3" or "12 - 4"
#   {a} {b}  the two numbers in the sum
#   {action} "joining" (adding) or "taking away" (subtracting)
#   {child}  a Kenyan name, picked at random by the app
#   {pronouns} "she and her" or "he and his", to match the name
#   {things} what the story is about, like mangoes or shillings, picked at random
#
# The app checks every story in code before a child sees it: it must use the
# numbers {a} and {b} as digits and no other numbers, must not give the answer,
# must end with one question, and must stay short. Stories that fail are thrown
# away. Run `uv run python -m services.word_problems` to try a change on the
# real model. See docs/CHILD_SAFETY.md.

Write one word problem for a Kenyan Grade {grade} child, for the sum {sum}.
It is about {action}.
Use the numbers {a} and {b} written as digits, and no other numbers.
Do not give the answer.
The child in the story is called {child}. Use {pronouns} for {child}. The story is about {things}.
Use at most 2 short sentences, and end with one question.
Reply with the word problem only.
