indicorderbench 0.1.0__tar.gz

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.
Files changed (132) hide show
  1. indicorderbench-0.1.0/.gitignore +15 -0
  2. indicorderbench-0.1.0/.python-version +1 -0
  3. indicorderbench-0.1.0/CHANGELOG.md +36 -0
  4. indicorderbench-0.1.0/CONTRIBUTING.md +98 -0
  5. indicorderbench-0.1.0/LICENSE +202 -0
  6. indicorderbench-0.1.0/PKG-INFO +257 -0
  7. indicorderbench-0.1.0/README.md +226 -0
  8. indicorderbench-0.1.0/docs/adapters.md +172 -0
  9. indicorderbench-0.1.0/docs/methodology.md +131 -0
  10. indicorderbench-0.1.0/docs/scenarios.md +137 -0
  11. indicorderbench-0.1.0/examples/http_agent_shim.py +202 -0
  12. indicorderbench-0.1.0/hatch_build.py +26 -0
  13. indicorderbench-0.1.0/packs/starter/REVIEW.md +86 -0
  14. indicorderbench-0.1.0/packs/starter/clips/.gitkeep +0 -0
  15. indicorderbench-0.1.0/packs/starter/menu.yaml +157 -0
  16. indicorderbench-0.1.0/packs/starter/pack.yaml +29 -0
  17. indicorderbench-0.1.0/packs/starter/scenarios/en_cancellation_01.yaml +36 -0
  18. indicorderbench-0.1.0/packs/starter/scenarios/en_cancellation_02.yaml +30 -0
  19. indicorderbench-0.1.0/packs/starter/scenarios/en_cancellation_03.yaml +28 -0
  20. indicorderbench-0.1.0/packs/starter/scenarios/en_cancellation_04.yaml +38 -0
  21. indicorderbench-0.1.0/packs/starter/scenarios/en_correction_01.yaml +24 -0
  22. indicorderbench-0.1.0/packs/starter/scenarios/en_correction_02.yaml +30 -0
  23. indicorderbench-0.1.0/packs/starter/scenarios/en_correction_03.yaml +30 -0
  24. indicorderbench-0.1.0/packs/starter/scenarios/en_correction_04.yaml +31 -0
  25. indicorderbench-0.1.0/packs/starter/scenarios/en_correction_05.yaml +29 -0
  26. indicorderbench-0.1.0/packs/starter/scenarios/en_duplicate_submission_01.yaml +36 -0
  27. indicorderbench-0.1.0/packs/starter/scenarios/en_duplicate_submission_02.yaml +36 -0
  28. indicorderbench-0.1.0/packs/starter/scenarios/en_duplicate_submission_03.yaml +40 -0
  29. indicorderbench-0.1.0/packs/starter/scenarios/en_duplicate_submission_04.yaml +38 -0
  30. indicorderbench-0.1.0/packs/starter/scenarios/en_modifier_01.yaml +28 -0
  31. indicorderbench-0.1.0/packs/starter/scenarios/en_modifier_02.yaml +28 -0
  32. indicorderbench-0.1.0/packs/starter/scenarios/en_modifier_03.yaml +29 -0
  33. indicorderbench-0.1.0/packs/starter/scenarios/en_modifier_04.yaml +31 -0
  34. indicorderbench-0.1.0/packs/starter/scenarios/en_quantity_01.yaml +24 -0
  35. indicorderbench-0.1.0/packs/starter/scenarios/en_quantity_02.yaml +33 -0
  36. indicorderbench-0.1.0/packs/starter/scenarios/en_quantity_03.yaml +34 -0
  37. indicorderbench-0.1.0/packs/starter/scenarios/en_quantity_04.yaml +35 -0
  38. indicorderbench-0.1.0/packs/starter/scenarios/hien_cancellation_01.yaml +36 -0
  39. indicorderbench-0.1.0/packs/starter/scenarios/hien_cancellation_02.yaml +30 -0
  40. indicorderbench-0.1.0/packs/starter/scenarios/hien_cancellation_03.yaml +28 -0
  41. indicorderbench-0.1.0/packs/starter/scenarios/hien_cancellation_04.yaml +38 -0
  42. indicorderbench-0.1.0/packs/starter/scenarios/hien_correction_01.yaml +24 -0
  43. indicorderbench-0.1.0/packs/starter/scenarios/hien_correction_02.yaml +30 -0
  44. indicorderbench-0.1.0/packs/starter/scenarios/hien_correction_03.yaml +30 -0
  45. indicorderbench-0.1.0/packs/starter/scenarios/hien_correction_04.yaml +31 -0
  46. indicorderbench-0.1.0/packs/starter/scenarios/hien_correction_05.yaml +29 -0
  47. indicorderbench-0.1.0/packs/starter/scenarios/hien_duplicate_submission_01.yaml +36 -0
  48. indicorderbench-0.1.0/packs/starter/scenarios/hien_duplicate_submission_02.yaml +36 -0
  49. indicorderbench-0.1.0/packs/starter/scenarios/hien_duplicate_submission_03.yaml +40 -0
  50. indicorderbench-0.1.0/packs/starter/scenarios/hien_duplicate_submission_04.yaml +38 -0
  51. indicorderbench-0.1.0/packs/starter/scenarios/hien_modifier_01.yaml +28 -0
  52. indicorderbench-0.1.0/packs/starter/scenarios/hien_modifier_02.yaml +28 -0
  53. indicorderbench-0.1.0/packs/starter/scenarios/hien_modifier_03.yaml +29 -0
  54. indicorderbench-0.1.0/packs/starter/scenarios/hien_modifier_04.yaml +31 -0
  55. indicorderbench-0.1.0/packs/starter/scenarios/hien_quantity_01.yaml +24 -0
  56. indicorderbench-0.1.0/packs/starter/scenarios/hien_quantity_02.yaml +33 -0
  57. indicorderbench-0.1.0/packs/starter/scenarios/hien_quantity_03.yaml +34 -0
  58. indicorderbench-0.1.0/packs/starter/scenarios/hien_quantity_04.yaml +35 -0
  59. indicorderbench-0.1.0/pyproject.toml +87 -0
  60. indicorderbench-0.1.0/src/indicorderbench/__init__.py +3 -0
  61. indicorderbench-0.1.0/src/indicorderbench/adapters/__init__.py +1 -0
  62. indicorderbench-0.1.0/src/indicorderbench/adapters/http.py +107 -0
  63. indicorderbench-0.1.0/src/indicorderbench/adapters/inprocess.py +55 -0
  64. indicorderbench-0.1.0/src/indicorderbench/adapters/protocol.py +64 -0
  65. indicorderbench-0.1.0/src/indicorderbench/agent_specs.py +109 -0
  66. indicorderbench-0.1.0/src/indicorderbench/agents/__init__.py +1 -0
  67. indicorderbench-0.1.0/src/indicorderbench/agents/lexicon.py +407 -0
  68. indicorderbench-0.1.0/src/indicorderbench/agents/parsing.py +355 -0
  69. indicorderbench-0.1.0/src/indicorderbench/agents/rule_based.py +428 -0
  70. indicorderbench-0.1.0/src/indicorderbench/audio/__init__.py +1 -0
  71. indicorderbench-0.1.0/src/indicorderbench/audio/manifest.py +54 -0
  72. indicorderbench-0.1.0/src/indicorderbench/audio/perturb.py +168 -0
  73. indicorderbench-0.1.0/src/indicorderbench/audio/provider.py +30 -0
  74. indicorderbench-0.1.0/src/indicorderbench/audio/transcribe.py +77 -0
  75. indicorderbench-0.1.0/src/indicorderbench/audio/tts.py +233 -0
  76. indicorderbench-0.1.0/src/indicorderbench/audio/wav.py +40 -0
  77. indicorderbench-0.1.0/src/indicorderbench/backend/__init__.py +1 -0
  78. indicorderbench-0.1.0/src/indicorderbench/backend/http.py +112 -0
  79. indicorderbench-0.1.0/src/indicorderbench/backend/state.py +324 -0
  80. indicorderbench-0.1.0/src/indicorderbench/caller/__init__.py +1 -0
  81. indicorderbench-0.1.0/src/indicorderbench/caller/scripted.py +93 -0
  82. indicorderbench-0.1.0/src/indicorderbench/checker/__init__.py +1 -0
  83. indicorderbench-0.1.0/src/indicorderbench/checker/canonical.py +110 -0
  84. indicorderbench-0.1.0/src/indicorderbench/checker/checker.py +137 -0
  85. indicorderbench-0.1.0/src/indicorderbench/cli.py +551 -0
  86. indicorderbench-0.1.0/src/indicorderbench/packs.py +241 -0
  87. indicorderbench-0.1.0/src/indicorderbench/py.typed +0 -0
  88. indicorderbench-0.1.0/src/indicorderbench/report/__init__.py +1 -0
  89. indicorderbench-0.1.0/src/indicorderbench/report/compare.py +174 -0
  90. indicorderbench-0.1.0/src/indicorderbench/report/formatting.py +23 -0
  91. indicorderbench-0.1.0/src/indicorderbench/report/html.py +351 -0
  92. indicorderbench-0.1.0/src/indicorderbench/report/html_views.py +123 -0
  93. indicorderbench-0.1.0/src/indicorderbench/report/json_report.py +48 -0
  94. indicorderbench-0.1.0/src/indicorderbench/report/junit.py +170 -0
  95. indicorderbench-0.1.0/src/indicorderbench/report/templates/report.html.j2 +288 -0
  96. indicorderbench-0.1.0/src/indicorderbench/runner/__init__.py +1 -0
  97. indicorderbench-0.1.0/src/indicorderbench/runner/runner.py +302 -0
  98. indicorderbench-0.1.0/src/indicorderbench/runner/stats.py +94 -0
  99. indicorderbench-0.1.0/src/indicorderbench/schemas/__init__.py +1 -0
  100. indicorderbench-0.1.0/src/indicorderbench/schemas/menu.py +161 -0
  101. indicorderbench-0.1.0/src/indicorderbench/schemas/results.py +201 -0
  102. indicorderbench-0.1.0/src/indicorderbench/schemas/scenario.py +230 -0
  103. indicorderbench-0.1.0/tests/__init__.py +0 -0
  104. indicorderbench-0.1.0/tests/conftest.py +15 -0
  105. indicorderbench-0.1.0/tests/fixtures/minipack/menu.yaml +13 -0
  106. indicorderbench-0.1.0/tests/fixtures/minipack/pack.yaml +24 -0
  107. indicorderbench-0.1.0/tests/fixtures/minipack/scenarios/en_cancellation_01.yaml +13 -0
  108. indicorderbench-0.1.0/tests/fixtures/minipack/scenarios/en_quantity_01.yaml +14 -0
  109. indicorderbench-0.1.0/tests/helpers.py +276 -0
  110. indicorderbench-0.1.0/tests/test_adapters_inprocess.py +113 -0
  111. indicorderbench-0.1.0/tests/test_audio_perturb.py +209 -0
  112. indicorderbench-0.1.0/tests/test_audio_transcribe.py +105 -0
  113. indicorderbench-0.1.0/tests/test_audio_tts.py +235 -0
  114. indicorderbench-0.1.0/tests/test_backend.py +142 -0
  115. indicorderbench-0.1.0/tests/test_caller.py +156 -0
  116. indicorderbench-0.1.0/tests/test_checker.py +238 -0
  117. indicorderbench-0.1.0/tests/test_cli.py +326 -0
  118. indicorderbench-0.1.0/tests/test_compare.py +134 -0
  119. indicorderbench-0.1.0/tests/test_docs.py +49 -0
  120. indicorderbench-0.1.0/tests/test_example_shim.py +197 -0
  121. indicorderbench-0.1.0/tests/test_http.py +402 -0
  122. indicorderbench-0.1.0/tests/test_packaging.py +45 -0
  123. indicorderbench-0.1.0/tests/test_packs.py +196 -0
  124. indicorderbench-0.1.0/tests/test_parsing.py +603 -0
  125. indicorderbench-0.1.0/tests/test_report_html.py +194 -0
  126. indicorderbench-0.1.0/tests/test_report_json_junit.py +149 -0
  127. indicorderbench-0.1.0/tests/test_rule_based_agent.py +537 -0
  128. indicorderbench-0.1.0/tests/test_runner.py +310 -0
  129. indicorderbench-0.1.0/tests/test_schemas.py +257 -0
  130. indicorderbench-0.1.0/tests/test_starter_pack.py +156 -0
  131. indicorderbench-0.1.0/tests/test_stats.py +92 -0
  132. indicorderbench-0.1.0/uv.lock +1139 -0
@@ -0,0 +1,15 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .pytest_cache/
8
+ .mypy_cache/
9
+ .ruff_cache/
10
+ results/
11
+ demo-out/
12
+ packs/*/clips/**/*.wav
13
+ !packs/*/clips/manifest.json
14
+ .superpowers/
15
+ .DS_Store
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ### Changed
9
+ - README rewritten for the public repository: comparison table, report screenshot,
10
+ install from git until the PyPI release.
11
+
12
+ ## [0.1.0] - 2026-10-01
13
+
14
+ First release.
15
+
16
+ ### Added
17
+ - Pydantic schemas for menus, scenarios with acceptable end states, and results.
18
+ - Sandbox order backend with a timestamped tool-call trace and JSON-schema tool definitions.
19
+ - Deterministic checker producing field-level expected/actual rows.
20
+ - Scripted caller with clarification rules, confirm/closing/fallback/nudge behaviour and
21
+ simulator-validity tracking.
22
+ - Runner with per-turn and per-trial timeouts, outcome classification
23
+ (pass / fail / simulator_invalid / infra_error), pass^k, Wilson intervals and latency
24
+ percentiles.
25
+ - In-process and HTTP turn adapters; HTTP sandbox backend server.
26
+ - Rule-based reference agent with switchable bugs (`ignore_corrections`, `drop_modifiers`,
27
+ `double_submit`, `ignore_cancellation`, `quantity_default_one`).
28
+ - Starter pack: 42 scenarios (21 English, 21 Hinglish) across five failure categories,
29
+ including two `demo`-tagged correction scenarios; bundled in the wheel.
30
+ - JSON, JUnit and single-file HTML reports; baseline comparison with regression exit code.
31
+ - Audio: WAV helpers, noise/gain/telephone perturbations, Sarvam bulbul TTS synthesis,
32
+ Sarvam saaras STT, oracle transcriber, clip manifest, and an offline placeholder TTS
33
+ (`--provider silence`) so audio-modality runs work without API keys.
34
+ - `examples/http_agent_shim.py`: the reference agent behind the HTTP turn protocol.
35
+ - `iob` CLI: validate, ls, run, report, compare, demo, synth, perturb, serve-backend;
36
+ `iob run` takes `--allow-infra`, `--backend-host`, `--backend-port` and `--backend-url`.
@@ -0,0 +1,98 @@
1
+ # Contributing
2
+
3
+ Thanks for helping make voice ordering agents measurably better. Small contributions are
4
+ the most useful ones right now.
5
+
6
+ ## Good first contributions
7
+
8
+ | Area | What helps | Where |
9
+ |---|---|---|
10
+ | Language review | A native Hindi/Hinglish speaker reviewing the 21 Hinglish scenarios for naturalness and regional phrasing | `packs/starter/REVIEW.md`, set `review_status: reviewed` |
11
+ | New scenarios | Real failures you have seen an agent make, as a scenario with acceptable end states | `docs/scenarios.md` |
12
+ | New language packs | Telugu and Tamil are next; copy `packs/starter`, translate, add aliases, get a native review | `packs/<lang>/` |
13
+ | Adapters | LiveKit, Pipecat, Vapi, Retell: a turn endpoint or a native adapter | `docs/adapters.md`, `src/indicorderbench/adapters/` |
14
+ | Reports | Better HTML, a Markdown summary for PR comments, a JSON schema file | `src/indicorderbench/report/` |
15
+ | Reference agents | An LLM-backed reference agent using `OrderBackend.tool_specs()` | `src/indicorderbench/agents/` |
16
+
17
+ ## Development setup
18
+
19
+ ```bash
20
+ git clone https://github.com/Lingikaushikreddy/indicorderbench.git indicorderbench
21
+ cd indicorderbench
22
+ uv sync --all-extras --dev
23
+ uv run pytest -q
24
+ uv run iob demo --out demo-out
25
+ ```
26
+
27
+ Before opening a pull request:
28
+
29
+ ```bash
30
+ uv run ruff format src tests
31
+ uv run ruff check src tests
32
+ uv run mypy
33
+ uv run pytest -q
34
+ uv run iob validate packs/starter
35
+ ```
36
+
37
+ CI runs the same commands on Python 3.11, 3.12 and 3.13.
38
+
39
+ ## Pull request checklist
40
+
41
+ - One change per PR, with a test that failed before the change.
42
+ - Scenario changes keep `tests/test_starter_pack.py` green (the bug-isolation contract).
43
+ - No new core dependencies. Audio-only dependencies go under the `audio` extra.
44
+ - Public functions have type hints; `mypy --strict` passes.
45
+ - `CHANGELOG.md` gets a line under "Unreleased".
46
+
47
+ ## Release checklist
48
+
49
+ Releases are published by `.github/workflows/release.yml` through PyPI Trusted Publishing
50
+ when a `v*` tag is pushed; the tag must equal the version in `pyproject.toml` and
51
+ `src/indicorderbench/__init__.py`, and `CHANGELOG.md` must have a dated section for it.
52
+ Before tagging, run these from a clean checkout of the release commit.
53
+
54
+ 1. Validate the bundled pack and run the checks above:
55
+
56
+ ```bash
57
+ uv run iob validate packs/starter
58
+ ```
59
+
60
+ 2. Build the sdist and the wheel:
61
+
62
+ ```bash
63
+ rm -rf dist && uv build
64
+ ```
65
+
66
+ 3. Confirm the wheel carries no audio. `hatch_build.py` bundles `packs/starter` without
67
+ `*.wav`, so clips from a local `iob synth` must never appear. This prints nothing:
68
+
69
+ ```bash
70
+ python -m zipfile -l dist/indicorderbench-*.whl | grep -i '\.wav'
71
+ ```
72
+
73
+ 4. Install the wheel into a fresh environment and run the installed CLI in an empty
74
+ directory, so it uses the bundled pack rather than the repository's:
75
+
76
+ ```bash
77
+ wheel="$(pwd)/$(ls dist/*.whl)"
78
+ cd "$(mktemp -d)"
79
+ uv venv && uv pip install "$wheel"
80
+ .venv/bin/iob validate starter
81
+ .venv/bin/iob demo --out demo-out
82
+ ```
83
+
84
+ ## Recordings and consent
85
+
86
+ If you contribute human recordings, include written consent from each speaker for
87
+ publication under this repository's license. Removing a name from a file does not grant
88
+ permission to publish it. Synthesised clips must name the provider, voice and model in the
89
+ manifest.
90
+
91
+ ## Reporting results
92
+
93
+ If you publish numbers produced with this benchmark, follow `docs/methodology.md` section 9:
94
+ always include trial counts, invalid and infra counts, pack hash and agent configuration.
95
+
96
+ ## License
97
+
98
+ By contributing you agree that your contributions are licensed under the Apache License 2.0.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,257 @@
1
+ Metadata-Version: 2.5
2
+ Name: indicorderbench
3
+ Version: 0.1.0
4
+ Summary: Catches multilingual voice agents placing the wrong order. A τ-bench style benchmark for voice ordering in Indian languages.
5
+ Project-URL: Homepage, https://github.com/Lingikaushikreddy/indicorderbench
6
+ Project-URL: Repository, https://github.com/Lingikaushikreddy/indicorderbench
7
+ Project-URL: Issues, https://github.com/Lingikaushikreddy/indicorderbench/issues
8
+ Project-URL: Changelog, https://github.com/Lingikaushikreddy/indicorderbench/blob/main/CHANGELOG.md
9
+ Author: Kaushik Reddy Lingireddy
10
+ License: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: benchmark,evaluation,hinglish,indic,livekit,tool-calling,voice-agents
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: httpx>=0.27
23
+ Requires-Dist: jinja2>=3.1
24
+ Requires-Dist: pydantic>=2.7
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: typer>=0.12
27
+ Provides-Extra: audio
28
+ Requires-Dist: numpy>=1.26; extra == 'audio'
29
+ Requires-Dist: soundfile>=0.12; extra == 'audio'
30
+ Description-Content-Type: text/markdown
31
+
32
+ <h1 align="center">IndicOrderBench</h1>
33
+
34
+ <p align="center">
35
+ <strong>Your voice agent sounds convincing. Did it actually place the correct order?</strong><br/>
36
+ An open-source benchmark and CI gate that catches voice ordering agents committing the wrong order,<br/>
37
+ in English and Hinglish, by checking the order they <em>submitted</em>, not the words they said.
38
+ </p>
39
+
40
+ <p align="center">
41
+ <a href="https://github.com/Lingikaushikreddy/indicorderbench/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Lingikaushikreddy/indicorderbench/actions/workflows/ci.yml/badge.svg"></a>
42
+ <a href="LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
43
+ <img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-3776AB.svg">
44
+ <img alt="No API keys needed for the demo" src="https://img.shields.io/badge/demo-no%20API%20keys-success.svg">
45
+ <img alt="Languages: English, Hinglish" src="https://img.shields.io/badge/languages-English%20%7C%20Hinglish-orange.svg">
46
+ </p>
47
+
48
+ <p align="center">
49
+ <a href="#quick-start">Quick start</a> ·
50
+ <a href="#connect-your-agent">Connect your agent</a> ·
51
+ <a href="#what-it-measures">What it measures</a> ·
52
+ <a href="#how-it-compares">How it compares</a> ·
53
+ <a href="docs/methodology.md">Methodology</a> ·
54
+ <a href="docs/adapters.md">Adapters</a> ·
55
+ <a href="docs/scenarios.md">Write scenarios</a>
56
+ </p>
57
+
58
+ ---
59
+
60
+ ## The problem in one call
61
+
62
+ ```
63
+ caller: Do paneer wrap... actually ek hi karo. Bina pyaaz. Aur ek mango lassi.
64
+ agent: 2 Paneer Wrap add kar diya. Paneer Wrap 1 kar diya. Paneer Wrap No onion kar diya.
65
+ 1 Mango Lassi add kar diya. Aur kuch?
66
+ caller: Bas itna hi, thanks.
67
+ agent: Aapka order: 1 Paneer Wrap, No onion; 1 Mango Lassi. Order place ho gaya, shukriya!
68
+ ```
69
+
70
+ The agent *read back* one wrap without onion. Here is what it *committed* to the order system:
71
+
72
+ | Field | Expected | Actual | Result |
73
+ |----------------------|----------|------------|--------|
74
+ | Submitted orders | 1 | 1 | Pass |
75
+ | Paneer Wrap quantity | 1 | 2 | Fail |
76
+ | Paneer Wrap · Onion | No onion | With onion | Fail |
77
+ | Mango Lassi quantity | 1 | 1 | Pass |
78
+
79
+ Transcript-based testing and LLM judges would have passed this call. IndicOrderBench fails it,
80
+ because it compares the **committed backend state** against the scenario's acceptable end states.
81
+ The table is real output from `iob demo`.
82
+
83
+ <p align="center">
84
+ <img src="docs/images/report-demo-scenario.png" alt="IndicOrderBench HTML report: order check table, conversation and tool-call trace for a failed Hinglish correction scenario" width="900">
85
+ </p>
86
+
87
+ ## Why this exists
88
+
89
+ Voice ordering agents for restaurants, quick commerce and pharmacies are shipping on
90
+ LiveKit, Pipecat, Vapi, Retell and custom stacks. Their hardest failures are not accent or
91
+ latency. They are **mid-sentence corrections** ("two... actually one"), **modifiers**
92
+ ("no onion"), **cancellations**, and **duplicate submissions**, especially in code-mixed
93
+ speech like Hinglish, where the number words and the negations do not look like English.
94
+
95
+ Existing tools judge the conversation. Nobody was checking the cart. IndicOrderBench is a
96
+ small, deterministic, reproducible benchmark for exactly that question, with a CI exit code
97
+ so an agent change that starts placing wrong orders fails the build before it reaches a customer.
98
+
99
+ ## Quick start
100
+
101
+ ```bash
102
+ pip install indicorderbench # PyPI release coming; until then install from git:
103
+ pip install "git+https://github.com/Lingikaushikreddy/indicorderbench.git"
104
+
105
+ iob demo --out demo-out # buggy vs fixed reference agent, no network, no keys
106
+ iob run starter --agent builtin:correct --tag smoke --trials 3
107
+ ```
108
+
109
+ `iob run` writes `results.json` (every transcript, tool call and backend snapshot),
110
+ `junit.xml` (for any CI system) and a single-file `report.html` that works from `file://`.
111
+ Open [docs/demo/fixed/report.html](docs/demo/fixed/report.html) and
112
+ [docs/demo/buggy/report.html](docs/demo/buggy/report.html) to see both sides of the demo.
113
+
114
+ ## Connect your agent
115
+
116
+ Three ways. Payloads, timeouts and the sandbox backend API are in [docs/adapters.md](docs/adapters.md).
117
+
118
+ **In-process Python.** Any agent whose logic you can import. The sandbox backend gives you
119
+ JSON-schema tool definitions to hand to your LLM:
120
+
121
+ ```python
122
+ # my_agent.py
123
+ from indicorderbench.adapters.protocol import AgentReply, CallerUtterance, SessionInfo
124
+ from indicorderbench.backend.state import OrderBackend
125
+
126
+ class MyAgent:
127
+ def __init__(self, backend: OrderBackend, session: SessionInfo) -> None:
128
+ self.backend = backend # add_item, update_line, submit_order, ...
129
+ self.tools = OrderBackend.tool_specs() # function-calling schemas for your LLM
130
+
131
+ async def handle(self, u: CallerUtterance) -> AgentReply:
132
+ text = u.text or transcribe(u.audio_bytes)
133
+ ... # your LLM loop; run tool calls with self.backend.call(name, args)
134
+ return AgentReply(text="Added two paneer wraps. Anything else?")
135
+
136
+ def make_agent(backend, session):
137
+ return MyAgent(backend, session)
138
+ ```
139
+
140
+ ```bash
141
+ iob run starter --agent python:my_agent:make_agent --trials 3
142
+ ```
143
+
144
+ **HTTP.** Your agent runs anywhere it can reach the sandbox backend: it receives each caller
145
+ turn by HTTP and calls the backend's tools by HTTP. `examples/http_agent_shim.py` is a complete,
146
+ tested example:
147
+
148
+ ```bash
149
+ python examples/http_agent_shim.py --port 8900
150
+ iob run starter --agent http:http://127.0.0.1:8900/iob --tag smoke
151
+ # remote agent: iob run ... --backend-host 0.0.0.0 --backend-port 8765 --backend-url http://<your host>:8765
152
+ ```
153
+
154
+ **CI gate.** Fail the build when ordering accuracy drops below a threshold or regresses
155
+ against the baseline you committed from the last good run:
156
+
157
+ ```bash
158
+ iob run starter --agent http:http://127.0.0.1:8900/iob --tag smoke \
159
+ --baseline baselines/smoke.json --fail-under 0.9 --max-regression 0.0 --allow-infra 0
160
+ ```
161
+
162
+ Exit codes: `0` ok, `1` infra or usage error, `2` accuracy below threshold or regression.
163
+ A ready-made GitHub Actions workflow is in [examples/ci/github-actions.yml](examples/ci/github-actions.yml).
164
+
165
+ ## What it measures
166
+
167
+ | Outcome | Meaning | In the pass rate? |
168
+ |---|---|---|
169
+ | `pass` | committed state matches an acceptable end state | yes |
170
+ | `fail` | caller was valid, infrastructure worked, order is wrong or never placed | yes |
171
+ | `simulator_invalid` | the agent asked something the script could not answer; the agent is not blamed | no, reported separately |
172
+ | `infra_error` | adapter raised, timed out, or a clip was missing | no, reported separately |
173
+
174
+ - **Pass rate and pass^k** (τ-bench's repeated-run metric) by language and by failure
175
+ category, with Wilson 95% intervals. `--trials 3` tells you whether the agent is right
176
+ three times in a row, not just once.
177
+ - **Five failure categories:** quantity, modifier, mid-order correction, cancellation,
178
+ duplicate submission.
179
+ - **Per-turn latency** (p50 / p95) and a timestamped **tool-call trace**, including refused calls.
180
+ - **Reproducibility fields** in every `results.json`: benchmark version, pack content hash,
181
+ agent spec, trials, modality, timeouts, host and Python version. `iob compare` refuses to
182
+ compare runs from different packs.
183
+
184
+ Validity rules, metric definitions and how to publish numbers responsibly:
185
+ [docs/methodology.md](docs/methodology.md).
186
+
187
+ ## How it compares
188
+
189
+ | | IndicOrderBench | VoiceTest | EVA-Bench | VoiceAgentBench | τ-bench |
190
+ |---|---|---|---|---|---|
191
+ | Scores the committed order state | **yes** | no (LLM judge on transcript) | partly (composite metrics) | no (tool-call correctness on static queries) | yes (text only) |
192
+ | Live, multi-turn agent under test | yes | yes | yes | no | yes |
193
+ | Indian languages | **English + Hinglish, more planned** | no | no | 7 Indic languages | no |
194
+ | Simulator-invalid as a separate outcome | yes | no | yes | n/a | no |
195
+ | Deterministic pass/fail, no judge model | **yes** | no | no | yes | yes |
196
+ | Runs offline with no API keys | **yes** | no | no | no | no |
197
+ | CI exit code and baseline regression gate | **yes** | partly | no | no | no |
198
+
199
+ Links: [VoiceTest](https://github.com/voicetestdev/voicetest) ·
200
+ [EVA-Bench](https://huggingface.co/blog/ServiceNow-AI/eva) ·
201
+ [VoiceAgentBench](https://arxiv.org/abs/2510.07978) ·
202
+ [τ-bench](https://arxiv.org/abs/2406.12045). IndicOrderBench borrows the end-state
203
+ comparison and pass^k from τ-bench and the simulator-validation idea from EVA-Bench, and
204
+ narrows the task to ordering so the verdict can be deterministic.
205
+
206
+ ## The starter pack
207
+
208
+ 42 scenarios: 21 English (en-IN) and 21 romanised Hinglish (hi-en), four per failure category
209
+ per language plus two `demo`-tagged correction scenarios. Ten are tagged `smoke` for a
210
+ 30-second gate. Every scenario lists its acceptable end states and carries clarification rules,
211
+ so an agent that asks "how many?" before acting gets a fair run. A rule-based reference agent
212
+ with five switchable bugs validates the pack: the correct agent passes 42/42, and each bug
213
+ fails exactly its own category.
214
+
215
+ Audio: `iob synth starter --provider sarvam` generates caller clips with Sarvam bulbul
216
+ (set `SARVAM_API_KEY`); `iob perturb` derives noisy, quiet or telephone-band variants;
217
+ `iob run --modality audio` sends only audio. `--provider silence` makes placeholder clips so
218
+ the whole audio pipeline runs offline (pipeline tests, not evaluations).
219
+
220
+ Write your own scenarios or a new language pack: [docs/scenarios.md](docs/scenarios.md).
221
+
222
+ ## Honest limits
223
+
224
+ - The runner is **turn-based**: no barge-in or overlapping speech is measured.
225
+ - The Hinglish scenarios are marked **unreviewed** until native speakers review them
226
+ (see `packs/starter/REVIEW.md`). Treat Hinglish numbers as provisional until then.
227
+ - No LLM-based reference agent, generative caller or failure explanations in v0.1. The
228
+ interfaces exist: `OrderBackend.tool_specs()`, `AgentAdapter`, `Transcriber`.
229
+ - No LiveKit or Pipecat native adapter yet; the HTTP turn protocol is the integration point.
230
+
231
+ ## Roadmap
232
+
233
+ - Native-speaker review of the Hinglish pack, then Telugu and Tamil packs.
234
+ - A LiveKit Agents adapter and a Pipecat adapter.
235
+ - A generative caller for unscripted clarifications.
236
+ - An LLM reference agent, to publish measured ordering accuracy for real STT + LLM + TTS stacks.
237
+ - PyPI release.
238
+
239
+ If you build or run voice ordering agents and want a category or a language covered, open an
240
+ issue with a real failure you have seen. That is the most useful contribution right now.
241
+
242
+ ## Contributing and development
243
+
244
+ Language review, scenarios, adapters and report improvements are all welcome and small.
245
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
246
+
247
+ ```bash
248
+ uv sync --all-extras --dev
249
+ uv run pytest -q # ~300 tests, no network
250
+ uv run iob validate starter
251
+ ```
252
+
253
+ ## License
254
+
255
+ Apache-2.0. See [LICENSE](LICENSE).
256
+
257
+ <sub>Keywords: voice agent testing, voice AI evaluation, conversational AI QA, speech agent benchmark, LLM agent benchmark, tool calling evaluation, function calling accuracy, order accuracy, Hinglish, Hindi, Indian languages, Indic NLP, LiveKit agents, Pipecat, Vapi, Retell, Sarvam, τ-bench, pass^k, regression testing for voice agents, CI for AI agents.</sub>