SensorBench
收藏资源简介:
SensorBench是由加州大学洛杉矶分校的研究团队创建的一个综合性基准数据集,旨在评估大型语言模型(LLMs)在基于编码的传感器数据处理中的性能。该数据集包含多种真实世界的传感器数据集,涵盖了从预处理到特征提取等多个任务。数据集的创建过程结合了MATLAB教程和已有的数字信号处理(DSP)教材,确保了任务的实际应用性和学术验证性。SensorBench的应用领域广泛,包括工程、医疗和工业环境中的传感器数据处理,旨在解决LLMs在复杂传感器数据处理任务中的性能评估问题。
SensorBench is a comprehensive benchmark dataset developed by a research team at the University of California, Los Angeles (UCLA), which is designed to evaluate the performance of large language models (LLMs) in coding-based sensor data processing. This dataset includes a diverse set of real-world sensor datasets, covering a wide range of tasks spanning from preprocessing to feature extraction. The development of SensorBench integrates MATLAB tutorials and established digital signal processing (DSP) textbooks, ensuring the practical applicability and academic rigor of the included tasks. SensorBench has broad application domains, including sensor data processing in engineering, medical and industrial settings, and it aims to address the critical need for evaluating LLMs' performance on complex sensor data processing tasks.
SensorBench: Benchmarking LLMs in Coding-Based Sensor Processing
数据集概述
SensorBench 是一个用于评估大型语言模型(LLMs)在基于编码的传感器处理任务中的性能的基准数据集。该数据集旨在通过提供多种传感器数据处理问题,测试和比较不同模型的表现。
数据集组成
- 传感器数据类型:包括心电图(ECG)、步态(gait)、光电容积图(PPG)、语音(speech)等多种类型的传感器数据。
- 处理问题类型:涵盖去噪、外推、高斯噪声、心率检测、插值、运动噪声、电源线噪声、步态延迟检测、步态周期检测、重采样、回声、Siren噪声、电话铃声等多种信号处理问题。
数据集下载
使用方法
环境设置
-
安装依赖包: bash pip install -r requirements.txt
-
使用Docker(可选):
-
构建Docker镜像: bash docker build -t my-python-app .
-
构建Docker容器: bash docker run -p 4000:80 -v ./:/usr/src/myapp --name my-container my-python-app /bin/bash
-
启动容器: bash docker start my-container
-
在容器中执行代码: bash docker exec -it my-container /bin/bash
或 bash docker exec -it my-container2 python cli.py --mode api --query ecg_data-powerline_2 --openai gpt-4 --index 1 --num_trial 1
-
设置API密钥
-
OpenAI密钥:将OpenAI密钥放入
key.txt文件中。 bash echo "YOUR_OPENAI_TOKEN" >> key.txt -
together.ai密钥(可选):将together.ai密钥放入
together_key.txt文件中。 bash echo "YOUR_TOGETHER_AI_TOKEN" >> together_key.txt
运行代码
- 示例:尝试从ECG数据样本#1中去除电源线噪声。 bash python cli.py --mode api --query ecg_data-powerline_2 --openai gpt-4 --index 1 --num_trial 1
参数解释
-
--mode:选择模式,包括
text、api、no_api、CoT、react、base。text:以数值形式向LLMs提供信号。api:Python编码环境 + API访问 + 检查 + ReACT提示。no_api:Python编码环境 + 检查 + ReACT提示。CoT:Python编码环境 + API访问 + 思维链提示。ReAct:Python编码环境 + API访问 + ReAct提示。base:Python编码环境 + API访问。
-
--model:选择模型,包括
gpt-3.5-turbo、gpt-4、gpt-4o、gpt-4-0125-preview、gpt-4-turbo、Llama-2-70b、Llama-2-13b、Llama-2-7b、Llama-3-8b、Llama-3-70b、Qwen1.5-110B、Qwen2-72B。 -
--query:选择信号处理问题类型,包括
ecg_data-extrapolation、ecg_data-gaussian、ecg_data-heartrate、ecg_data-imputation、ecg_data-motion、ecg_data-powerline_1、ecg_data-powerline_2、ecg_data-powerline_3、gait-delay_detection、gait-period_detection、ppg-extrapolation、ppg-imputation、resampling、speech-echo、speech-Siren、speech-TelephoneRing1、speech-TelephoneRing2、speech-TelephoneRing3、change_point_detect_1、change_point_detect_2、change_point_detect_3、change_point_detect_4、outlier_detect_1、outlier_detect_2、outlier_detect_3、outlier_detect_4。 -
--index:选择数据样本的索引,
index∈ {1, 2, 3}。 -
--num_trial:设置自我验证的轮数,
num_trial∈ {1, 3, 4, 5}。
自定义提示
- 系统提示:在
sys_prompt.py文件中定义提示策略,用户可以添加或修改提示以构建自己的代理。
示例提示
- 基础提示:定义了信号处理专家的角色和任务。
- API提示:定义了使用Python编码环境和API访问的提示策略。
- 自我验证提示:定义了验证信号处理结果的提示策略。
- 反思提示:定义了反思和改进信号处理计划的提示策略。

- 1SensorBench: Benchmarking LLMs in Coding-Based Sensor Processing加州大学洛杉矶分校 · 2024年



