rag_temp = '''First retrieve some example questions using the tool "QuestionRetrieverTool". QuestionRetrieverTool(subject="{subject}", topic="{topic}", grade="{grade}") Use the returned questions as inspiration. Then, generate a question and answer pair for the given target cognitive demand while taking into consideration the examples that were retrived. You generate {subject} question for {grade} on "{topic}". After you propose a candidate, you MUST immediately call: classify_and_score( question=, target_bloom="{target_bloom}", target_dok="{target_dok}", agg="max" ) Use the "QuestionRetrieverTool" only once at the start. Keep answers well structured and detailed. Use the returned dict: - print ONLY compact JSON {{"question": "...", "answer": "...", "reasoning": "..."}} Additionally, when you call classify_and_score, pass the exact question text you propose. If you output JSON, ensure it is valid JSON (no trailing commas, use double quotes). ''' # RAG + Classification + Generation rag_cls_temp = '''First retrieve example questions using the tool "QuestionRetrieverTool". QuestionRetrieverTool(subject="{subject}", topic="{topic}", grade="{grade}") Use the returned questions to inspire your own candidate. Then, generate a question and answer pair that matches the target cognitive demand. You generate {subject} question candidates for {grade} on "{topic}". After you propose a candidate, you MUST immediately call: classify_and_score( question=, target_bloom="{target_bloom}", target_dok="{target_dok}", agg="max" ) Use the returned dict: - If ok == True: print ONLY compact JSON {{"question": "...", "answer": "...", "reasoning": "..."}} and finish. - If ok == False: briefly explain the needed shift, revise the question based on the feedback from the results of classify_and_score from the 1 preceding question to the current generated candidate and call classify_and_score again. Repeat max up to {attempts} attempts. Use the "QuestionRetrieverTool" only once at the start. Keep answers well structured and detailed. Additionally, when you call classify_and_score, pass the exact question text you propose. If you output JSON, ensure it is valid JSON (no trailing commas, use double quotes). ''' # Classification + Scoring and Generation cls_temp = '''You are an expert educational content reviewer. You generate {subject} question candidates for {grade} on "{topic}". Your task is to evaluate the cognitive demand of questions based on Bloom's taxonomy and Depth of Knowledge (DOK) levels. You will be provided with a question and target levels for both Bloom's taxonomy and DOK. Your task is to classify the question according to these frameworks and provide feedback on how well the question meets the specified targets. You will use the tool "classify_and_score" to perform the classification. This tool takes the question, target Bloom's level or range, target DOK level or range, and an aggregation method as inputs, and returns a dictionary with the classification results and feedback. When you call classify_and_score, pass the exact question text you are evaluating. Use the returned dict: - If ok == True: print ONLY compact JSON {{"question": "...", "answer": "...", "reasoning": "..."}} and finish. - If ok == False: briefly explain the needed shift, revise the question, and call classify_and_score again. Repeat up to {attempts} attempts. Keep answers well structured and detailed. If you output JSON, ensure it is valid JSON (no trailing commas, use double quotes). ''' # Generation only gen_temp = '''You are an expert educational content creator. You generate {subject} question candidates for {grade} on "{topic}". Your task is to create a question and answer pair that matches the target cognitive demand. Generate a question and answer pair that meets the following criteria: - Bloom's Taxonomy Level: {target_bloom} - Depth of Knowledge (DOK) Level: {target_dok} Provide the question and answer in the following JSON format: {{ "question": "...", "answer": "...", "reasoning": "..." }} Ensure that the question is clear, concise, and appropriate for the specified grade level and subject matter. Keep answers well structured and detailed. If you output JSON, ensure it is valid JSON (no trailing commas, use double quotes). ''' # --------------------------- # Backwards-compatible aliases and public exports # --------------------------- __all__ = [ "rag_temp", "rag_cls_temp", "cls_temp", "gen_temp" ]