Repository navigation
Description
Use cases, pain points, and background
Customer-support agents that must act on a customer's account — not just answer questions — are a high-value RL target. Retail banking has a different tool surface (deposits, loans, cards, mandates, cheques, servicing requests, knowledge lookup, human hand-off) and, in the Indian setting, its own rules that general models get wrong by defaulting to US financial context: KYC/re-KYC gating on writes, INR rate cards and EMIs, government schemes (PMJJBY, APY, SSY, PPF), TDS and Form 15G/H. There is no Gym environment today in which an agent has to complete a banking request end to end with the right tool calls in the right order and be scored on the resulting database state, and no reward designed so that a group of attempts at the same task carries a training gradient rather than only a pass/fail leaderboard number.
Description:
Add resources_servers/indian_banking: a multi-turn environment in which the policy staffs the chat desk of a synthetic India-based retail bank. The agent converses with an LLM-simulated customer, operates 34 tools (33 servicing tools plus transfer_to_human_agents) against a deterministic in-process banking engine, consults a written policy and a keyword knowledge base, and is scored on (a) the gold tool calls being made with the right arguments and no unrequested writes, (b) the final database matching a replay of the gold actions, (c) the required facts being communicated to the customer without leaking internal identifiers, and (d) LLM-judged natural-language assertions that never enter the strict gate. Ship 300 synthetic tasks over 50 scenario families (250 train / 50 validation), a synthetic customer database and knowledge base, five example rows/metrics/rollouts, offline tests and a README, all under Apache 2.0.
Design:
resources_servers/indian_banking/app.py—IndianBankingResourcesServer(GymnasiumServer):reset()clones the base database per episode under a frozen simulation clock and ID seed (contextvars-bound so concurrent rollouts in one process stay isolated);step()executes tool calls in-process; the terminal step returns the reward breakdown ininfo.core/banking_tools.py,core/engine.py,core/tool_schemas.py— the 33 tool implementations, product/rate constants, per-episode dispatch, function-calling schemas.core/reward.py—strict= AND of the active binary checks selected by each task'sreward_basis;dense= weighted blend (ACTION 0.40 / DB 0.25 / COMMUNICATE 0.15 / judge 0.20);reward=1 − efficiency_coston a pass (cost capped at 0.15), elsestrict + 0.4 · dense, so partial credit stays below the smallest pass increment. OptionalSEQ_STRICTconstant (off by default, matching tau2-bench's set-based check) makes gold-call order load-bearing.core/action_compare.py,core/state_normalize.py— comparison and normalisation utilities derived from tau2-bench (MIT), notices preserved in-file and recorded inATTRIBUTIONS.md.core/user_sim.py,core/judge.py,core/prompts/user-sim-guidelines.md— role-swapped LLM customer with progressive disclosure and###STOP###/###TRANSFER###/###OUT-OF-SCOPE###stop tokens; judge that sees only the customer-facing transcript, temperature 0, fails open on endpoint errors. Both served by oneopenai_modelconfigured fromenv.yaml.configs/indian_banking.yaml— resources server,gymnasium_agentwiring, model server;domain: agent,verified: false.data/—db.json,kb.json,policy.md,agent_instruction.txt,example.jsonl(5),example_metrics.json,example_rollouts.jsonl(5); train/validation splits hosted on Hugging Face and fetched bygym dataset collate.tests/test_app.py— offline tests for server sanity, tool dispatch, reward components, state normaliser and prompt construction.README.mdin the standard Description / Licensing format; one row in the rootATTRIBUTIONS.md; root README environment table regenerated by the pre-commit hook. No changes to NeMo Gym core.
Out of scope:
- Any change to NeMo Gym core, the
gymnasium_agent, or shared model servers. - A benchmark registration under
benchmarks/or a leaderboard; this issue covers the environment and its data only. - Vector/embedding retrieval for the knowledge base (keyword search is deliberate).
- Real bank data, real institution names, or any non-synthetic content.
- Training recipes, trained checkpoints, or reference model scores (may follow as separate contributions).
- A larger task set beyond the 300 shipped tasks (can follow as a dataset-only update).
Acceptance Criteria:
-
resources_servers/indian_banking/added withapp.py,core/,configs/indian_banking.yaml(domain: agent),data/,tests/test_app.py,README.md. - Every shipped task replays its gold actions through the engine at
strict = 1.0(300/300). -
gym env test --resources-server indian_bankingpasses (venv build, unit tests, example-data validation). -
data/example.jsonlhas exactly 5 rows,data/example_metrics.jsonreports 5 examples,data/example_rollouts.jsonlholds exactly 5 rollouts fromgym eval run. -
pre-commit run --all-filesis clean; NVIDIA SPDX headers on every new Python file;verified: falseleft as injected. - tau2-bench-derived files carry their MIT notices and are listed in
ATTRIBUTIONS.md; train and validation datasets carrylicense: Apache 2.0. - All data is synthetic: invented bank/brand/merchant/employer names, placeholder contact details, no real customer data.
- All commits DCO signed-off; PR opened against
mainfrom the contributor fork.
Activity