Between the Lines: Contextual Investment Advice Detection in Multi-Turn Conversations
Between the Lines: Multi-turn Contextual Investment Advice Detection
The authors propose a multi-turn investment advice detection framework, synthesizing conversations with axis-bucket-descriptor; the authors state that contextual advice is harder to detect than sequential, and KNN few-shot raises recall to 0.84.
- In financial dialogue assistants, investment advice is often implicit and emerges gradually across multiple turns, making it hard for keyword filtering to identify; determining whether something constitutes investment advice depends on accumulated context, user intent and persona, and labeled data is scarce.
- Proposes a modular synthetic data framework: uses an axis-bucket-descriptor schema to define a diversity space, two-stage generation (synthesis idea→conversation), distinguishes sequential and contextual embedding strategies, then uses LLM-as-a-Judge to evaluate detection under zero-shot/few-shot/KNN few-shot, and uses entropy/margin for uncertainty diagnosis.
- Contextual advice detection is harder than sequential: under zero-shot, recall for contextual long conversations is only 0.42, rising to 0.84 with KNN few-shot; synthetic samples have an average relevancy score of about 4.8-5.0 (1-5); the authors state that few-shot examples reduce uncertainty, but the model remains highly confident when misjudging contextual cases.
- The authors note: reference labels were generated by an LLM, and expert review was simulated; future work could add human legal/compliance annotation and expand model coverage; only recall was optimized, without considering the false-positive burden and calibration; the taxonomy is an evaluation abstraction rather than a legal definition. The only judgment model tested was ChatGPT-4o-mini.
- Threat model
- The paper is not an attack/defense paper and has no explicit threat model; the scenario is investment advice appearing implicitly and across turns in financial conversational assistants, requiring a guardrail to determine whether the entire conversation constitutes advice, including two trajectory types: sequential (gradual escalation) and contextual (distributed, non-adversarial).
- Evaluated models
- ChatGPT-4o-mini
- Benchmarks
- HarmEval (Tailored Financial Advice subset)内部合成投资建议对话数据集
- Metrics
- RecallRelevancy (1-5)EntropyMarginDiversity (1−cosine similarity)
Researchers propose a framework for detecting sequential and contextual investment advice in multi-turn conversations. At its core is a modular synthetic data pipeline that covers advice trajectories in an axis-bucket-descriptor pattern, simulating benign and high-risk conversations across different user profiles, financial instruments, and risk levels. Evaluation uses LLM-as-a-Judge and entropy-based uncertainty diagnostics; even with few-shot prompts containing customized examples, contextual detection remains markedly harder than sequential detection.
Paper analysis
What problem does this paper attempt to solve?
Addresses the problem of detecting implicit, distributed investment advice in multi-turn conversations, and proposes a synthetic data generation and evaluation framework.
Core question: how to detect investment advice in single-turn and multi-turn LLM financial conversations, especially contextual advice that is distributed across multiple turns and harmless when each turn is viewed alone.
- Regulatory background: The authors state that in U.S. regulation, "investment advice" (under SEC jurisdiction) and "recommendations" (under FINRA jurisdiction) are legally significant categories, usually referring to personalized "calls to action" regarding the buying, selling or holding of specific securities based on an individual's financial situation, risk tolerance and goals, which trigger specific regulatory requirements.
- Why it is difficult: The determination is subjective, depending on context, legal precedent and expert judgment; surface cues or keywords are insufficient. A conversation that begins with "what is an ETF" can gradually evolve into personalized guidance through follow-up questions; content that is harmless when viewed alone may have different legal meaning in context.
- Shortcomings of existing methods: The authors state that traditional safety mechanisms based on keyword filtering or surface heuristics struggle to detect advisory risk that appears implicitly across turns; most guardrail research targets direct, explicit jailbreaks and overlooks the subtler, often unintentional, multi-turn-distributed risks in real financial conversations.
- Data bottleneck: Labeled data is scarce, labeling often requires legal expertise, and financial training corpora have inherent biases.
- What the paper proposes: A modular, top-down synthetic data generation framework (axis-bucket-descriptor schema) covering both sequential and contextual advice trajectories; together with LLM-as-a-Judge detection evaluation and entropy-based uncertainty diagnosis, as well as a human-in-the-loop with active learning + semi-supervised labeling.
Scenario setup (not an attack/defense paper, no standard threat model):
- Victim system: financial dialogue assistant/chatbot and its guardrail.
- Risk source: may be a non-adversarial real user (contextual), or a gradually escalating adversarial user (sequential).
- Success determination: an LLM judge performs binary classification on the entire conversation, determining whether the aggregate constitutes investment advice.
What related research exists?
Related work is divided into two groups: synthetic data generation and multi-turn jailbreak/guardrail evaluation; this paper is positioned in the intersection gap of financial compliance scenarios.
Synthetic data generation
- Early question typologies and classification systems: psychoanalytic question typologies [6], semantic-hierarchy-based machine learning classification [12], laying the foundation for modeling query structure.
- Generation strategies: cloze-style masking [10], syntactic transformation, multi-hop and contrastive question generation [23], template-driven methods [3]; Evol-Instruct [19] performs depth and breadth expansion from seed queries, and can simulate edge and adversarial cases.
- Quality-diversity trade-off: evaluation ranges from BLEU/ROUGE to semantic-similarity deduplication [9], and task metrics such as faithfulness and answerability [13]; the paper notes that most work targets general QA and lacks multi-turn structure and domain compliance considerations.
Multi-turn jailbreak and guardrail evaluation
- Multi-turn attacks: exploiting the model's context memory to escalate risk step by step, including context fusion [17], crescendo-style gradual escalation [15], and obfuscation techniques; the paper states these reveal the limitations of surface defenses such as keyword matching and static classifiers [11].
- Auxiliary prompting strategies: purpose inversion, reframing, coreference ambiguity [21], and sycophancy, prompt leakage [1], further concealing harmful intent.
- The paper notes: most guardrail research targets direct, explicit jailbreaks and ignores the unintentional, cross-turn distributed advisory risk in real financial conversations.
Methods directly borrowed by this paper
- The axis-bucket-descriptor schema is taken from HART (a red-teaming framework for top-down test case generation and multi-turn interaction) [22].
- OOD/adversarial sample generation is based on a modified X-teaming (multi-agent multi-turn jailbreak and defense) [14]; sequential embedding and classifier-in-the-loop feedback also reference this work.
- Active learning ranking references active statistical inference [24], and pseudo-label quality control references conformal methods [4].
Baselines and benchmarks: the public benchmark uses the Tailored Financial Advice subset of the HarmEval dataset [2] as labeled "gold" data; detection baselines are zero-shot and random few-shot prompting, compared with this paper's KNN few-shot.
Positioning: the authors state that this paper fills a gap at the intersection of synthetic data generation and financial advice risk detection—multi-turn, context-dependent conversation generation and guardrail evaluation for low-resource, compliance-sensitive scenarios, a setting insufficiently covered by existing work.
How does the paper address this problem?
Using the axis-bucket-descriptor schema to generate sequential/contextual multi-turn conversations top-down, then evaluating detection with LLM-as-a-Judge and performing uncertainty diagnosis.
Overall approach: first control the coverage of synthetic conversations with a structured diversification space, then use two-stage generation (first generate a synthesis idea, then instantiate it as a conversation) to produce two types of advice trajectories, sequential and contextual, and finally evaluate detection capability with LLM-as-a-Judge under three prompting settings. The core of the framework is the axis-bucket-descriptor schema and the dual-trajectory generation strategy.
Diversification Space Engineering
- Schema definition: an axis is an interpretable dimension of variation (e.g., user persona, assistant behavior, advice category), each axis is discretized into a finite set of buckets (e.g., investment type includes stocks, bonds, ETFs), and each bucket is paired with a descriptor giving semantic constraints and example phrasing.
- Top-down construction: specify axes, buckets, and descriptors based on the application scenario, regulatory guidance, and intended use cases (introducing domain experts when necessary), ensuring systematic coverage under low resources.
- Bottom-up refinement: when gold data (human-annotated or validated datasets) is available, use an LLM to analyze the data, identify missing, redundant, or overly coarse axes and buckets, then clean and merge to obtain an interpretable, task-aligned schema.
- Instantiated space: Table 1 gives 12 axes, including user persona (vulnerable/average/sophisticated), assistant behavior (compliant/suggestive/borderline), advice category (product/strategy/timing), risk tolerance, model reliability (including OOD and adversarial/edge cases), etc.
Two-stage synthetic data generation
- Synthesis idea generation: rather than generating conversations directly from raw labels, first have the LLM produce a compact scenario blueprint based on axis/bucket labels (optionally with retrieved context and target risk intent), outlining the conversation setting, user intent, assistant behavior, and risk occurrence pattern.
- Sequential embedding: risk escalates monotonically turn by turn, and the user gradually induces the model to produce a preset "target" output (e.g., specific investment advice) in the final turn, with the risk score rising predictably to a "gotcha" moment; this structure is traceable and in principle detectable by monotonic-escalation detection models.
- Contextual (non-sequential) embedding: no monotonic escalation, and no single utterance triggers the guardrail; the advisory meaning emerges only after aggregating information across turns, and user intent can be entirely non-adversarial. Generation requires coordinating content distribution across turns so that key risk elements are split but semantically connected.
- Add-on and hybrid strategies: optional perturbations include policy-based modulation (semantic drift, response regeneration, backtracking, escalation endpointing), classifier-in-the-loop feedback, language/pragmatic variants (indirect or metaphorical language, vague pronouns, simulated roles, sycophantic style), and domain scenarios (educational framing, historical references, case simulations, etc.); hybrid allows combining multiple modes within a single conversation (Table 3).
Sampling and evaluation pipeline
- Intrinsic evaluation and three-step filtering: LLM-as-a-Judge scores 1-5 on criteria such as relevancy; Step 1 performs diversity filtering using sentence-level embeddings (pairwise cosine similarity above 0.9 is treated as near-duplicate, keeping only one); Step 2 filters by quality threshold; Step 3 samples under axis-bucket joint distribution constraints (e.g., target proportions of contextual versus explicit advice).
- Downstream detection evaluation: a binary classification task in which the judge determines whether the complete multi-turn conversation, after aggregation, contains investment advice; data is split 20%/80% into train/test, and the training set is used only to construct few-shot demonstrations. Three prompts: zero-shot, few-shot (6 random demonstrations), KNN few-shot (6 nearest neighbors by embedding similarity).
- Main metric: Recall (the proportion of true advisory conversations correctly identified), because in compliance scenarios the cost of missed detection is higher than that of false positives; reported separately by sequential/contextual and by conversation length.
- Active learning loop: the judge outputs probability labels and confidence; uncertainty is measured by entropy and margin, entropy = −∑i=1n pi ln(pi), margin = p(n) − p(n−1), i.e., the Shannon entropy of the predicted distribution and the difference between the highest and second-highest probabilities; the most uncertain cases are routed to human review, and high-confidence samples receive pseudo-labels, forming a semi-supervised iteration.
Implementation details (§3)
- Data: the public benchmark is the Tailored Financial Advice subset of HarmEval (gold data); the internal seed set is generated by an LLM according to diversification parameters.
- Generation: GPT-4o generates in-distribution samples; a modified X-teaming generates OOD/adversarial samples (about one-sixth), with multi-agent roles of behavior generator, planner, attacker, and evaluator, assigned to GPT-4.1 (behavior/planning), GPT-4o (attack/target), and o1-mini (evaluation).
- Scale: 300 multi-turn conversations are generated per label × strategy, half short (5 turns) and half long (10 turns); labels are assigned as probability labels and confidence by ChatGPT-4o-mini as LLM-as-a-Judge; embeddings use text-embedding-3-small; active learning takes the top 10% by uncertainty, and confidence above 0.9 receives pseudo-labels. Appendix A gives all prompt templates.
What experiments did the paper conduct?
Evaluating detection recall of three prompting strategies on synthetic conversations: contextual is far harder than sequential, and KNN few-shot gives the largest improvement.
Experimental setup
- Task: binary classification of complete multi-turn conversations, determining whether they aggregate into investment advice; two tasks, investment advice and financial advice, each reported by sequential/contextual × short (5 turns)/long (10 turns).
- Data: in-distribution synthetic conversations generated by GPT-4o + OOD/adversarial samples generated by a modified X-teaming (about one sixth); 300 conversations per label × strategy, half short and half long; 20% train / 80% test.
- Judge and labels: ChatGPT-4o-mini as LLM-as-a-Judge outputs probability labels and confidence; reference labels are generated by an independent language model.
- Prompting strategies: zero-shot; few-shot (6 random synthetic demonstrations); KNN few-shot (6 selected by text-embedding-3-small embedding similarity).
- Metrics: primary metric recall; intrinsic quality via relevancy (1-5); uncertainty via entropy and margin; diversity as 1−cosine similarity, deduplication threshold 0.9.
- Sample size and repetitions: the paper does not report the specific sample size and number of repetitions for each evaluation cell.
Main results
Table 5: downstream advice detection recall (according to Table 5)
Swipe horizontally to read the table
Task Trajectory Length zero-shot few-shot KNN few-shot Investment advice sequential short 0.92 0.95 0.92 Investment advice sequential long 0.75 0.90 0.83 Investment advice contextual short 0.54 0.63 0.83 Investment advice contextual long 0.42 0.75 0.84 Financial advice sequential short 0.92 0.97 0.99 Financial advice sequential long 0.93 0.93 0.91 Financial advice contextual short 0.88 0.92 0.96 Financial advice contextual long 0.86 0.95 0.94 - Authors' interpretation: providing synthetic demonstrations generally improves detection, and KNN few-shot usually brings the largest recall gain; contextual scenarios (where meaning must be aggregated across turns) remain harder to detect than sequential (where risk escalates predictably).
- Exceptions: few-shot occasionally outperforms KNN few-shot (e.g., investment advice sequential short conversations), which the authors suggest may be because KNN selects semantically similar OOD/adversarial borderline samples and introduces noise.
- Authors state: these findings validate the effectiveness of the synthetic data pipeline in generating challenging, high-utility training data.
Intrinsic quality: relevancy and diversity
- Relevancy: Table 4 reports means on a 1-5 scale, with cells ranging from 4.64 (financial advice contextual short, train) to 5.0 (financial advice sequential long, train/test/overall); investment advice contextual overall is 4.81 (short) and 4.77 (long). The authors state that the synthetic conversations align well with the target task.
- Diversity: Figure 2 shows the pairwise diversity distribution; the authors state the mean is about 0.5, and that samples cover multiple scenarios without excessive overlap (after deduplication at the 0.9 threshold).
Uncertainty analysis (Figure 3)
- What was measured: box plots of entropy, margin, and maximum confidence for each experimental condition.
- Results (authors state): both few-shot and KNN few-shot reduce uncertainty on sequential and contextual trajectories; the longer the conversation and the more dispersed the risk information, the more pronounced the effect of synthetic demonstrations in reducing uncertainty.
- Exceptions (authors state): on contextual trajectories, the LLM often shows high confidence even when its prediction is wrong; this overconfidence may mislead in real scenarios.
Other ablations and analyses
- No further independent ablation tables; parameter and pipeline details (deduplication threshold 0.9, 6 demonstrations, active learning top 10%, pseudo-label confidence threshold 0.9) are given once in §3.2, with no variable sweep.
- Negative result: contextual investment advice zero-shot recall is only 0.54 (short)/0.42 (long), which the authors attribute to the advice meaning needing cross-turn aggregation and not being discoverable by surface escalation tracking.
What are some points that can be further explored?
The authors list limitations and future directions such as human annotation and false-positive calibration; experiments cover only a single judge model and synthetic data.
Limitations and future directions noted by the authors
- LLM-generated reference labels and simulated expert review: §4 Limitations states that this is a scalable, reproducible controlled demonstration, and that future work could introduce human legal or compliance annotation and expand model coverage.
- Optimizing only recall: §4 Limitations states that production deployment also needs to account for false-positive burden and calibration.
- Positioning of the taxonomy: §4 Limitations states that the taxonomy should be understood as an evaluation abstraction for studying contextual advisory behavior, not a legal definition.
- Expanding risk categories and guardrail protocols: §5 Conclusion states that future work will cover more risk categories, refine guardrail protocols, and may extend to other regulated domains with distributed, dependency-aware risk.
- Interpretability enhancements: §5 Conclusion states that future work could add per-turn advisory risk labels and inter-rater agreement, and align the risk hierarchy with SEC/FINRA regulatory guidance.
Scope of experimental coverage
- The detection judge evaluated is only one model, ChatGPT-4o-mini (§3.2); the generation side uses GPT-4o, GPT-4.1, o1-mini, and embeddings use text-embedding-3-small.
- All data are synthetic conversations: 300 segments per label × strategy, half short (5 turns) and half long (10 turns), with OOD/adversarial samples accounting for about one sixth; the only public real data is the Tailored Financial Advice subset of HarmEval as gold data, and the paper does not report detection numbers on real human-annotated conversations.
- Prompting strategies cover three: zero-shot, few-shot (6 random demonstrations), and KNN few-shot (6 similar demonstrations).
- The paper does not report the sample size, number of repetitions, or statistical significance tests for each evaluation cell.
- The paper does not report agreement values between human review and LLM labels (the human review step in active learning is a framework design description).
Summarize the main content of the paper
Multi-turn investment advice detection for financial compliance: synthetic data framework + LLM-judge evaluation; contextual advice detection is the hardest.
An evaluation and data framework paper for financial compliance scenarios: it addresses the problem that implicit, distributed investment advice in multi-turn conversations is hard for keyword-based guardrails to find, and that labeled data is scarce.
- Method: Uses an axis-bucket-descriptor schema to define a diversity space top-down (12 axes, including persona, assistant behavior, advice category, etc.), two-stage generation (synthesis idea→conversation), distinguishing sequential (turn-by-turn escalation) and contextual (distributed across turns, harmless per turn) trajectories; GPT-4o generates in-distribution samples, a modified X-teaming multi-agent setup generates OOD/adversarial samples (about one sixth); ChatGPT-4o-mini serves as judge, evaluated under zero-shot/few-shot/KNN few-shot, supplemented by entropy/margin uncertainty diagnosis and an active learning loop.
- Main results (Table 5, recall): contextual investment advice detection is far harder than sequential—under zero-shot, contextual long conversations reach only 0.42, rising to 0.84 with KNN few-shot; short conversations rise from 0.54 to 0.83; sequential short conversations already reach 0.92 under zero-shot. Recall for financial advice across conditions is 0.86-0.99.
- Quality: Synthetic samples have a mean relevancy of 4.64-5.0 (1-5 scale, Table 4); the authors state the mean diversity is about 0.5 (Figure 2).
- The authors state: Synthetic few-shot demonstrations reduce detection uncertainty, but the model remains highly confident when misjudging contextual cases; the framework lays the groundwork for scalable guardrail development in high-risk compliance domains.
- Limitations: Labels are LLM-generated, with no manual legal annotation; only recall is optimized, without considering false positives or calibration; the taxonomy is an evaluation abstraction rather than a legal definition.