Skip to content

Commit 1e98fab

Browse files
committed
docs: add large-scale evaluation evidence
1 parent 08f4a75 commit 1e98fab

9 files changed

Lines changed: 3783 additions & 52 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ reports/
3939
manual_test/output/
4040
evaluation/*.json
4141
evaluation/*.md
42+
submission/conference-paper/
4243

4344
# Local training/evaluation scratch files
4445
*.log
@@ -48,4 +49,3 @@ temp/
4849
# Keep trained model artifacts for public release.
4950
!models/*.joblib
5051
!models/*.json
51-

scripts/evaluate_query_intelligence.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
RETRIEVAL_QREL_QUERIES = 1_500
3030
OOD_RETRIEVAL_CHECK_QUERIES = 500
3131
TOP_K = 10
32+
MAX_EVAL_QUERY_CHARS = 120
3233

3334
FINANCE_CLASSIFICATION_TARGET = 4_000
3435
FINANCE_RETRIEVAL_TARGET = 1_500
@@ -155,7 +156,7 @@ def _sample_finance_classification_rows(rows: list[dict], target: int) -> list[E
155156
if product_type in {"", "unknown"} or question_style == "":
156157
continue
157158
query = str(row.get("query") or "").strip()
158-
if not query:
159+
if not _is_question_style_eval_query(query):
159160
continue
160161
expected_sources = tuple(_ordered_unique(_as_tuple(row.get("expected_document_sources")) + _as_tuple(row.get("expected_structured_sources"))))
161162
pool.append(
@@ -190,7 +191,7 @@ def _sample_finance_retrieval_queries(qrel_rows: list[dict], corpus_rows: list[d
190191
query = str(row.get("query") or "").strip()
191192
doc_id = str(row.get("doc_id") or "").strip()
192193
relevance = int(row.get("relevance") or 0)
193-
if not query or not doc_id or relevance <= 0:
194+
if not _is_question_style_eval_query(query) or not doc_id or relevance <= 0:
194195
continue
195196
item = grouped.setdefault(
196197
query,
@@ -231,7 +232,7 @@ def _sample_ood_public_queries(classification_rows: list[dict], qrel_rows: list[
231232
if source_id not in OOD_SOURCE_IDS:
232233
continue
233234
query = str(row.get("query") or "").strip()
234-
if not query:
235+
if not _is_question_style_eval_query(query):
235236
continue
236237
pool.append(
237238
EvalItem(
@@ -252,7 +253,7 @@ def _sample_ood_public_queries(classification_rows: list[dict], qrel_rows: list[
252253
if source_id != "t2ranking":
253254
continue
254255
query = str(row.get("query") or "").strip()
255-
if not query or query in seen:
256+
if not _is_question_style_eval_query(query) or query in seen:
256257
continue
257258
pool.append(
258259
EvalItem(
@@ -282,7 +283,7 @@ def _sample_ood_dialogue_queries(target: int) -> list[EvalItem]:
282283
for line_index, line in enumerate(lines):
283284
utterances = [item.strip() for item in line.split("__eou__") if item.strip()]
284285
for turn_index, utterance in enumerate(utterances):
285-
if len(utterance) < 2:
286+
if not _is_question_style_eval_query(utterance):
286287
continue
287288
pool.append(
288289
EvalItem(
@@ -1060,6 +1061,18 @@ def _is_self_contained_finance(query: str) -> bool:
10601061
return any(term in lowered for term in finance_terms)
10611062

10621063

1064+
def _is_question_style_eval_query(query: str) -> bool:
1065+
query = query.strip()
1066+
if not query or len(query) > MAX_EVAL_QUERY_CHARS:
1067+
return False
1068+
article_markers = ("\n", "\r", "\t", "\u3000", "新浪财经讯", "本报记者", "每经记者")
1069+
if any(marker in query for marker in article_markers):
1070+
return False
1071+
if query.startswith("['") or query.startswith('["'):
1072+
return False
1073+
return True
1074+
1075+
10631076
def _predicted_product_type(nlu_result: dict) -> str:
10641077
product = nlu_result.get("product_type") or {}
10651078
return str(product.get("label") or "")

submission/final-report/ARIN_Group_Report.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ The result evaluation combines UI walkthrough, structured artifacts, statistical
184184
| Result area | Evidence used | Interpretation |
185185
|---|---|---|
186186
| Frontend usability | Chinese and English browser screenshots; `/chat` response fields | The interface can present answer text, key points, sources, and disclaimer in a user-readable workflow. |
187-
| NLU & Retrieval | 32/32 fuzz cases; NLU labels; entity resolution; retrieval coverage | The backend handles finance, English, colloquial, typo, comparison, macro, and clarification cases with traceable artifacts. |
187+
| NLU & Retrieval | 10,000 query-style evaluation cases; 32-case end-to-end fuzz matrix; NLU labels; entity resolution; retrieval coverage | The backend handles large-scale finance and out-of-scope queries, while the fuzz matrix checks English, colloquial, typo, comparison, macro, and clarification contracts. |
188188
| Numerical analysis | Market, fundamental, and industry structured rows; technical-indicator design | The system summarizes observed evidence and data readiness without turning indicators into deterministic advice. |
189189
| Text analysis | Sentiment schemas, preprocessing tests, classifier tests, pipeline tests | Sentiment is tied to retrieved evidence IDs rather than unsupported document crawling. |
190190
| LLM summary | DeepSeek `/chat` status, strict JSON fields, fallback contract | Generation is constrained to evidence-grounded answer wording and follow-up question support. |
@@ -218,16 +218,21 @@ These screenshots show that the frontend is not only a visual shell. It demonstr
218218

219219
## 4.2 NLU & Retrieval Results
220220

221-
The strongest backend evidence comes from the Query Intelligence fuzz test report generated on 2026-04-22. It contained 32 cases, all passed, with an overall score of 10.0/10, NLU score of 10.0/10, retrieval score of 10.0/10, and schema score of 10.0/10. The matrix covered baseline stock advice, colloquial paraphrases, recent time scopes, ETF aliases, comparison, typo tolerance, dialogue context carryover, user-profile carryover, macro-policy queries, event/news queries, English queries, and clarification-required cases.
221+
The strongest backend evidence comes from a 10,000-case Query Intelligence evaluation. The set contains 6,236 finance-domain queries, 3,764 out-of-scope queries, 5,865 Chinese queries, and 4,135 English queries. It uses public and generated query-style examples while filtering out article-length rows that would not represent interactive chatbot input. The evaluation is therefore larger than the 32-case fuzz matrix, but still aligned with the system's intended user workflow.
222222

223223
| Evaluation item | Observed result |
224224
|---|---|
225-
| Fuzz test cases | 32 total, 32 passed, 0 failed |
226-
| Overall score | 10.0/10 |
227-
| NLU score | 10.0/10 |
228-
| Retrieval score | 10.0/10 |
229-
| Schema score | 10.0/10 |
230-
| Passed checks | 361 total checks, 361 passed |
225+
| Large-scale evaluation cases | 10,000 total: 6,236 finance and 3,764 out-of-scope |
226+
| Language coverage | 5,865 Chinese and 4,135 English queries |
227+
| Domain routing | Finance-domain recall 0.975; out-of-scope rejection accuracy 0.9729 |
228+
| Classification quality | Product type accuracy 1.0; question-style accuracy 1.0; intent micro-F1 0.9407; topic micro-F1 0.9208 |
229+
| Source planning | Hit@5 1.0; recall@5 0.9957 |
230+
| Retrieval ranking | Recall@10 0.9664; MRR@10 0.889; NDCG@10 0.8872 |
231+
| Retrieval abstention | Out-of-scope retrieval abstention 0.986 |
232+
| Remaining gap | Clarification recall 0.75, below the 0.90 target and kept as a limitation |
233+
| Complementary fuzz matrix | 32 total cases, 32 passed, 0 failed; 361 checks passed |
234+
235+
The 32-case fuzz report remains useful as a complementary end-to-end contract test. It covered baseline stock advice, colloquial paraphrases, recent time scopes, ETF aliases, comparison, typo tolerance, dialogue context carryover, user-profile carryover, macro-policy queries, event/news queries, English queries, and clarification-required cases. The larger evaluation provides statistical support, while the fuzz matrix verifies schema validity and representative workflow behavior.
231236

232237
One representative case was the Chinese query `茅台今天为什么跌?后面还值得拿吗?`. The normalized query became `贵州茅台今天为什么跌 后面还值得拿吗`. The NLU module classified product type as `stock` with score 0.99, detected intents `market_explanation`, `hold_judgment`, and `buy_sell_timing`, and resolved the entity to `贵州茅台`, symbol `600519.SH`, through exact alias matching. It also marked the risk flag `investment_advice_like` and planned sources including news, research note, market API, industry SQL, fundamental SQL, and announcement. This result is important because the system understood both the explanation request and the advice-like risk in the same query.
233238

@@ -304,6 +309,8 @@ The remaining gap is predictive depth. The system summarizes market, fundamental
304309
| Chinese chatbot run | `/chat` returned `llm.status="ok"` and Chinese answer; PDF figure redacts volatile market numbers | `docs/assets/frontend-chatbot-zh.png`; `submission/final-report/assets/frontend-chatbot-zh-redacted.png` |
305310
| English chatbot run | `/chat` returned `llm.status="ok"` and English answer; PDF figure redacts volatile market numbers | `docs/assets/frontend-chatbot-en.png`; `submission/final-report/assets/frontend-chatbot-en-redacted.png` |
306311
| Browser rendering | Input, submit button, answer card, key points, evidence cards, and disclaimer rendered | `docs/frontend-chatbot.md` |
312+
| Large-scale Query Intelligence evaluation | 10,000 total queries; finance recall 0.975; OOD rejection 0.9729; Recall@10 0.9664; NDCG@10 0.8872 | `submission/final-report/evidence/large_scale_query_intelligence_eval.md` |
313+
| Large-scale evaluation limitation | Clarification recall 0.75, below the 0.90 target | `submission/final-report/evidence/large_scale_query_intelligence_eval.json` |
307314
| Fuzz test matrix | 32 total cases, 32 passed, 0 failed | `submission/final-report/evidence/fuzz_query_intelligence_report.md` |
308315
| Fuzz score | Overall 10.0/10; NLU 10.0/10; Retrieval 10.0/10; Schema 10.0/10 | `submission/final-report/evidence/fuzz_query_intelligence_report.md` |
309316
| Representative NLU case | Moutai query normalized, entity resolved to `600519.SH`, risk flag detected | `submission/final-report/evidence/fuzz_query_intelligence_report.json` |
9.3 KB
Binary file not shown.
7.83 KB
Binary file not shown.

submission/final-report/assets/academic-result-dashboard.svg

Lines changed: 38 additions & 37 deletions
Loading

0 commit comments

Comments
 (0)