added code files for orchestration - #1
Open
DiyaVijay wants to merge 3 commits into
Open
Conversation
mehta-vedant
referenced
this pull request
in mehta-vedant/hackerrank-orchestrate-august26
Aug 1, 2026
s3raphsembrace
added a commit
to s3raphsembrace/message-router
that referenced
this pull request
Aug 1, 2026
1. CLIENT. build_model_callable() returns a real RouterClient reading GEMINI_API_KEY from the environment via a dependency-free .env loader. Temperature 0, structured response schema, prompt-hash response cache for byte-identical re-runs. The first attempt failed 89 of 110 rows: on a free-tier key gemini-2.5-flash allows 20 requests PER DAY, and the retry loop burned 3x quota per failure. Daily-quota 429s now fail fast, per-minute ones honour the server's retry delay, and requests are paced. Default model is gemini-3.5-flash-lite, which has its own quota and measured ~10x faster. Result: 110/110 valid on first try, 0 re-asks, 0 fallbacks. 2. BUG interviewstreet#1. Removed "unknown" from LOW_VALUE_TYPES. It was turning the documented "cap at digest" into a force to mute on every fallback row, because the safe default is typed unknown -- which is what muted msg_056. 3. SALIENCE. Fixed the weights rather than the docs. The scale is now symmetric by construction: reported/replied 1.0, muted-after/fast-open 0.9, dismissed/opened 0.65. reaction_time_minutes was carried through the whole pipeline and never used; it now drives the fast-open tier. 4. BASE RATES. The context now states per-user open share, group volume and notification load relative to their norms, so engagement is read against a denominator instead of absolutely. The open share spans 0.17 to 0.91 across users, so "opened 8 of 10" previously meant nothing on its own. 5. (a) Media-only history is scored on its interpretation, and similarity takes max(text-only, text+media) -- comparing text+OCR against a text-only row inflates the union and had silently dropped two sim=1.00 muted duplicates from msg_066's evidence. (b) Evidence F1 always emits a float. (c) Calibration is reported separately for router-decided and guard-overridden rows. 6. README known-limitations: no holdout, 30 in-sample rows, per-type accuracy is noise below ~3 examples, the guard cannot separate msg_056 from msg_040, and what personalization does and does not mean here. 7. validate_submission.py checks the full contract independently and prints the distribution; package.py builds code.zip and verifies .env is absent. Eval with the live router: action 86.7%, type 70.0%, joint 66.7%, ECE 0.081 (router-decided 0.079 at 85.7% accuracy), weighted cost 0.133/row, zero severe errors. Golden set 6/7. Tests: 478 assertions across five suites. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.