title: Qoscope
emoji: π
colorFrom: green
colorTo: pink
sdk: gradio
sdk_version: 5.20.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: 'QoScope '
QoScope π
QoS data analysis thousands of school networks under UNICEF/Giga
Quality of Service (QoS) is a critical requirement in communication networks. QoS patterns can indicate potential network problems or a need for an upgrade. With millions of schools connected to the Internet, there already is an overwhelming volume of network performance data available. Moreover, as usage patterns evolve in the future, for example, from accessing data and video to running real-time, remote or virtual experiments across schools, the QoS demands would only grow stronger. Therefore, there is a need for an efficient approach to gain insights into the pool of network performance data.
QoScope takes an agentic approach to provide a natural language dashboard (NLD). Using the NLD, network administrators can express their queries in natural language, e.g., English. Based on the query, the agent uses one or more available tools to arrive at a response. For example, currently, QoScope can generate and run a SQL query when required. In addition, it can also generate bar and line diagrams to assist visualization of data.
In particular, QoScope uses the school_geolocation_measurements_v2/measurements.csv
dataset by Giga. This CSV file contains the network speed and latency measurements across many schools.
A filtered version of these measurements (where each school has at least 120 data points) is pre-processed, resampled, and stored as an SQLite database provided with this repository (resampled_daily_avg.sqlite
).
QoScope agent queries the table in this database on the fly, if required.
Technologies
QoScope is built using different Open-Source solutions, such as:
- Smolagents, which is the underlying agentic framework
- Qwen2.5-Coder-32B-Instruct, which is the Large Language Model (LLM) acting as the brain of teh agent
- Gradio, as the framework for the agent's front-end
Installation
A live demo of QoScope is available online. If you want to run offline, try the following steps.
cd qoscope
pip install -r requirements.txt
python app.py
You will need to add HF_TOKEN
environment variable, e.g., in the qoscope/.env
file.
Also, the *.sqlite
database is stored using Git Large File Storage (LFS). You may need to run git lfs pull
inside the qoscope
directory.
Limitations
With free Hugging Face Inference API, the context window of the LLM is limited to 16K tokens. As a result, in this PoC, queries that lead to generation of lot of data will lead to an error. For example, line diagrams, a line diagram showing yearly network metrics cannot be plotted.
Said limitation can be overcome using dedicated hosting or using LLMs that support a longer context window. For example, Google's Gemini has a context window of millions of tokens.
A still better approach will be to switch from the ReAct agentic pattern to ReWOO. This is left for the future.
QoScope is released under an Apache 2.0 license.