{"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/alfred-a-system-for-prompted-weak-supervision","title":"Alfred: A System for Prompted Weak Supervision","arxiv_id":"2305.18623","date":"2023-05-29","proceeding":null,"authors":["Peilin Yu","Stephen Bach"],"abstract":"Alfred is the first system for programmatic weak supervision (PWS) that creates training data for machine learning by prompting. In contrast to typical PWS systems where weak supervision sources are programs coded by experts, Alfred enables users to encode their subject matter expertise via natural language prompts for language and vision-language models. Alfred provides a simple Python interface for the key steps of this emerging paradigm, with a high-throughput backend for large-scale data labeling. Users can quickly create, evaluate, and refine their prompt-based weak supervision sources; map the results to weak labels; and resolve their disagreements with a label model. Alfred enables a seamless local development experience backed by models served from self-managed computing clusters. It automatically optimizes the execution of prompts with optimized batching mechanisms. We find that this optimization improves query throughput by 2.9x versus a naive approach. We present two example use cases demonstrating Alfred on YouTube comment spam detection and pet breeds classification. Alfred is open source, available at https://github.com/BatsResearch/alfred.","url_abs":"https://arxiv.org/abs/2305.18623v1","url_pdf":"https://arxiv.org/pdf/2305.18623v1.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":"alfred-a-system-for-prompted-weak-supervision","repo_url":"https://github.com/batsresearch/alfred","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"spam-detection","task_name":"Spam detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.18623","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.18623"}},"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/BatsResearch/alfred","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"53e6846d53d94bcc","entry":"CompletionResponse","repo":"BatsResearch/alfred","repo_kind":"official","path":"alfred/voter/voter.py","file_url":"https://github.com/BatsResearch/alfred/blob/HEAD/alfred/voter/voter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"53e6846d53d94bcc"}},{"code_sha256_prefix":"c57455637d4e2061","entry":"RankedResponse","repo":"BatsResearch/alfred","repo_kind":"official","path":"alfred/voter/voter.py","file_url":"https://github.com/BatsResearch/alfred/blob/HEAD/alfred/voter/voter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c57455637d4e2061"}},{"code_sha256_prefix":"2da49728376a56e5","entry":"Response","repo":"BatsResearch/alfred","repo_kind":"official","path":"alfred/voter/voter.py","file_url":"https://github.com/BatsResearch/alfred/blob/HEAD/alfred/voter/voter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2da49728376a56e5"}},{"code_sha256_prefix":"3b756114c4c7ceef","entry":"Voter","repo":"BatsResearch/alfred","repo_kind":"official","path":"alfred/voter/voter.py","file_url":"https://github.com/BatsResearch/alfred/blob/HEAD/alfred/voter/voter.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3b756114c4c7ceef"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}