Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JAW 2026 — numerical document-QA solution

Reconstructs a structured warehouse from the 687-document corpus, then answers each question with a deterministic query (no LLM arithmetic). Question→shape routing is deterministic where possible, with an LLM planner (Groq) for the paraphrased tail.

SCORED 91.5% in the actual hackathon

Approach

  1. Extract the corpus into structured JSON warehouses (build/):
    • works.json — completion certificates (value, client, PM, category, date, grade)
    • references.json — reference letters (work→has-reference, role)
    • personnel.json — personnel certs + CVs (credentials, experience, business unit)
    • financials.json — receivables, trial balance, plant register
  2. Normalize every rupee value through an exact Indian-currency parser.
  3. Resolve entities by canonical keys (Pkg-NN, EMP-ID, client name+state).
  4. Answer each question: classify its shape → extract parameters against known entities → run the matching deterministic handler → format per answer_type.

Numbers are computed in Python; the LLM only classifies a question's shape.

Run

pip install -r requirements.txt
# place the organisers' dataset at ./dataset (BITS-Hackathon-Dataset)
python src/extract_works.py && python src/extract_references.py \
  && python src/extract_personnel.py && python src/extract_financials.py
python src/submit.py                     # -> build/submission.csv (371 rows)
python dataset/evaluate.py --submission build/sample.csv --questions dataset/sample_questions.json

The optional LLM planner reads a provider key from .env (GROQ_API_KEY); without a key it is skipped and only the deterministic router runs.

Layout

  • src/normalize_money.py — exact Cr/Lakh/grouping → rupees
  • src/extract_*.py — corpus → warehouses
  • src/classify.py — deterministic shape classifier
  • src/plan.py — LLM shape-planner fallback (cached)
  • src/answer.py — shape handlers + entity resolution
  • src/submit.py — routing, new-family handlers, CSV output
  • src/eval_harness.py — self-scoring against the sample set

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages