Qwen 2 for Skill Description and Vibe Coding Generation

implementationChallenge

Prompt Content

Implement a Mastra AI tool that uses Qwen 2 to generate a detailed `descriptionGenerated` based on a user's `skill_description` and `experience_years`. Additionally, use Qwen 2 to generate a `vibeCodingAssessment` (e.g., 'Analytical', 'Collaborative') based on the skill. Show how this tool is called by your Mastra AI agent and updates the 'SkillProof' document in memory.

```typescript
import { createTool } from '@mastra-ai/core';
import { Qwen2 } from '@mastra-ai/llm-qwen2'; // Conceptual Qwen2 Mastra integration

const qwen2_llm = new Qwen2({ apiKey: 'YOUR_QWEN_API_KEY' });

const generateSkillContentTool = createTool({
  name: 'generateSkillContent',
  description: 'Generates a skill description and vibe coding assessment using Qwen 2.',
  input: { type: 'object', properties: { skillDescription: { type: 'string' }, experienceYears: { type: 'number' } } },
  output: { type: 'object', properties: { description: { type: 'string' }, vibeCoding: { type: 'string' } } },
  async handler({ skillDescription, experienceYears }) {
    const prompt = `Generate a detailed skill description for someone with ${experienceYears} years of experience in '${skillDescription}'. Also, provide 3-4 keywords for their 'vibe coding' based on this skill (e.g., 'Analytical, Problem-Solver').\nDescription: \nVibe Coding:`;
    // const response = await qwen2_llm.generate({ prompt });
    // Parse response into description and vibeCoding
    return { description: 'Generated description...', vibeCoding: 'Generated vibe codes...' };
  },
});

// Agent would call this tool and update its internal SkillProofDocument state.
```

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations