GitHub Copilot Prompt to Analyze Customer Reviews
GitHub Copilot, GitHub's AI assistant integrated into code editors, is not limited to code generation. It also excels in analyzing textual data such as customer reviews. By leveraging its natural language processing capabilities directly in your development environment, you can automate sentiment extraction, thematic categorization, and trend identification from thousands of user feedback entries. Whether you are working on a Python script, a Jupyter notebook, or a Node.js application, Copilot helps you structure your analysis pipelines without leaving your IDE. This approach is particularly valuable for product and data teams looking to transform raw reviews into actionable insights: detection of recurring friction points, satisfaction assessment by feature, and tracking sentiment evolution over time. The prompt we propose here is designed to guide Copilot in creating a comprehensive analysis system, from data parsing to generating synthetic reports usable by business teams.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Create a complete Python function that analyzes a set of customer reviews. The function must: 1) Take as input a list of dictionaries with keys 'text', 'rating' (1-5), 'date', and 'source'. 2) Perform sentiment analysis on each review (positive, neutral, negative) based on vocabulary and rating. 3) Extract recurring themes (product quality, customer service, delivery, price, UX) using weighted keyword detection. 4) Calculate a simplified NPS score from ratings. 5) Identify the most representative verbatims by sentiment category. 6) Generate a structured report as a dictionary containing: sentiment distribution in percentages, top 5 mentioned themes with frequency, sentiment evolution by month, alerts on detected satisfaction drops, and prioritized recommendations based on identified friction points. Add detailed docstrings, error handling, and usage examples.
Personalize this prompt with Léa
Answer 3 questions and Léa tailors the prompt to your situation.
Why this prompt works
This prompt is effective because it breaks down analysis into logical numbered steps, guiding Copilot to generate structured, modular code. The explicit specification of input format (dictionaries with named keys) and output (structured report) eliminates ambiguity and produces directly usable code. Finally, the request for docstrings and error handling pushes Copilot to generate production-quality code rather than a simple prototype.
Use Cases
Variants
Expected Output
Copilot generates a complete Python function of 80 to 150 lines with sub-functions for each analysis step: sentiment classification, thematic extraction, NPS calculation, and report generation. The code includes a dictionary of keywords per theme, statistical calculations by period, and returns an actionable report with percentages, trends, and prioritized recommendations. You obtain a functional analysis pipeline that you can directly plug into your real data.
Frequently Asked Questions
Can GitHub Copilot analyze customer reviews directly in French?
Yes, GitHub Copilot understands and generates code capable of processing French text. However, for accurate sentiment analysis in French, the generated code will need to rely on French-language lexicons or suitable libraries like textblob-fr or a CamemBERT model. Specify in your prompt that the reviews are in French so that Copilot adjusts the keyword dictionaries and tokenization rules accordingly.
What is the limit on the number of reviews I can analyze with Copilot-generated code?
The code generated by Copilot runs locally on your machine, so the limit depends on your RAM and the complexity of the analysis. For a lexicon and TF-IDF based approach, you can easily process 50,000 to 100,000 reviews. For larger volumes, ask Copilot to add batch processing and parallelization using multiprocessing or pandas chunking.
How can I improve the accuracy of the sentiment analysis generated by Copilot?
Three complementary approaches: first, enrich the prompt by asking Copilot to integrate a pre-trained model like CamemBERT via the Hugging Face transformers library, which dramatically improves French sentiment detection. Next, request the addition of a feedback mechanism where you manually correct a sample to fine-tune classification thresholds. Finally, specify the business domain (restaurant, e-commerce, SaaS) so that Copilot tailors the industry-specific vocabulary in the base lexicon.
Learn more
Check the full skill on Prompt Guide to master this technique from A to Z.
View on Prompt Guide📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Similar Prompts
Multichannel marketing data analysis
Complete multichannel marketing performance analysis with ROI calculation, attribution models, and budget optimization.
Choose the right visualization for your data
Guide the choice of optimal chart type based on data, audience, and message to communicate.
Web analytics metrics analysis
Comprehensive web analytics metrics analysis to understand visitor behavior and identify optimization areas.
ChatGPT Prompt for Analyzing a Survey
Survey analysis is a crucial step for transforming raw data into actionable insights. Whether you collected responses via Google Forms, Typeform, or any other tool, ChatGPT can help you identify trends, segment respondents, and draw relevant conclusions in minutes. Where an analyst would spend hours cross-referencing variables and writing a report, AI significantly speeds up the process while maintaining methodological rigor. This prompt is designed to guide ChatGPT through a structured analysis of your survey results: synthesis of quantitative data, interpretation of open-ended responses, identification of significant correlations, and formulation of concrete recommendations. It works equally well for a customer satisfaction survey, a market study, or an internal questionnaire. The proposed approach combines descriptive statistical analysis and thematic qualitative analysis, offering you a complete and nuanced view of your results without requiring advanced data science skills.