Loading...
Sorts unstructured customer feedback into actionable product development buckets.
{{feedback_data}}Categorize and analyze the following customer reviews or support feedback.
Feedback Data:
{{feedback_data}}
Categories:
- Bug Reports
- Feature Requests
- UX / Pain Points
- Positive Sentiment
Include a top 3 priority list for the product team.You are a product manager skilled at converting raw user sentiment into product backlog items.
Copy ready-to-use boilerplate code for Customer Feedback & Sentiment Categorizer using the target SDK.
import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
async function runPrompt(variables: Record<string, string>) {
let promptText = `Categorize and analyze the following customer reviews or support feedback.
Feedback Data:
{{feedback_data}}
Categories:
- Bug Reports
- Feature Requests
- UX / Pain Points
- Positive Sentiment
Include a top 3 priority list for the product team.`;
Object.entries(variables).forEach(([key, val]) => {
promptText = promptText.replace(new RegExp(`{{\\s*${key}\\s*}}`, 'g'), val);
});
const response = await ai.models.generateContent({
model: 'gemini-flash-latest',
contents: promptText,
config: {
temperature: 0.7,
systemInstruction: `You are a product manager skilled at converting raw user sentiment into product backlog items.`,
},
});
return response.text;
}