{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/r-u-sure-uncertainty-aware-code-suggestions","title":"R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intents","arxiv_id":"2303.00732","date":"2023-03-01","proceeding":null,"authors":["Daniel D. Johnson","Daniel Tarlow","Christian Walder"],"abstract":"Large language models show impressive results at predicting structured text such as code, but also commonly introduce errors and hallucinations in their output. When used to assist software developers, these models may make mistakes that users must go back and fix, or worse, introduce subtle bugs that users may miss entirely. We propose Randomized Utility-driven Synthesis of Uncertain REgions (R-U-SURE), an approach for building uncertainty-aware suggestions based on a decision-theoretic model of goal-conditioned utility, using random samples from a generative model as a proxy for the unobserved possible intents of the end user. Our technique combines minimum-Bayes-risk decoding, dual decomposition, and decision diagrams in order to efficiently produce structured uncertainty summaries, given only sample access to an arbitrary generative model of code and an optional AST parser. We demonstrate R-U-SURE on three developer-assistance tasks, and show that it can be applied different user interaction patterns without retraining the model and leads to more accurate uncertainty estimates than token-probability baselines. We also release our implementation as an open-source library at https://github.com/google-research/r_u_sure.","url_abs":"https://arxiv.org/abs/2303.00732v2","url_pdf":"https://arxiv.org/pdf/2303.00732v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"r-u-sure-uncertainty-aware-code-suggestions","repo_url":"https://github.com/google-research/r_u_sure","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.00732","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.00732"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/google-research/google-research","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/r_u_sure","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":8,"ran":0,"repositories":1},"found_in_text":{"samples":1,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"b2bbe767afa2030f","entry":"as_numba_type","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/numba_helpers/numba_type_util.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/numba_helpers/numba_type_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b2bbe767afa2030f"}},{"code_sha256_prefix":"c2b2144448e43ab0","entry":"compute_reachable_states","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/gated_state_dag.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/gated_state_dag.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c2b2144448e43ab0"}},{"code_sha256_prefix":"5a029ca7ce504e40","entry":"edge_group_boundary_after_assigning","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/packed_dags.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/packed_dags.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5a029ca7ce504e40"}},{"code_sha256_prefix":"dff05e88b03f64f1","entry":"edge_group_boundary_before_assigning","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/packed_dags.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/packed_dags.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dff05e88b03f64f1"}},{"code_sha256_prefix":"abf19ccfddfc70dc","entry":"extract_state_list","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/gated_state_dag.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/gated_state_dag.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"abf19ccfddfc70dc"}},{"code_sha256_prefix":"064ef2bff33372bc","entry":"jitable_enum_hash","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/numba_helpers/register_enum_hash.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/numba_helpers/register_enum_hash.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"064ef2bff33372bc"}},{"code_sha256_prefix":"d39b150b1f6d56ba","entry":"prune_to_reachable","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/gated_state_dag.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/gated_state_dag.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d39b150b1f6d56ba"}},{"code_sha256_prefix":"852f1066dd95bdcf","entry":"replace_model_dense_layers","repo":"google-research/google-research","repo_kind":"found_in_text","path":"adaptive_low_rank/model.py","file_url":"https://github.com/google-research/google-research/blob/HEAD/adaptive_low_rank/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"852f1066dd95bdcf"}},{"code_sha256_prefix":"2e3f0478721ef7a9","entry":"state_tag_start_boundary","repo":"google-research/r_u_sure","repo_kind":"official","path":"r_u_sure/decision_diagrams/packed_dags.py","file_url":"https://github.com/google-research/r_u_sure/blob/HEAD/r_u_sure/decision_diagrams/packed_dags.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2e3f0478721ef7a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}