How we built a Stack Overflow Community questions analyzer (and you can too)
Being part of the GitLab collective is an opportunity to learn first hand about the challenges the community using the DevOps Platform is facing. As a Collective Member logging between 2-3 times a week in StackOverflow reading the questions and discussion posted about GitLab and manually sorting them by ‘Recent Activity’, ‘Trending’ and using Dates, I asked myself: how can we leverage this wealth of data and discover feedback, while finding the most frequent topics where the community has questions? This would be an opportunity to get a quick overview of topics where the community regularly needs help; this would also make it easier for us to create relevant content for them. Manually sorting and extracting the text of each question wouldn’t be sustainable, so creating an automated way would be the most efficient way to proceed. Experimenting with data-oriented content creation Finding out what the community is working on, and what they need help with while using GitLab, can help us to create better educational content that could expand their understanding of GitLab. To achieve this goal, the solution I created after a few iterations is depicted below: Where the Bill Of Materials consists mainly of: GitLab DevOps Platform Stackoverflow API Kubernetes Cluster Open Source Python libraries: scikit-learn (TF-IDF) Streamlit (front-end) Spacy I leveraged the GitLab DevOps Platform to organize the projects using groups: The Loader project pulls questions about GitLab from the StackOverflow API, pre-processes the text and makes it usable for a second project: a Visualizer to create customized dashboards. The automated process executed using the DevOps Platform is outlined below: Pull data from StackOverflow API Preprocess the response extracting relevant fields from returned JSON Build a corpus and calculate TF-IDF Scan for security vulnerabilities Review Application and display its resulting dashboards using Streamlit Deploy the built application to a Kubernetes cluster Loader and Visualizer projects have their own codebase and pipelines, which is helpful if different teams need to work separately on them. However, one project can require the other, which raises the need for cross-project automation. This scenario means a multi-project pipeline is useful to automate the whole process. The multi-project pipeline enables use cases such as: As an NLP Developer I want to work on the NLP Pipeline in the Loader Project and automatically trigger the creation of a new visualization As a Streamlit Developer I want to work independently in the buttons and data visualization without touching any NLP Pipeline backend The outlined process above is automatically run defining the steps in a multi-project pipeline sharing artifact: Finding the most frequently occurring words The Feature Engineering step will help me to analyze the text in the whole dataset of GitLab questions. Using a simple yet powerful technique – TF-IDF – we aim to find the most relevant terms utilized by the community. By using this technique in the pipeline execution, I represent words in numerical values and later rank them in order of importance. This approach serves as a baseline for further improvements. More detail about this algorithm can be found here. Did we achieve any success? One run of the multi-pipeline in our solution results in dashboards such as this one: As an end-user of these dashboards I can immediately conclude that the main source of questions are around GitLab CI, pipelines […]
