Add hackathon HF Article draft
Browse files- submission/hf_article.md +89 -0
submission/hf_article.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Finance Agent: Safe Indian-Market Research with Tiny Aya
|
| 2 |
+
|
| 3 |
+
## Summary
|
| 4 |
+
|
| 5 |
+
Finance Agent is a tool-using financial research assistant built on
|
| 6 |
+
`CohereLabs/tiny-aya-global`. It plans a structured tool call, retrieves
|
| 7 |
+
current market data with yfinance, and returns evidence-backed results rather
|
| 8 |
+
than inventing prices or ratios.
|
| 9 |
+
|
| 10 |
+
The accepted adapter is published at
|
| 11 |
+
[`SaiPavankumar22/finance-agent`](https://huggingface.co/SaiPavankumar22/finance-agent)
|
| 12 |
+
at revision `0366a47`.
|
| 13 |
+
|
| 14 |
+
## Why this model and task
|
| 15 |
+
|
| 16 |
+
Tiny Aya Global was selected because it is small enough for affordable
|
| 17 |
+
serverless GPU inference while supporting the project's multilingual-oriented
|
| 18 |
+
base model family. The task is deliberately narrow: select one safe financial
|
| 19 |
+
tool and its arguments, or decline requests for advice, predictions, insider
|
| 20 |
+
information, and unsupported actions.
|
| 21 |
+
|
| 22 |
+
The system does not ask the model to memorize market prices. Quotes, ratios,
|
| 23 |
+
history, and news come from provider tools and carry timestamps, source labels,
|
| 24 |
+
and explicit unavailable states.
|
| 25 |
+
|
| 26 |
+
## Dataset design
|
| 27 |
+
|
| 28 |
+
The dataset contains 800 curated trajectories covering 13 behaviors, including
|
| 29 |
+
quotes, ratios, historical prices, company news, missing or stale data,
|
| 30 |
+
invalid symbols, bounded tool-error recovery, advice, predictions, insider
|
| 31 |
+
requests, pressure, and unsupported actions.
|
| 32 |
+
|
| 33 |
+
The training split contains 823 rows after targeted safety and Indian-market
|
| 34 |
+
augmentation. Validation holds out ticker groups, and the frozen test set is
|
| 35 |
+
never modified. The India evaluation contains 100 held-out examples using NSE
|
| 36 |
+
symbols such as `RELIANCE.NS`, `TCS.NS`, `INFY.NS`, `HDFCBANK.NS`, and `SBIN.NS`.
|
| 37 |
+
|
| 38 |
+
The final augmentation addressed measured template gaps rather than simply
|
| 39 |
+
increasing model capacity:
|
| 40 |
+
|
| 41 |
+
- advice and jailbreak phrasings that had no training analogue;
|
| 42 |
+
- Indian quote, ratio, history, news, advice, prediction, stale, and
|
| 43 |
+
unsupported-action phrasings;
|
| 44 |
+
- explicit bounded behavior after failed tool calls.
|
| 45 |
+
|
| 46 |
+
## Before and after
|
| 47 |
+
|
| 48 |
+
| Metric | Base/WS5 | Accepted ic7 | Why it matters |
|
| 49 |
+
| --- | ---: | ---: | --- |
|
| 50 |
+
| Frozen test tool selection | 0.7867 | **0.9800** | Chooses the correct data tool |
|
| 51 |
+
| Frozen test argument accuracy | 0.8600 | **0.9733** | Preserves ticker and period arguments |
|
| 52 |
+
| Refusal recall | 0.9189 | **1.0000** | Declines unsafe or unsupported requests |
|
| 53 |
+
| Over-refusal | 0.0385 | **0.0000** | Does not reject healthy requests |
|
| 54 |
+
| Benign tool selection | 0.7308 | **0.7692** | Maintains useful behavior |
|
| 55 |
+
| Post-error bounded finish | 0.9000 | **1.0000** | Stops after unavailable evidence |
|
| 56 |
+
| India tool selection | 0.6875 | **0.9800** | Handles Indian-market requests |
|
| 57 |
+
| India argument accuracy | 0.6875 | **0.9800** | Uses correct NSE symbols and periods |
|
| 58 |
+
|
| 59 |
+
All acceptance gates passed, including invalid-symbol declines `8/8`,
|
| 60 |
+
unsupported actions `11/11`, refusal families `32/32`, quote/ratios/history
|
| 61 |
+
tool choice `30/30`, and news tool choice `12/14`.
|
| 62 |
+
|
| 63 |
+
## Safety and grounding
|
| 64 |
+
|
| 65 |
+
The model emits one structured action per turn. `finish` is the only refusal
|
| 66 |
+
action. Tool responses are validated, stale or missing values remain explicit,
|
| 67 |
+
and reports cannot introduce unsupported numbers because claims reference
|
| 68 |
+
evidence entries.
|
| 69 |
+
|
| 70 |
+
The public demo is informational research only and includes a non-advisory
|
| 71 |
+
disclaimer. It does not provide personalized investment advice.
|
| 72 |
+
|
| 73 |
+
## Deployment
|
| 74 |
+
|
| 75 |
+
The public Modal demo uses the accepted staging revision
|
| 76 |
+
`avengeryt22/finance-agent-staging@5ae2ee8` and scales to zero between
|
| 77 |
+
requests. Cold starts are expected because the model is loaded on demand.
|
| 78 |
+
|
| 79 |
+
- Public API: `https://devisettisaipavankumar--finance-agent-ws5-demo-financeag-dc3c3e.us-east.modal.run`
|
| 80 |
+
- Model repository: https://huggingface.co/SaiPavankumar22/finance-agent
|
| 81 |
+
- Dataset repository: https://huggingface.co/datasets/SaiPavankumar22/finance-agent-dataset
|
| 82 |
+
- Evaluation repository: https://huggingface.co/datasets/SaiPavankumar22/finance-agent-eval
|
| 83 |
+
|
| 84 |
+
## Limitations
|
| 85 |
+
|
| 86 |
+
Provider availability can vary for individual exchange symbols. The model is
|
| 87 |
+
not a financial adviser, does not guarantee market data freshness, and should
|
| 88 |
+
not be used as the sole basis for an investment decision.
|
| 89 |
+
|