{"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/pakton-a-multi-agent-framework-for-question","title":"PAKTON: A Multi-Agent Framework for Question Answering in Long Legal Agreements","arxiv_id":"2506.00608","date":"2025-05-31","proceeding":null,"authors":["Petros Raptopoulos","Giorgos Filandrianos","Maria Lymperaiou","Giorgos Stamou"],"abstract":"Contract review is a complex and time-intensive task that typically demands specialized legal expertise, rendering it largely inaccessible to non-experts. Moreover, legal interpretation is rarely straightforward-ambiguity is pervasive, and judgments often hinge on subjective assessments. Compounding these challenges, contracts are usually confidential, restricting their use with proprietary models and necessitating reliance on open-source alternatives. To address these challenges, we introduce PAKTON: a fully open-source, end-to-end, multi-agent framework with plug-and-play capabilities. PAKTON is designed to handle the complexities of contract analysis through collaborative agent workflows and a novel retrieval-augmented generation (RAG) component, enabling automated legal document review that is more accessible, adaptable, and privacy-preserving. Experiments demonstrate that PAKTON outperforms both general-purpose and pretrained models in predictive accuracy, retrieval performance, explainability, completeness, and grounded justifications as evaluated through a human study and validated with automated metrics.","url_abs":"https://arxiv.org/abs/2506.00608v1","url_pdf":"https://arxiv.org/pdf/2506.00608v1.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":"pakton-a-multi-agent-framework-for-question","repo_url":"https://github.com/petrosrapto/pakton","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"privacy-preserving","task_name":"Privacy Preserving"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"rag","task_name":"RAG"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.00608","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.00608"}},"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/petrosrapto/PAKTON","reach":null}],"summary":{"ran":3,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"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":"3d75cc9c7babc7cc","entry":"Document","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3d75cc9c7babc7cc"}},{"code_sha256_prefix":"51da2eff8d79f05c","entry":"RetrievedSnippet","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51da2eff8d79f05c"}},{"code_sha256_prefix":"aaf0ff21e48c89a0","entry":"Snippet","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aaf0ff21e48c89a0"}},{"code_sha256_prefix":"4b527ddc3a989c4f","entry":"find_unique_substring_position","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4b527ddc3a989c4f"}},{"code_sha256_prefix":"5d4b56d232355dc1","entry":"PAKTON","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.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":"5d4b56d232355dc1"}},{"code_sha256_prefix":"f3b1b404d11e87f6","entry":"QueryResponse","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.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":"f3b1b404d11e87f6"}},{"code_sha256_prefix":"4e13dc10c8c35530","entry":"RetrievalMethod","repo":"petrosrapto/PAKTON","repo_kind":"official","path":"Experiments and Evaluation/Quantitative/RAG Performance - LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.py","file_url":"https://github.com/petrosrapto/PAKTON/blob/HEAD/Experiments%20and%20Evaluation/Quantitative/RAG%20Performance%20-%20LegalBenchRAG/legalbenchrag/legalbenchrag/methods/pakton.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":"4e13dc10c8c35530"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}