feat(*): Improve the display of tool usage

This commit is contained in:
Josh Creek
2025-04-21 16:54:52 +01:00
parent 76fcdac563
commit 4f5babbe23
10 changed files with 381 additions and 189 deletions
+7 -1
View File
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const conceptVerifierToolMeta = {
key: 'verifyConceptCoverage',
userDescription: 'Checking for required concepts from the rubric',
icon: '📋',
};
export const conceptVerifierTool = ToolUtility.createFunctionTool({
name: 'verifyConceptCoverage',
name: conceptVerifierToolMeta.key,
description: 'Checks which rubriclisted concepts appear (or are missing) in the submission.',
parameters: {
type: 'object',
+7 -1
View File
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const essayAnalyzerToolMeta = {
key: 'analyzeEssay',
userDescription: 'Analyzing essay structure and argument quality',
icon: '📝',
};
export const essayAnalyzerTool = ToolUtility.createFunctionTool({
name: 'analyzeEssay',
name: essayAnalyzerToolMeta.key,
description: 'Analyzes an essay for structure, argument, and evidence.',
parameters: {
type: 'object',
+7 -1
View File
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const feedbackGeneratorToolMeta = {
key: 'generateFeedback',
userDescription: 'Generating personalized feedback for the student',
icon: '🌟',
};
export const feedbackGeneratorTool = ToolUtility.createFunctionTool({
name: 'generateFeedback',
name: feedbackGeneratorToolMeta.key,
description: 'Produces two praise points and two actionable “try next time” suggestions based on submission and rubric.',
parameters: {
type: 'object',
+7 -7
View File
@@ -1,7 +1,7 @@
export { rubricMatcherTool } from './rubricMatcherTool';
export { essayAnalyzerTool } from './essayAnalyzerTool';
export { conceptVerifierTool } from './conceptVerifierTool';
export { feedbackGeneratorTool } from './feedbackGeneratorTool';
export { metacognitiveReflectionPromptTool } from './metacognitiveReflectionPromptTool';
export { selfAssessmentTool } from './selfAssessmentTool';
export { spellingAndGrammarCheckerTool } from './spellingAndGrammarCheckerTool';
export { rubricMatcherTool, rubricMatcherToolMeta } from './rubricMatcherTool';
export { essayAnalyzerTool, essayAnalyzerToolMeta } from './essayAnalyzerTool';
export { conceptVerifierTool, conceptVerifierToolMeta } from './conceptVerifierTool';
export { feedbackGeneratorTool, feedbackGeneratorToolMeta } from './feedbackGeneratorTool';
export { metacognitiveReflectionPromptTool, metacognitiveReflectionPromptToolMeta } from './metacognitiveReflectionPromptTool';
export { selfAssessmentTool, selfAssessmentToolMeta } from './selfAssessmentTool';
export { spellingAndGrammarCheckerTool, spellingAndGrammarCheckerToolMeta } from './spellingAndGrammarCheckerTool';
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const metacognitiveReflectionPromptToolMeta = {
key: 'generateReflectionPrompts',
userDescription: 'Suggesting ways the student can improve next time',
icon: '💭',
};
export const metacognitiveReflectionPromptTool = ToolUtility.createFunctionTool({
name: 'generateReflectionPrompts',
name: metacognitiveReflectionPromptToolMeta.key,
description: 'Based on rubric shortfalls, generates prompts like “How could you strengthen your evidence in paragraph 2?”',
parameters: {
type: 'object',
+7 -1
View File
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const rubricMatcherToolMeta = {
key: 'matchRubric',
userDescription: 'Assessing the submission against the provided rubric',
icon: '📊',
};
export const rubricMatcherTool = ToolUtility.createFunctionTool({
name: 'matchRubric',
name: rubricMatcherToolMeta.key,
description: 'Matches a submission to a rubric and returns a score/criteria breakdown.',
parameters: {
type: 'object',
+7 -1
View File
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const selfAssessmentToolMeta = {
key: 'createSelfAssessment',
userDescription: 'Creating self-reflection questions for the student',
icon: '🔎',
};
export const selfAssessmentTool = ToolUtility.createFunctionTool({
name: 'createSelfAssessment',
name: selfAssessmentToolMeta.key,
description: 'Generates 3 short questions that prompt the student to reflect on their own work based on rubric gaps.',
parameters: {
type: 'object',
@@ -1,7 +1,13 @@
import { ToolUtility } from '@azure/ai-projects';
export const spellingAndGrammarCheckerToolMeta = {
key: 'checkSpellingAndGrammar',
userDescription: 'Checking for spelling and grammar mistakes',
icon: '📝',
};
export const spellingAndGrammarCheckerTool = ToolUtility.createFunctionTool({
name: 'checkSpellingAndGrammar',
name: spellingAndGrammarCheckerToolMeta.key,
description: 'Identifies spelling, punctuation, and syntax issues in the submission and suggests corrections.',
parameters: {
type: 'object',