[Paper Review] Breaking the Bank with ChatGPT: Few-Shot Text Classification for Finance
The paper investigates few-shot financial text classification on Banking77 using in-context learning with GPT-3.5/GPT-4 and fine-tuning MPNet variants with SetFit, showing that generative LLMs can outperform fine-tuned models in few-shot settings, with human-curated samples further boosting performance, while noting cost considerations.
We propose the use of conversational GPT models for easy and quick few-shot text classification in the financial domain using the Banking77 dataset. Our approach involves in-context learning with GPT-3.5 and GPT-4, which minimizes the technical expertise required and eliminates the need for expensive GPU computing while yielding quick and accurate results. Additionally, we fine-tune other pre-trained, masked language models with SetFit, a recent contrastive learning technique, to achieve state-of-the-art results both in full-data and few-shot settings. Our findings show that querying GPT-3.5 and GPT-4 can outperform fine-tuned, non-generative models even with fewer examples. However, subscription fees associated with these solutions may be considered costly for small organizations. Lastly, we find that generative models perform better on the given task when shown representative samples selected by a human expert rather than when shown random ones. We conclude that a) our proposed methods offer a practical solution for few-shot tasks in datasets with limited label availability, and b) our state-of-the-art results can inspire future work in the area.
Motivation & Objective
- Demonstrate few-shot financial intent classification using Banking77 with conversational LLMs (GPT-3.5/GPT-4).
- Show that in-context learning can outperform fine-tuned non-generative models in limited-data regimes.
- Evaluate SetFit-based fine-tuning of MPNet variants as state-of-the-art in full-data and few-shot settings.
- Assess practical considerations including cost and token limitations of LLM-based approaches.
- Provide guidance for future work in few-shot finance NLP tasks.
Proposed method
- In-context learning with GPT-3.5 and GPT-4 for few-shot financial text classification on Banking77.
- Fine-tuning MPNet-based models (S-MPNet-v2 and P-MPNet-v2) with SetFit for few-shot and full-data settings.
- Human expert annotation to curate representative samples (top 3 of 10 per class) for improved few-shot training.
- Prompt engineering experiments comparing previous chat history versus system-context prompts for 3-shot GPT-4.
- Evaluation using micro-F1 and macro-F1 metrics across full-data and few-shot settings.
Experimental results
Research questions
- RQ1Can in-context learning with GPT-3.5 and GPT-4 achieve competitive performance on Banking77 with few-shot samples?
- RQ2Do human-curated representative samples outperform random samples in prompting LLMs for few-shot financial intent classification?
- RQ3Can SetFit with MPNet variants achieve state-of-the-art results in full-data and 10-shot settings?
- RQ4What are the cost and practical trade-offs of using generative LLMs for few-shot finance NLP tasks?
Key findings
- GPT-3.5 and GPT-4 in-context learning can achieve competitive or superior results with very few examples compared to fine-tuned, non-generative models.
- Human-curated representative samples yield better in-context learning performance than randomly chosen samples for GPT-3.5 and GPT-4.
- SetFit with MPNet-v2 variants achieves state-of-the-art results in full-data and 10-shot settings.
- Prompt strategy (system-context vs previous chat history) impacts GPT-4 performance, with system-context showing strong results.
- Genative LLM approaches incur subscription and token-cost considerations that may be prohibitive for small organizations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.