Harnessing Chain-of-Thought Metadata for Task Routing and Adversarial Prompt Detection

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Marinelli, Ryan, Pichlmeier, Josef, Bisztray, Tamas
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913762647212032
author Marinelli, Ryan
Pichlmeier, Josef
Bisztray, Tamas
author_facet Marinelli, Ryan
Pichlmeier, Josef
Bisztray, Tamas
contents In this work, we propose a metric called Number of Thoughts (NofT) to determine the difficulty of tasks pre-prompting and support Large Language Models (LLMs) in production contexts. By setting thresholds based on the number of thoughts, this metric can discern the difficulty of prompts and support more effective prompt routing. A 2% decrease in latency is achieved when routing prompts from the MathInstruct dataset through quantized, distilled versions of Deepseek with 1.7 billion, 7 billion, and 14 billion parameters. Moreover, this metric can be used to detect adversarial prompts used in prompt injection attacks with high efficacy. The Number of Thoughts can inform a classifier that achieves 95% accuracy in adversarial prompt detection. Our experiments ad datasets used are available on our GitHub page: https://github.com/rymarinelli/Number_Of_Thoughts/tree/main.
format Preprint
id arxiv_https___arxiv_org_abs_2503_21464
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Harnessing Chain-of-Thought Metadata for Task Routing and Adversarial Prompt Detection
Marinelli, Ryan
Pichlmeier, Josef
Bisztray, Tamas
Computation and Language
Artificial Intelligence
Performance
In this work, we propose a metric called Number of Thoughts (NofT) to determine the difficulty of tasks pre-prompting and support Large Language Models (LLMs) in production contexts. By setting thresholds based on the number of thoughts, this metric can discern the difficulty of prompts and support more effective prompt routing. A 2% decrease in latency is achieved when routing prompts from the MathInstruct dataset through quantized, distilled versions of Deepseek with 1.7 billion, 7 billion, and 14 billion parameters. Moreover, this metric can be used to detect adversarial prompts used in prompt injection attacks with high efficacy. The Number of Thoughts can inform a classifier that achieves 95% accuracy in adversarial prompt detection. Our experiments ad datasets used are available on our GitHub page: https://github.com/rymarinelli/Number_Of_Thoughts/tree/main.
title Harnessing Chain-of-Thought Metadata for Task Routing and Adversarial Prompt Detection
topic Computation and Language
Artificial Intelligence
Performance
url https://arxiv.org/abs/2503.21464