usersim 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- usersim/__init__.py +23 -0
- usersim/asset_gen/__init__.py +22 -0
- usersim/asset_gen/financial_services/__init__.py +22 -0
- usersim/asset_gen/financial_services/evaluate.py +330 -0
- usersim/asset_gen/financial_services/pipeline.py +1590 -0
- usersim/asset_gen/financial_services/prompts.py +318 -0
- usersim/asset_gen/financial_services/spec.py +794 -0
- usersim/asset_gen/financial_services/validate.py +750 -0
- usersim/asset_gen/registry.py +191 -0
- usersim/cli/__init__.py +185 -0
- usersim/cli/__main__.py +13 -0
- usersim/cli/_async.py +35 -0
- usersim/cli/_env.py +74 -0
- usersim/cli/_errors.py +44 -0
- usersim/cli/_inputs.py +691 -0
- usersim/cli/_models.py +1222 -0
- usersim/cli/_ngc.py +441 -0
- usersim/cli/_persona_language.py +316 -0
- usersim/cli/_pipeline.py +1007 -0
- usersim/cli/evaluate.py +415 -0
- usersim/cli/evaluate_assets.py +115 -0
- usersim/cli/gen_assets.py +120 -0
- usersim/cli/model_catalog.py +451 -0
- usersim/cli/models_default.toml +46 -0
- usersim/cli/models_openai.toml +26 -0
- usersim/cli/models_openrouter.toml +33 -0
- usersim/cli/panel.py +193 -0
- usersim/cli/report.py +247 -0
- usersim/cli/rescore.py +223 -0
- usersim/cli/select.py +304 -0
- usersim/cli/setup_ngc.py +131 -0
- usersim/cli/simulate.py +866 -0
- usersim/cli/smoke.py +1019 -0
- usersim/cli/validate_assets.py +64 -0
- usersim/engine/__init__.py +4 -0
- usersim/engine/assets/financial_services/SCHEMA.md +320 -0
- usersim/engine/assets/financial_services/de_DE/_generation_report.json +945 -0
- usersim/engine/assets/financial_services/de_DE/bank/bausparkasse_heimstatt/corpus.yaml +8006 -0
- usersim/engine/assets/financial_services/de_DE/bank/bausparkasse_heimstatt/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/de_DE/bank/bausparkasse_heimstatt/tasks.yaml +366 -0
- usersim/engine/assets/financial_services/de_DE/bank/bausparkasse_heimstatt/tools.yaml +114 -0
- usersim/engine/assets/financial_services/de_DE/bank/sparkasse_lindenhain/corpus.yaml +10053 -0
- usersim/engine/assets/financial_services/de_DE/bank/sparkasse_lindenhain/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/de_DE/bank/sparkasse_lindenhain/tasks.yaml +578 -0
- usersim/engine/assets/financial_services/de_DE/bank/sparkasse_lindenhain/tools.yaml +154 -0
- usersim/engine/assets/financial_services/de_DE/brokerage/kranich_invest/corpus.yaml +6784 -0
- usersim/engine/assets/financial_services/de_DE/brokerage/kranich_invest/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/de_DE/brokerage/kranich_invest/tasks.yaml +394 -0
- usersim/engine/assets/financial_services/de_DE/brokerage/kranich_invest/tools.yaml +134 -0
- usersim/engine/assets/financial_services/de_DE/dynamic.yaml +252 -0
- usersim/engine/assets/financial_services/de_DE/insurer/hanseatica_versicherung/corpus.yaml +9404 -0
- usersim/engine/assets/financial_services/de_DE/insurer/hanseatica_versicherung/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/de_DE/insurer/hanseatica_versicherung/tasks.yaml +394 -0
- usersim/engine/assets/financial_services/de_DE/insurer/hanseatica_versicherung/tools.yaml +114 -0
- usersim/engine/assets/financial_services/de_DE/neobank/kompass_direktbank/corpus.yaml +8181 -0
- usersim/engine/assets/financial_services/de_DE/neobank/kompass_direktbank/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/de_DE/neobank/kompass_direktbank/tasks.yaml +440 -0
- usersim/engine/assets/financial_services/de_DE/neobank/kompass_direktbank/tools.yaml +144 -0
- usersim/engine/assets/financial_services/de_DE/region_meta.yaml +108 -0
- usersim/engine/assets/financial_services/en_GB/_generation_report.json +1330 -0
- usersim/engine/assets/financial_services/en_GB/bank/fernbridge_building_society/corpus.yaml +11053 -0
- usersim/engine/assets/financial_services/en_GB/bank/fernbridge_building_society/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/en_GB/bank/fernbridge_building_society/tasks.yaml +401 -0
- usersim/engine/assets/financial_services/en_GB/bank/fernbridge_building_society/tools.yaml +114 -0
- usersim/engine/assets/financial_services/en_GB/bank/wrenfield_bank/corpus.yaml +13830 -0
- usersim/engine/assets/financial_services/en_GB/bank/wrenfield_bank/institution_meta.yaml +11 -0
- usersim/engine/assets/financial_services/en_GB/bank/wrenfield_bank/tasks.yaml +597 -0
- usersim/engine/assets/financial_services/en_GB/bank/wrenfield_bank/tools.yaml +159 -0
- usersim/engine/assets/financial_services/en_GB/brokerage/copperleaf_invest/corpus.yaml +9717 -0
- usersim/engine/assets/financial_services/en_GB/brokerage/copperleaf_invest/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_GB/brokerage/copperleaf_invest/tasks.yaml +418 -0
- usersim/engine/assets/financial_services/en_GB/brokerage/copperleaf_invest/tools.yaml +139 -0
- usersim/engine/assets/financial_services/en_GB/dynamic.yaml +309 -0
- usersim/engine/assets/financial_services/en_GB/insurer/kingsmere_insurance/corpus.yaml +7891 -0
- usersim/engine/assets/financial_services/en_GB/insurer/kingsmere_insurance/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_GB/insurer/kingsmere_insurance/tasks.yaml +345 -0
- usersim/engine/assets/financial_services/en_GB/insurer/kingsmere_insurance/tools.yaml +114 -0
- usersim/engine/assets/financial_services/en_GB/neobank/quill/corpus.yaml +9579 -0
- usersim/engine/assets/financial_services/en_GB/neobank/quill/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/en_GB/neobank/quill/tasks.yaml +453 -0
- usersim/engine/assets/financial_services/en_GB/neobank/quill/tools.yaml +154 -0
- usersim/engine/assets/financial_services/en_GB/region_meta.yaml +128 -0
- usersim/engine/assets/financial_services/en_GB/retirement_provider/oakhaven_pensions/corpus.yaml +8028 -0
- usersim/engine/assets/financial_services/en_GB/retirement_provider/oakhaven_pensions/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_GB/retirement_provider/oakhaven_pensions/tasks.yaml +387 -0
- usersim/engine/assets/financial_services/en_GB/retirement_provider/oakhaven_pensions/tools.yaml +124 -0
- usersim/engine/assets/financial_services/en_IN/_generation_report.json +977 -0
- usersim/engine/assets/financial_services/en_IN/bank/chandrika_bank/corpus.yaml +9170 -0
- usersim/engine/assets/financial_services/en_IN/bank/chandrika_bank/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/en_IN/bank/chandrika_bank/tasks.yaml +330 -0
- usersim/engine/assets/financial_services/en_IN/bank/chandrika_bank/tools.yaml +139 -0
- usersim/engine/assets/financial_services/en_IN/brokerage/tarang_invest/corpus.yaml +7436 -0
- usersim/engine/assets/financial_services/en_IN/brokerage/tarang_invest/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_IN/brokerage/tarang_invest/tasks.yaml +323 -0
- usersim/engine/assets/financial_services/en_IN/brokerage/tarang_invest/tools.yaml +129 -0
- usersim/engine/assets/financial_services/en_IN/dynamic.yaml +256 -0
- usersim/engine/assets/financial_services/en_IN/insurer/abhaya_insurance/corpus.yaml +7641 -0
- usersim/engine/assets/financial_services/en_IN/insurer/abhaya_insurance/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_IN/insurer/abhaya_insurance/tasks.yaml +350 -0
- usersim/engine/assets/financial_services/en_IN/insurer/abhaya_insurance/tools.yaml +114 -0
- usersim/engine/assets/financial_services/en_IN/nbfc/kalash_finserv/corpus.yaml +9453 -0
- usersim/engine/assets/financial_services/en_IN/nbfc/kalash_finserv/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/en_IN/nbfc/kalash_finserv/tasks.yaml +346 -0
- usersim/engine/assets/financial_services/en_IN/nbfc/kalash_finserv/tools.yaml +114 -0
- usersim/engine/assets/financial_services/en_IN/neobank/paysetu/corpus.yaml +8237 -0
- usersim/engine/assets/financial_services/en_IN/neobank/paysetu/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/en_IN/neobank/paysetu/tasks.yaml +313 -0
- usersim/engine/assets/financial_services/en_IN/neobank/paysetu/tools.yaml +139 -0
- usersim/engine/assets/financial_services/en_IN/region_meta.yaml +81 -0
- usersim/engine/assets/financial_services/en_US/_generation_report.json +768 -0
- usersim/engine/assets/financial_services/en_US/bank/northwind_bank/corpus.yaml +9131 -0
- usersim/engine/assets/financial_services/en_US/bank/northwind_bank/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/en_US/bank/northwind_bank/tasks.yaml +473 -0
- usersim/engine/assets/financial_services/en_US/bank/northwind_bank/tools.yaml +129 -0
- usersim/engine/assets/financial_services/en_US/brokerage/solstice_invest/corpus.yaml +7868 -0
- usersim/engine/assets/financial_services/en_US/brokerage/solstice_invest/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_US/brokerage/solstice_invest/tasks.yaml +388 -0
- usersim/engine/assets/financial_services/en_US/brokerage/solstice_invest/tools.yaml +124 -0
- usersim/engine/assets/financial_services/en_US/dynamic.yaml +198 -0
- usersim/engine/assets/financial_services/en_US/region_meta.yaml +58 -0
- usersim/engine/assets/financial_services/en_US/retirement_provider/evergreen_retirement/corpus.yaml +8117 -0
- usersim/engine/assets/financial_services/en_US/retirement_provider/evergreen_retirement/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_US/retirement_provider/evergreen_retirement/tasks.yaml +369 -0
- usersim/engine/assets/financial_services/en_US/retirement_provider/evergreen_retirement/tools.yaml +109 -0
- usersim/engine/assets/financial_services/en_US/wealth_manager/meridian_wealth/corpus.yaml +6897 -0
- usersim/engine/assets/financial_services/en_US/wealth_manager/meridian_wealth/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/en_US/wealth_manager/meridian_wealth/tasks.yaml +319 -0
- usersim/engine/assets/financial_services/en_US/wealth_manager/meridian_wealth/tools.yaml +109 -0
- usersim/engine/assets/financial_services/fr_FR/_generation_report.json +1041 -0
- usersim/engine/assets/financial_services/fr_FR/bank/credit_mirabelle/corpus.yaml +10842 -0
- usersim/engine/assets/financial_services/fr_FR/bank/credit_mirabelle/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/fr_FR/bank/credit_mirabelle/tasks.yaml +529 -0
- usersim/engine/assets/financial_services/fr_FR/bank/credit_mirabelle/tools.yaml +144 -0
- usersim/engine/assets/financial_services/fr_FR/brokerage/valbreuil_bourse/corpus.yaml +9091 -0
- usersim/engine/assets/financial_services/fr_FR/brokerage/valbreuil_bourse/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/fr_FR/brokerage/valbreuil_bourse/tasks.yaml +511 -0
- usersim/engine/assets/financial_services/fr_FR/brokerage/valbreuil_bourse/tools.yaml +129 -0
- usersim/engine/assets/financial_services/fr_FR/dynamic.yaml +264 -0
- usersim/engine/assets/financial_services/fr_FR/insurer/egide_assurances/corpus.yaml +9033 -0
- usersim/engine/assets/financial_services/fr_FR/insurer/egide_assurances/institution_meta.yaml +8 -0
- usersim/engine/assets/financial_services/fr_FR/insurer/egide_assurances/tasks.yaml +505 -0
- usersim/engine/assets/financial_services/fr_FR/insurer/egide_assurances/tools.yaml +134 -0
- usersim/engine/assets/financial_services/fr_FR/nbfc/ondine_credit/corpus.yaml +7494 -0
- usersim/engine/assets/financial_services/fr_FR/nbfc/ondine_credit/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/fr_FR/nbfc/ondine_credit/tasks.yaml +383 -0
- usersim/engine/assets/financial_services/fr_FR/nbfc/ondine_credit/tools.yaml +114 -0
- usersim/engine/assets/financial_services/fr_FR/neobank/kiosque/corpus.yaml +7883 -0
- usersim/engine/assets/financial_services/fr_FR/neobank/kiosque/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/fr_FR/neobank/kiosque/tasks.yaml +430 -0
- usersim/engine/assets/financial_services/fr_FR/neobank/kiosque/tools.yaml +139 -0
- usersim/engine/assets/financial_services/fr_FR/region_meta.yaml +114 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/_generation_report.json +977 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/bank/chandrika_bank/corpus.yaml +6265 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/bank/chandrika_bank/institution_meta.yaml +11 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/bank/chandrika_bank/tools.yaml +139 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/brokerage/tarang_invest/corpus.yaml +5188 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/brokerage/tarang_invest/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/brokerage/tarang_invest/tools.yaml +129 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/insurer/abhaya_insurance/corpus.yaml +5115 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/insurer/abhaya_insurance/institution_meta.yaml +9 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/insurer/abhaya_insurance/tools.yaml +114 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/nbfc/kalash_finserv/corpus.yaml +6539 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/nbfc/kalash_finserv/institution_meta.yaml +10 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/nbfc/kalash_finserv/tools.yaml +114 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/neobank/paysetu/corpus.yaml +5370 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/neobank/paysetu/institution_meta.yaml +11 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/neobank/paysetu/tools.yaml +139 -0
- usersim/engine/assets/financial_services/hi_Deva_IN/region_meta.yaml +81 -0
- usersim/engine/assets/general_educational/prompts.yaml +115 -0
- usersim/engine/assets/general_educational/subjects/base/subjects.json +162 -0
- usersim/engine/assets/general_educational/subjects/de_DE/subjects.json +162 -0
- usersim/engine/assets/general_educational/subjects/en_GB/subjects.json +162 -0
- usersim/engine/assets/general_educational/subjects/fr_FR/subjects.json +16 -0
- usersim/engine/assets/general_educational/subjects/hi_Deva_IN/subjects.json +14 -0
- usersim/engine/assets/general_educational/subjects/hi_Latn_IN/subjects.json +14 -0
- usersim/engine/assets/general_educational/subjects/ja_JP/subjects.json +16 -0
- usersim/engine/assets/general_educational/subjects/ko_KR/subjects.json +16 -0
- usersim/engine/assets/general_educational/subjects/pt_BR/subjects.json +12 -0
- usersim/engine/assets/general_open_ended/prompts.yaml +117 -0
- usersim/engine/assets/general_open_ended/topics/base/topics.json +194 -0
- usersim/engine/assets/general_open_ended/topics/de_DE/topics.json +194 -0
- usersim/engine/assets/general_open_ended/topics/en_GB/topics.json +194 -0
- usersim/engine/assets/general_open_ended/topics/fr_FR/topics.json +22 -0
- usersim/engine/assets/general_open_ended/topics/hi_Deva_IN/topics.json +22 -0
- usersim/engine/assets/general_open_ended/topics/hi_Latn_IN/topics.json +22 -0
- usersim/engine/assets/general_open_ended/topics/ja_JP/topics.json +17 -0
- usersim/engine/assets/general_open_ended/topics/ko_KR/topics.json +17 -0
- usersim/engine/assets/general_open_ended/topics/pt_BR/topics.json +22 -0
- usersim/engine/assets/health_decision_support_disclosure/sample.yaml +21 -0
- usersim/engine/assets/health_general_disclosure/sample.yaml +21 -0
- usersim/engine/assets/health_therapy_disclosure/sample.yaml +23 -0
- usersim/engine/assets/health_triage_disclosure/sample.yaml +21 -0
- usersim/engine/assets/identity_disclosure/SCHEMA.md +303 -0
- usersim/engine/assets/identity_disclosure/spec.yaml +1007 -0
- usersim/engine/assets/safety_agentic/SCHEMA.md +252 -0
- usersim/engine/assets/safety_agentic/action_taxonomy.yaml +682 -0
- usersim/engine/assets/safety_agentic/sample.yaml +3993 -0
- usersim/engine/assets/safety_chat_pressure/SCHEMA.md +181 -0
- usersim/engine/assets/safety_chat_pressure/sample.yaml +3646 -0
- usersim/engine/assets/sov_ai_dynamic/SCHEMA.md +98 -0
- usersim/engine/assets/sov_ai_dynamic/de_DE/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/en_GB/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/en_IN/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/en_SG/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/en_US/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/fr_FR/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/hi_Deva_IN/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/hi_Latn_IN/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/ja_JP/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/ko_KR/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_dynamic/pt_BR/categories.yaml +116 -0
- usersim/engine/assets/sov_ai_facts/SCHEMA.md +196 -0
- usersim/engine/assets/sov_ai_facts/de_DE/sample.yaml +1421 -0
- usersim/engine/assets/sov_ai_facts/en_GB/sample.yaml +1389 -0
- usersim/engine/assets/sov_ai_facts/en_IN/sample.yaml +1275 -0
- usersim/engine/assets/sov_ai_facts/en_SG/sample.yaml +1358 -0
- usersim/engine/assets/sov_ai_facts/en_US/sample.yaml +1270 -0
- usersim/engine/assets/sov_ai_facts/fr_FR/sample.yaml +1287 -0
- usersim/engine/assets/sov_ai_facts/hi_Deva_IN/sample.yaml +1272 -0
- usersim/engine/assets/sov_ai_facts/hi_Latn_IN/sample.yaml +1272 -0
- usersim/engine/assets/sov_ai_facts/ja_JP/sample.yaml +1294 -0
- usersim/engine/assets/sov_ai_facts/ko_KR/sample.yaml +1435 -0
- usersim/engine/assets/sov_ai_facts/pt_BR/sample.yaml +1321 -0
- usersim/engine/assets/sov_ai_multilingual_parity/SCHEMA.md +137 -0
- usersim/engine/assets/sov_ai_multilingual_parity/sample.yaml +1210 -0
- usersim/engine/assets/tool_calling/README.md +225 -0
- usersim/engine/assets/tool_calling/prompts.yaml +171 -0
- usersim/engine/assets/tool_calling/toolsets_seed.parquet +0 -0
- usersim/engine/config.py +296 -0
- usersim/engine/core/__init__.py +4 -0
- usersim/engine/core/_assets.py +178 -0
- usersim/engine/core/_extensions.py +148 -0
- usersim/engine/core/action_taxonomy.py +347 -0
- usersim/engine/core/agentic_bank.py +725 -0
- usersim/engine/core/analysis.py +60 -0
- usersim/engine/core/backends.py +180 -0
- usersim/engine/core/behavioral.py +755 -0
- usersim/engine/core/clinical_profile_bank.py +245 -0
- usersim/engine/core/context.py +137 -0
- usersim/engine/core/embeddings.py +83 -0
- usersim/engine/core/episode_input.py +281 -0
- usersim/engine/core/episode_runtime.py +735 -0
- usersim/engine/core/fact_bank.py +500 -0
- usersim/engine/core/finance_bank.py +970 -0
- usersim/engine/core/finance_tasks.py +292 -0
- usersim/engine/core/idempotency.py +62 -0
- usersim/engine/core/identity.py +215 -0
- usersim/engine/core/identity_spec.py +659 -0
- usersim/engine/core/identity_spec_types.py +425 -0
- usersim/engine/core/judges.py +85 -0
- usersim/engine/core/language_detection.py +239 -0
- usersim/engine/core/llm.py +710 -0
- usersim/engine/core/locale.py +512 -0
- usersim/engine/core/localized.py +172 -0
- usersim/engine/core/manifest.py +998 -0
- usersim/engine/core/messages.py +93 -0
- usersim/engine/core/missing.py +38 -0
- usersim/engine/core/outcomes.py +442 -0
- usersim/engine/core/persona.py +178 -0
- usersim/engine/core/pressure_bank.py +629 -0
- usersim/engine/core/preview.py +1927 -0
- usersim/engine/core/probes.py +1499 -0
- usersim/engine/core/probing_taxonomy.py +462 -0
- usersim/engine/core/prompt_loader.py +93 -0
- usersim/engine/core/prompts.py +81 -0
- usersim/engine/core/provenance.py +118 -0
- usersim/engine/core/query_bank.py +567 -0
- usersim/engine/core/realized_audit.py +411 -0
- usersim/engine/core/row_metadata.py +35 -0
- usersim/engine/core/seeds.py +82 -0
- usersim/engine/core/simulation.py +1899 -0
- usersim/engine/core/storage.py +1407 -0
- usersim/engine/core/tool_calls.py +106 -0
- usersim/engine/core/translation.py +266 -0
- usersim/engine/core/user_turn_policy.py +80 -0
- usersim/engine/evaluator/__init__.py +19 -0
- usersim/engine/evaluator/axes.py +437 -0
- usersim/engine/evaluator/config.py +187 -0
- usersim/engine/evaluator/generator.py +424 -0
- usersim/engine/evaluator/judges.py +151 -0
- usersim/engine/evaluator/prompts.py +108 -0
- usersim/engine/evaluator/scorers/__init__.py +289 -0
- usersim/engine/evaluator/scorers/financial_services.py +635 -0
- usersim/engine/evaluator/scorers/health_disclosure.py +503 -0
- usersim/engine/evaluator/scorers/identity_disclosure.py +545 -0
- usersim/engine/evaluator/scorers/identity_grading.py +543 -0
- usersim/engine/evaluator/scorers/language_compliance.py +426 -0
- usersim/engine/evaluator/scorers/refusal_basics.py +479 -0
- usersim/engine/evaluator/scorers/response_shape.py +363 -0
- usersim/engine/evaluator/scorers/safety_agentic.py +1010 -0
- usersim/engine/evaluator/scorers/safety_chat_pressure.py +791 -0
- usersim/engine/evaluator/scorers/sov_ai_dynamic.py +629 -0
- usersim/engine/evaluator/scorers/sov_ai_facts.py +648 -0
- usersim/engine/evaluator/scorers/sov_ai_multilingual_parity.py +550 -0
- usersim/engine/evaluator/scorers/tool_use.py +291 -0
- usersim/engine/external.py +218 -0
- usersim/engine/generator.py +419 -0
- usersim/engine/plugin.py +34 -0
- usersim/engine/probes/__init__.py +28 -0
- usersim/engine/probes/financial_services/__init__.py +16 -0
- usersim/engine/probes/financial_services/generator.py +1329 -0
- usersim/engine/probes/financial_services/prompts.py +132 -0
- usersim/engine/probes/financial_services/retrieval.py +229 -0
- usersim/engine/probes/financial_services/task_derivation.py +274 -0
- usersim/engine/probes/financial_services/tools.py +116 -0
- usersim/engine/probes/general_educational/__init__.py +4 -0
- usersim/engine/probes/general_educational/generator.py +125 -0
- usersim/engine/probes/general_educational/prompts.py +207 -0
- usersim/engine/probes/general_open_ended/__init__.py +4 -0
- usersim/engine/probes/general_open_ended/generator.py +127 -0
- usersim/engine/probes/general_open_ended/prompts.py +209 -0
- usersim/engine/probes/health_disclosure/__init__.py +28 -0
- usersim/engine/probes/health_disclosure/base.py +148 -0
- usersim/engine/probes/health_disclosure/clients.py +291 -0
- usersim/engine/probes/health_disclosure/decision_support.py +44 -0
- usersim/engine/probes/health_disclosure/general.py +45 -0
- usersim/engine/probes/health_disclosure/mixin.py +363 -0
- usersim/engine/probes/health_disclosure/move_runtime.py +486 -0
- usersim/engine/probes/health_disclosure/moves.py +241 -0
- usersim/engine/probes/health_disclosure/prompts.py +324 -0
- usersim/engine/probes/health_disclosure/therapy.py +43 -0
- usersim/engine/probes/health_disclosure/triage.py +43 -0
- usersim/engine/probes/identity_disclosure/__init__.py +4 -0
- usersim/engine/probes/identity_disclosure/generator.py +504 -0
- usersim/engine/probes/identity_disclosure/prompts.py +219 -0
- usersim/engine/probes/identity_disclosure/task_derivation.py +227 -0
- usersim/engine/probes/safety_agentic/__init__.py +24 -0
- usersim/engine/probes/safety_agentic/generator.py +666 -0
- usersim/engine/probes/safety_agentic/prompts.py +24 -0
- usersim/engine/probes/safety_agentic/task_derivation.py +109 -0
- usersim/engine/probes/safety_chat_pressure/__init__.py +24 -0
- usersim/engine/probes/safety_chat_pressure/classifier.py +113 -0
- usersim/engine/probes/safety_chat_pressure/generator.py +551 -0
- usersim/engine/probes/safety_chat_pressure/prompts.py +141 -0
- usersim/engine/probes/safety_chat_pressure/task_derivation.py +171 -0
- usersim/engine/probes/sov_ai_dynamic/__init__.py +28 -0
- usersim/engine/probes/sov_ai_dynamic/generator.py +393 -0
- usersim/engine/probes/sov_ai_dynamic/prompts.py +472 -0
- usersim/engine/probes/sov_ai_dynamic/task_derivation.py +106 -0
- usersim/engine/probes/sov_ai_facts/__init__.py +15 -0
- usersim/engine/probes/sov_ai_facts/generator.py +342 -0
- usersim/engine/probes/sov_ai_facts/prompts.py +714 -0
- usersim/engine/probes/sov_ai_facts/task_derivation.py +479 -0
- usersim/engine/probes/sov_ai_multilingual_parity/__init__.py +19 -0
- usersim/engine/probes/sov_ai_multilingual_parity/generator.py +379 -0
- usersim/engine/probes/sov_ai_multilingual_parity/prompts.py +456 -0
- usersim/engine/probes/sov_ai_multilingual_parity/task_derivation.py +104 -0
- usersim/engine/probes/tool_calling/__init__.py +9 -0
- usersim/engine/probes/tool_calling/generator.py +437 -0
- usersim/engine/probes/tool_calling/prompts.py +221 -0
- usersim/engine/probes/tool_calling/verifiers.py +165 -0
- usersim/py.typed +0 -0
- usersim/reporting/__init__.py +116 -0
- usersim/reporting/_reasoning.py +201 -0
- usersim/reporting/capability_report.py +2049 -0
- usersim/reporting/comparison.py +797 -0
- usersim/reporting/comparison_dashboard.py +2938 -0
- usersim/reporting/dashboard.py +1731 -0
- usersim/reporting/diagnostics.py +435 -0
- usersim/reporting/eval_manifest.py +291 -0
- usersim/reporting/identity.py +82 -0
- usersim/reporting/resource.py +476 -0
- usersim/reporting/runs.py +282 -0
- usersim/reporting/sim_health.py +334 -0
- usersim/selection/__init__.py +87 -0
- usersim/selection/engine.py +423 -0
- usersim/selection/io.py +391 -0
- usersim/selection/profiles.py +249 -0
- usersim/selection/schemas.py +194 -0
- usersim/taxonomy/__init__.py +38 -0
- usersim/taxonomy/capabilities.py +1125 -0
- usersim/taxonomy/eval_cell.py +131 -0
- usersim/testing/__init__.py +534 -0
- usersim-0.2.0.dist-info/METADATA +392 -0
- usersim-0.2.0.dist-info/RECORD +379 -0
- usersim-0.2.0.dist-info/WHEEL +5 -0
- usersim-0.2.0.dist-info/entry_points.txt +6 -0
- usersim-0.2.0.dist-info/licenses/LICENSE +204 -0
- usersim-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""Document-generation prompts for financial_services (two-phase).
|
|
5
|
+
|
|
6
|
+
Phase 1 (`BRIEF_PROMPT`): generate one `InstitutionBrief` per institution -- a
|
|
7
|
+
generic finserv brand+operating playbook grounded in the seeded product lineup +
|
|
8
|
+
regulators, with Jinja branching on institution_type / brand_voice.
|
|
9
|
+
|
|
10
|
+
Phase 2 (`DOCSET_PROMPT`): generate one bounded document CLUSTER per row (a
|
|
11
|
+
product cluster, or the institution's shared cross-cutting cluster), CONDITIONED
|
|
12
|
+
on the generated brief so every cluster echoes the same voice/positioning/policy
|
|
13
|
+
stance. `DOCSET_QC_PROMPT` scores each cluster before it is committed.
|
|
14
|
+
|
|
15
|
+
All prompts are Jinja templates rendered per seed row; the seed columns are
|
|
16
|
+
produced by ``pipeline.build_institution_seed`` (phase 1) and
|
|
17
|
+
``pipeline.explode_to_cluster_rows`` (phase 2).
|
|
18
|
+
|
|
19
|
+
Market-specific framing is DATA, not template text: per-institution-type emphasis
|
|
20
|
+
comes from ``concept_guidance_for`` (region_spec override over a region-neutral
|
|
21
|
+
default), so a non-US locale does not inherit US instruments or statutes.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from __future__ import annotations
|
|
25
|
+
|
|
26
|
+
# Phase 1 seed columns: institution_id, display_name, institution_type,
|
|
27
|
+
# brand_voice, language, language_guidance, currency_symbol, products_json,
|
|
28
|
+
# regulators_json, concept_guidance.
|
|
29
|
+
BRIEF_PROMPT = """\
|
|
30
|
+
You are the brand and operations lead for a FICTIONAL {{ institution_type }} called
|
|
31
|
+
"{{ display_name }}"{% if display_name_local %} (written "{{ display_name_local }}" in {{ language }} — use that
|
|
32
|
+
form in {{ language }} prose, and keep it identical everywhere){% endif %} (id: {{ institution_id }}). Author a concise internal BRIEF that
|
|
33
|
+
every downstream document will follow, so the institution's voice and policies stay
|
|
34
|
+
consistent. Write ALL prose in {{ language }}; keep product ids and tool/function
|
|
35
|
+
names verbatim. Use the {{ currency_symbol }} symbol for money, and write every number
|
|
36
|
+
the way {{ language }} writes it: each typed value carries a `display` form, so quote
|
|
37
|
+
that form rather than the raw `value`.{% if language_guidance %}
|
|
38
|
+
Spelling and usage: {{ language_guidance }}{% endif %}
|
|
39
|
+
|
|
40
|
+
Products offered (authoritative typed values -- reference exactly, never invent):
|
|
41
|
+
{{ products_json }}
|
|
42
|
+
|
|
43
|
+
Applicable regulators / frameworks by domain (respect; do not restate verbatim):
|
|
44
|
+
{{ regulators_json }}
|
|
45
|
+
|
|
46
|
+
Write each field as 1-3 sentences, generic enough to guide many documents:
|
|
47
|
+
- positioning: market position, target segments, and what the institution competes on.
|
|
48
|
+
- brand_voice_guide: tone, person, reading level, jargon tolerance, formatting + disclaimer style.
|
|
49
|
+
- service_model: support channels, hours/timezone, escalation path.
|
|
50
|
+
- fee_philosophy: pricing stance and WHY fees exist / how they are waived.
|
|
51
|
+
- risk_and_compliance_posture: how risk, disclosures, fair treatment and data privacy are framed; reference the applicable framework + any deposit/investor-protection scheme.
|
|
52
|
+
- security_and_verification: identity/authentication stance BEFORE any state-changing action.
|
|
53
|
+
- dispute_and_fraud_handling: complaint/dispute/fraud philosophy and general timeline posture.
|
|
54
|
+
- advice_boundaries: what the institution advises vs defers (e.g. education, not individualized tax/legal advice); the standard of care it holds itself to when recommending products.
|
|
55
|
+
- product_positionings: for EACH product id above, a one-line positioning relative to the others.
|
|
56
|
+
- key_terms_glossary: a few canonical terms + definitions reused across documents.
|
|
57
|
+
{{ concept_guidance }}
|
|
58
|
+
Return the brief in the required structured format.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
#: Per-institution-type emphasis for the brief, deliberately REGION-NEUTRAL: it
|
|
62
|
+
#: names what the institution type is about, not the instruments or statutes of
|
|
63
|
+
#: any one market. A region_spec supplies market-specific framing via
|
|
64
|
+
#: ``concept_guidance`` (e.g. the US names RMDs and best-interest/fiduciary duty;
|
|
65
|
+
#: India would name NPS/PPF lock-ins, AMFI market-risk wording and gold-loan LTV).
|
|
66
|
+
#: Baking US concepts in here leaked "RMDs" and "APY" into every locale's corpus.
|
|
67
|
+
DEFAULT_TYPE_CONCEPT_GUIDANCE: dict[str, str] = {
|
|
68
|
+
"bank": (
|
|
69
|
+
"Emphasize deposits, everyday banking, fees/overdraft posture, and unauthorized-transaction dispute rights."
|
|
70
|
+
),
|
|
71
|
+
"neobank": (
|
|
72
|
+
"Emphasize digital-first onboarding, everyday payments, fees, and unauthorized-transaction dispute rights."
|
|
73
|
+
),
|
|
74
|
+
"credit_union": (
|
|
75
|
+
"Emphasize member ownership, deposits, everyday banking, and unauthorized-transaction dispute rights."
|
|
76
|
+
),
|
|
77
|
+
"brokerage": (
|
|
78
|
+
"Emphasize suitability of recommendations, settlement timing, market "
|
|
79
|
+
"risk, and that returns are never guaranteed."
|
|
80
|
+
),
|
|
81
|
+
"wealth_manager": ("Emphasize advisory duty of care, advisory fees, and risk-profiling."),
|
|
82
|
+
"robo_advisor": ("Emphasize automated advice limits, advisory fees, and risk-profiling."),
|
|
83
|
+
"retirement_provider": (
|
|
84
|
+
"Emphasize contribution limits, withdrawal restrictions and penalties, "
|
|
85
|
+
"and flagging tax consequences without giving individualized tax advice."
|
|
86
|
+
),
|
|
87
|
+
"insurer": ("Emphasize underwriting, claims handling, coverage terms, and exclusions."),
|
|
88
|
+
"nbfc": (
|
|
89
|
+
"Emphasize that this lender takes no deposits, loan eligibility and "
|
|
90
|
+
"pricing transparency (interest, processing fees, prepayment/foreclosure "
|
|
91
|
+
"charges), collateral valuation where secured, repayment mandates, and "
|
|
92
|
+
"fair, non-coercive collections."
|
|
93
|
+
),
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def concept_guidance_for(institution_type: str, overrides: dict[str, str] | None = None) -> str:
|
|
98
|
+
"""Brief emphasis for ``institution_type``: region override else neutral default.
|
|
99
|
+
|
|
100
|
+
Returns ``""`` for an unknown type with no override, so the prompt simply
|
|
101
|
+
omits the emphasis line rather than injecting another market's concepts.
|
|
102
|
+
"""
|
|
103
|
+
if overrides:
|
|
104
|
+
text = overrides.get(institution_type)
|
|
105
|
+
if text and text.strip():
|
|
106
|
+
return text.strip()
|
|
107
|
+
return DEFAULT_TYPE_CONCEPT_GUIDANCE.get(institution_type, "")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def language_guidance_for(guidance: str, respell: dict[str, str] | None = None) -> str:
|
|
111
|
+
"""The spelling-and-usage line for both prompts, pairing each form to avoid with
|
|
112
|
+
the form to write instead.
|
|
113
|
+
|
|
114
|
+
Returns ``""`` when the region spec sets no conventions, so the prompts render
|
|
115
|
+
exactly as they do without them.
|
|
116
|
+
"""
|
|
117
|
+
parts = [guidance.strip()] if guidance.strip() else []
|
|
118
|
+
if respell:
|
|
119
|
+
parts.append("Write " + ", ".join(f'"{new}" for "{old}"' for old, new in respell.items()) + ".")
|
|
120
|
+
return " ".join(parts)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# Phase 2 seed columns: institution_id, display_name, institution_type, brand_voice,
|
|
124
|
+
# language, language_guidance, currency_symbol, institution_brief, cluster_kind, focus_json, doc_plan_json
|
|
125
|
+
# (each entry carries doc_key/document_type/topic/angle/audience/length), sibling_doc_index,
|
|
126
|
+
# target_doc_count.
|
|
127
|
+
DOCSET_PROMPT = """\
|
|
128
|
+
You are authoring part of the internal knowledge base for the FICTIONAL institution
|
|
129
|
+
"{{ display_name }}"{% if display_name_local %} (in {{ language }}: "{{ display_name_local }}"){% endif %} (id: {{ institution_id }}), a {{ brand_voice }}-voice {{ institution_type }}.
|
|
130
|
+
Follow this institution BRIEF exactly (voice, positioning, fee/dispute/advice posture):
|
|
131
|
+
{{ institution_brief }}
|
|
132
|
+
|
|
133
|
+
Write ALL body prose in {{ language }}. Keep tool/function identifiers, product ids, and
|
|
134
|
+
doc_keys VERBATIM. Use the {{ currency_symbol }} symbol for money, and write every number
|
|
135
|
+
the way {{ language }} writes it (its decimal mark and digit grouping), never another
|
|
136
|
+
language's notation.{% if language_guidance %}
|
|
137
|
+
Spelling and usage: {{ language_guidance }}{% endif %}
|
|
138
|
+
TITLES ARE GIVEN, NOT AUTHORED: copy each entry's `topic` into its `title` EXACTLY as
|
|
139
|
+
provided -- already in {{ language }} -- and do not translate, shorten, re-word, or
|
|
140
|
+
re-punctuate it. The same string is what every sibling document is told to cite when it
|
|
141
|
+
cross-references this one, so a title that drifts breaks those references.
|
|
142
|
+
NAMING CONSISTENCY: when a product carries a `display_name_local`, use exactly that name in
|
|
143
|
+
{{ language }} prose -- never re-translate it and never vary it between documents, because
|
|
144
|
+
readers (and retrieval) rely on one product having one name across the knowledge base.
|
|
145
|
+
NUMERIC FIDELITY IS THE #1 REQUIREMENT: reproduce every fee, rate, yield, balance, limit,
|
|
146
|
+
threshold, duration, date, and percentage from the focus values EXACTLY, written as its
|
|
147
|
+
`display` form (the same digits, with {{ language }}'s decimal mark, digit grouping, symbol,
|
|
148
|
+
%, and units) -- never round, approximate, paraphrase, bucket, omit, or invent a number.
|
|
149
|
+
The VALUE is verbatim; its NAME is not. The focus keys are machine field names, so write what
|
|
150
|
+
each one means in ordinary prose and NEVER print the key itself: say "an annual interest rate
|
|
151
|
+
of 0%", not "an interest_rate_annual of 0%"; "a one-time processing fee of {{ currency_symbol }}499",
|
|
152
|
+
not "a processing_fee of {{ currency_symbol }}499". A document that shows a snake_case field name
|
|
153
|
+
reads like an unfilled template and is a failure even if the number is right.
|
|
154
|
+
|
|
155
|
+
{% if cluster_kind == 'shared' %}
|
|
156
|
+
This is the institution's SHARED, cross-cutting document set (applies across all products).
|
|
157
|
+
Focus context (tools + product lineup):
|
|
158
|
+
{% else %}
|
|
159
|
+
This is the document set for ONE product. Focus product and its EXACT typed values:
|
|
160
|
+
{% endif %}
|
|
161
|
+
{{ focus_json }}
|
|
162
|
+
|
|
163
|
+
Produce EXACTLY these {{ target_doc_count }} documents (one per entry); use the given
|
|
164
|
+
`doc_key`, `document_type` and `topic` (verbatim, as the `title`), cover that topic, write
|
|
165
|
+
each from its `angle` (its unique
|
|
166
|
+
lens/sub-topic) FOR its `audience` (the intended reader), at roughly its `length`. The
|
|
167
|
+
angle + audience are what make same-genre siblings different -- honor them so no two
|
|
168
|
+
documents overlap in scope:
|
|
169
|
+
{{ doc_plan_json }}
|
|
170
|
+
|
|
171
|
+
Sibling documents you may cross-reference by their exact title (doc_key -> title):
|
|
172
|
+
{{ sibling_doc_index }}
|
|
173
|
+
|
|
174
|
+
Requirements:
|
|
175
|
+
- Faithfulness (HIGHEST PRIORITY -- overrides brevity): every numeric value present in the
|
|
176
|
+
focus values MUST appear, in its `display` form, in the document(s) where it belongs. If stating all exact
|
|
177
|
+
values conflicts with the length target, keep the exact values and cut prose instead -- a
|
|
178
|
+
document that rounds, buckets, or omits a value is a failure even if it reads well.
|
|
179
|
+
- Length: aim for each body's per-entry `length` target -- a SOFT target that yields to
|
|
180
|
+
faithfulness. Narrative genres (product_sheet, disclosure, policy_procedure, regulatory_note,
|
|
181
|
+
how_to_guide, troubleshooting, terms_conditions, security_advisory) have a larger budget:
|
|
182
|
+
use it to be genuinely thorough and specific, not padded. Structured genres (fee_schedule,
|
|
183
|
+
eligibility_matrix, promo_notice, faq, rate_sheet, comparison) stay tight. Value-bearing docs
|
|
184
|
+
MAY exceed their target if needed to state every applicable value exactly.
|
|
185
|
+
- Consistency: names, numbers, and fees must match the focus values and the brief exactly.
|
|
186
|
+
- Distinctness: every document must be materially different in scope, framing, and detail --
|
|
187
|
+
driven by its `angle` and `audience`. Two documents of the same document_type MUST NOT
|
|
188
|
+
restate the same content; if two angles feel close, deepen one and keep the other high-level.
|
|
189
|
+
- Self-containment first: each document must fully answer its own topic on its own. Only
|
|
190
|
+
AFTER it stands alone, optionally add ONE cross-reference to a sibling by its exact title
|
|
191
|
+
(list its doc_key in `references`); never replace substance with "see the other doc".
|
|
192
|
+
In the BODY, name the sibling only by that exact title -- a `doc_key` is an internal
|
|
193
|
+
slug, so prose like "see 1-Year Fixed Deposit - faq_5" is meaningless to a reader and
|
|
194
|
+
defers the very substance this document owes them. Keys belong in `references` only.
|
|
195
|
+
- Genre conventions (only the genres THIS cluster emits are listed):
|
|
196
|
+
{% if cluster_kind == 'shared' %}
|
|
197
|
+
policy_procedure: numbered agent steps referencing the exact tool name(s). The
|
|
198
|
+
documented tool is the agent's AUTHORITATIVE mechanism to complete the action
|
|
199
|
+
IN THE CONVERSATION after identity is verified -- the final step is calling the
|
|
200
|
+
tool, NOT redirecting the customer to an external portal, app, branch, website,
|
|
201
|
+
or form. (Use get_accounts to resolve the customer's account_id from a last-4.)
|
|
202
|
+
discoverable_tool_doc: the tool's exact signature, args, and effect. State plainly
|
|
203
|
+
that the agent performs this action by calling the tool directly (never by
|
|
204
|
+
telling the customer to self-serve it elsewhere).
|
|
205
|
+
EVERY argument must be something the agent can actually obtain in the
|
|
206
|
+
conversation: a value the customer states, or one another tool returns. Never
|
|
207
|
+
invent an internal identifier with no source -- no `customer_id` for the person
|
|
208
|
+
the agent is already talking to and has verified, and no `user_id` for a spouse
|
|
209
|
+
or nominee the customer is naming for the first time. Those tools take the
|
|
210
|
+
PERSON'S DETAILS (full name, date of birth, contact) exactly as the customer
|
|
211
|
+
gives them. A signature demanding an id nobody can supply reads authoritative
|
|
212
|
+
and stops the action dead: the agent believes it, asks for the id, the customer
|
|
213
|
+
does not have one, and a completable task fails on a documentation artifact.
|
|
214
|
+
regulatory_note: the applicable rule and the agent's obligation.
|
|
215
|
+
fee_schedule: the INSTITUTION-WIDE charges that are not tied to one product; say
|
|
216
|
+
which apply to every account and which vary by product, without restating any
|
|
217
|
+
product's own numbers.
|
|
218
|
+
faq: 2-4 Q&A on questions that span products (getting started, contacting
|
|
219
|
+
support, escalating). Point to the relevant policy by title.
|
|
220
|
+
{% else %}
|
|
221
|
+
Every genre below is CUSTOMER-facing, so none of them may name an internal tool or
|
|
222
|
+
function (``get_accounts``, ``file_transaction_dispute``, ...). A customer-facing
|
|
223
|
+
document says what the customer can ask for and what they get back; which tool
|
|
224
|
+
serves it is an internal detail, documented separately in the agent-facing
|
|
225
|
+
policy_procedure / discoverable_tool_doc set. Naming one here reads like an
|
|
226
|
+
internal runbook leaked to the public.
|
|
227
|
+
product_sheet: highlights + EVERY applicable fee/rate/limit, each stated with its exact value.
|
|
228
|
+
fee_schedule: list EVERY fee item -> its exact amount (no ranges, no "varies").
|
|
229
|
+
rate_sheet: the rate/yield figures you were given, when each applies, and what
|
|
230
|
+
changes them. Do NOT invent a tier structure: if the product has a single flat
|
|
231
|
+
rate, say plainly that one rate applies to all balances and spend the document on
|
|
232
|
+
when it is credited, what it is quoted against, and what would change it.
|
|
233
|
+
faq: 2-4 Q&A; point to the relevant policy/product by title; quote exact values where relevant.
|
|
234
|
+
how_to_guide: numbered CUSTOMER-facing steps for one task end to end -- what they
|
|
235
|
+
need before starting, each step, and how they know it worked. Write every step
|
|
236
|
+
from the CUSTOMER's side: what they say or provide, and what they get back. A
|
|
237
|
+
step the institution can do for them is phrased as "ask us to ..." / "we will
|
|
238
|
+
..." and completed in the conversation -- do NOT send them to a portal, app,
|
|
239
|
+
branch, website, phone line, or form for it, and do NOT narrate the mechanism
|
|
240
|
+
("the agent then calls X"). A step that is genuinely physical in this market
|
|
241
|
+
(presenting an original document, having collateral valued) may of course be
|
|
242
|
+
described as such.
|
|
243
|
+
Reaching us is NOT a step: the reader is already talking to us. Never open with
|
|
244
|
+
"contact us via phone / secure chat / email" and never list our channels -- step 1
|
|
245
|
+
is the first thing that actually moves the task forward (what they tell us, what
|
|
246
|
+
they hand over, what we confirm back). A contact step costs the document its whole
|
|
247
|
+
first move and makes every guide read from the same template.
|
|
248
|
+
troubleshooting: the symptom as the customer would describe it, the likely causes,
|
|
249
|
+
what to check in what order, the fix, and when to escalate -- with any timeline
|
|
250
|
+
or reference the customer should expect. Written from the CUSTOMER's side: it is
|
|
251
|
+
resolved in the conversation, so "escalate" means what WE do next (raise a case,
|
|
252
|
+
apply a provisional credit, route to a specialist team) and what the customer
|
|
253
|
+
receives, never sending them to a portal, app, branch, website, phone line, or
|
|
254
|
+
form to fix something we can fix, and never narrating the mechanism ("the agent
|
|
255
|
+
then calls X"). A step that is genuinely physical in this market may of course be
|
|
256
|
+
described as such.
|
|
257
|
+
comparison: compare against the named alternative on the few dimensions that
|
|
258
|
+
actually decide it (cost, access, risk, lock-in), with this product's exact
|
|
259
|
+
figures on its side. Only state a figure for the alternative when it is a SIBLING
|
|
260
|
+
product whose values you were given; for an outside offering compare on structure
|
|
261
|
+
and trade-offs rather than inventing its numbers. Then say who each suits. Never
|
|
262
|
+
disparage the alternative; state where it is the better choice.
|
|
263
|
+
eligibility_matrix: conditions -> outcome rows, with exact thresholds/limits.
|
|
264
|
+
terms_conditions: the binding terms in formal register -- obligations on each side,
|
|
265
|
+
what triggers a change, notice periods, and how the agreement ends. Anchor every
|
|
266
|
+
clause in THIS product's actual fees, limits and thresholds rather than generic
|
|
267
|
+
boilerplate: a term the reader cannot tie to a stated figure or a named
|
|
268
|
+
obligation does not belong in the document.
|
|
269
|
+
disclosure: formal regulatory / T&C language; exact figures where cited.
|
|
270
|
+
promo_notice: a time-bound offer with explicit start/end dates + exact rate/amount.
|
|
271
|
+
security_advisory: the specific fraud patterns that target THIS product, what the
|
|
272
|
+
institution will never ask for, and the first action to take when something looks
|
|
273
|
+
wrong; include any reporting deadline that affects liability.
|
|
274
|
+
{% endif %}
|
|
275
|
+
- Do not fabricate tools; only reference tools present in the focus/brief.
|
|
276
|
+
Return the documents in the required structured format.
|
|
277
|
+
"""
|
|
278
|
+
|
|
279
|
+
# Phase 2 QC seed columns: focus_json + the generated `doc_set`.
|
|
280
|
+
DOCSET_QC_PROMPT = """\
|
|
281
|
+
You are auditing a generated internal knowledge-base document set before it is committed.
|
|
282
|
+
Score it against the rubric.
|
|
283
|
+
|
|
284
|
+
Authoritative product values -- the ONLY numbers to check for NumericFaithfulness. Any
|
|
285
|
+
other numbers in the documents (dates, illustrative examples, regulatory citations) are
|
|
286
|
+
EXPECTED and must NOT lower the faithfulness score. If this context lists no product
|
|
287
|
+
values (e.g. an institution-wide shared set), there is nothing to contradict -> score 4.
|
|
288
|
+
Each value carries a `display` form, its notation in the documents' language: a value
|
|
289
|
+
written that way is faithful, while the right digits in another language's notation (a
|
|
290
|
+
decimal point where the language uses a decimal comma) are a notation error.
|
|
291
|
+
{{ focus_json }}
|
|
292
|
+
|
|
293
|
+
Generated document set:
|
|
294
|
+
{{ doc_set }}
|
|
295
|
+
"""
|
|
296
|
+
|
|
297
|
+
# ── asset EVALUATION (DD-judge scorecard over the committed corpus) ──────
|
|
298
|
+
# Seed columns: institution_brief, authoritative_values, regulator_text,
|
|
299
|
+
# document_type, language, title, body.
|
|
300
|
+
EVAL_PROMPT = """\
|
|
301
|
+
You are a senior reviewer auditing ONE document from a fictional financial
|
|
302
|
+
institution's internal knowledge base. Judge its QUALITY against the rubric; be
|
|
303
|
+
strict and specific. The document should read like a real {{ document_type }} for
|
|
304
|
+
this institution.
|
|
305
|
+
|
|
306
|
+
Institution brief (the intended voice / positioning / policy the doc should follow):
|
|
307
|
+
{{ institution_brief }}
|
|
308
|
+
|
|
309
|
+
Authoritative product values the document must not contradict:
|
|
310
|
+
{{ authoritative_values }}
|
|
311
|
+
|
|
312
|
+
Applicable regulator / framework context (the doc must be consistent with this):
|
|
313
|
+
{{ regulator_text }}
|
|
314
|
+
|
|
315
|
+
Document (type: {{ document_type }}; expected language: {{ language }}):
|
|
316
|
+
Title: {{ title }}
|
|
317
|
+
{{ body }}
|
|
318
|
+
"""
|