{"id":15933504,"url":"https://github.com/hunkim/solar-as-judge","last_synced_at":"2025-09-06T02:45:19.041Z","repository":{"id":244544764,"uuid":"815561209","full_name":"hunkim/solar-as-judge","owner":"hunkim","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-20T04:50:54.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T22:10:25.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hunkim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-15T13:25:19.000Z","updated_at":"2024-06-20T04:50:57.000Z","dependencies_parsed_at":"2024-06-15T14:39:42.657Z","dependency_job_id":"84e32e6b-e58c-4225-a75f-192c804fe648","html_url":"https://github.com/hunkim/solar-as-judge","commit_stats":null,"previous_names":["hunkim/solar-as-judge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hunkim/solar-as-judge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-as-judge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-as-judge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-as-judge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-as-judge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunkim","download_url":"https://codeload.github.com/hunkim/solar-as-judge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-as-judge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273850697,"owners_count":25179357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T02:40:32.098Z","updated_at":"2025-09-06T02:45:19.017Z","avatar_url":"https://github.com/hunkim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solar-as-judge\n\u003cimg width=\"1422\" alt=\"image\" src=\"https://github.com/hunkim/solar-as-judge/assets/901975/738be829-1d20-4b9a-baad-e3f2c8d066c5\"\u003e\n\n\n## How to use\nSet the UPSTAGE_API_KEY environment variable. Obtain your key from the Upstage console at \u003chttps://console.upstage.ai\u003e.\n\n```bash\npip install solar-as-judge\n```\n\n```python\nimport solar_as_judge as saj\n\n# test prompt with an optional ground truth.\nprompt = \"Please extract one keyword from this text: I love you so much\"\nground_truth = \"love\"\n\n# The outcome of the A and B language models (AB testing).\nA_answer = \"love\"\nB_answer = \"so much\"\n\n# Check the scores and the winner. \n# If they are consistent, then determine the final score.\na_score, b_score = saj.judge(prompt, A_answer, B_answer, ground_truth)\nprint(a_score, b_score)\n\n```\n\n## Get detailed scores\n\n```python\nimport solar_as_judge as saj\n\n# test prompt with an optional ground truth.\nprompt = \"Please extract one keyword from this text: I love you so much\"\nground_truth = \"love\"\n\n# The outcome of the A and B language models (AB testing).\nA_answer = \"love\"\nB_answer = \"so much\"\n\n\n# Get scores separately.\nA_score = saj.get_judge_score(prompt, A_answer, ground_truth)\nB_score = saj.get_judge_score(prompt, B_answer, ground_truth)\n\n# Determine the winner.\nwinner = saj.get_winner(prompt, A_answer, B_answer, ground_truth)\nprint(A_score, B_score, winner)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-as-judge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunkim%2Fsolar-as-judge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-as-judge/lists"}