Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EquiLens

Evaluation-first AI research copilot for Greater-China equities. Ingests Chinese-language filings (HKEX announcements, CNINFO A-share reports, earnings transcripts), retrieves with Chinese-aware hybrid search, and answers analyst questions with citations — every capability gated by an eval before it ships.

Why

Equity analysts covering Greater China read hundreds of pages of filings per week, almost all in Chinese — a corpus that mainstream LLM research tooling handles poorly (tokenization, section conventions, disclosure formats). EquiLens treats the Chinese filing as a first-class document and treats evaluation as the product: a research tool an analyst can trust must measure its own retrieval recall, citation accuracy, and faithfulness on every change.

Architecture

 filings (HKEX / CNINFO PDFs, transcripts)
        │  ingest: pdf → pages → Chinese-aware chunks (section metadata for citations)
        ▼
 hybrid index  ──  BM25 (jieba)  +  dense (multilingual embeddings, M1)  → fusion/rerank
        ▼
 retriever  ──►  answerer (Claude, cited-or-nothing, M2)  ──►  analyst UI / daily brief
        ▲                                                          │
        └──────────────  evals gate every layer  ◄─────────────────┘
     retrieval: recall@k, MRR (live today)
     generation: faithfulness, citation accuracy, regression in CI (M3)
     ops: cost & latency budgets per request (M3)

Quickstart

uv sync --extra dev
uv run pytest -q                       # chunking + retrieval-eval gates
uv run scripts/search_cli.py "毛利率"   # retrieval demo on bundled fixture
uv run python -c "from equilens.evals.retrieval import *; from equilens.retrieve import Retriever; from tests.test_chunk import make_chunks; print(evaluate(Retriever(make_chunks()), load_gold('evals/gold/sample_gold.jsonl'), k=3))"

Runs fully offline — the bundled corpus is a fictional annual-report excerpt used as an eval fixture. Real-corpus ingestion (HKEX/CNINFO) lands in M1 (see docs/ROADMAP.md).

Design principles

  1. Evaluation-first. No retrieval or generation change merges without moving (or holding) the gold-set metrics. The eval harness predates the app on purpose.
  2. Citations or nothing. Answers must quote section-level sources(如《2025年报》 "三、研发开支"); an unsupported claim is a bug, not a style issue.
  3. Chinese-first. jieba search-mode tokenization, heading conventions ("一、"、"第X节"), multilingual embeddings chosen for zh performance.
  4. Production posture. Structured logs, per-request cost/latency accounting, CI regression evals — the parts research prototypes usually skip.

Status

  • M0 (now): ingestion + Chinese-aware chunking + BM25 retrieval + retrieval evals, offline-runnable, tested.
  • M1: real corpora (HKEX/CNINFO, ~20 tickers), hybrid dense retrieval + fusion, persisted index.
  • M2: cited Q&A service (Claude API), quarter-over-quarter comparison, daily announcement brief, minimal web UI.
  • M3: generation evals (faithfulness / citation accuracy), GitHub Actions regression gate, tracing + cost dashboard, deployment.

Research tooling only — not investment advice. Fixture data is fictional.

About

Evaluation-first AI research copilot for Greater-China equities: Chinese filings ingestion, hybrid retrieval, cited Q&A

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages