[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-492906-105":59,"doc-detail-492906-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","a-two-stage-architecture-for-nda-analysis-llm-based-segmentation-and-transformer-based-clause-classification","A Two-Stage Architecture for NDA Analysis - LLM-based Segmentation and Transformer-based Clause Classification","","Business-to-business relationships commonly rely on Non-Disclosure Agreements (NDAs), yet their formats, structures, and writing styles vary widely, making manual review slow and error-prone. The document presents a two-stage automation architecture for NDA segmentation and clause classification. It uses LLaMA-3.1-8B-Instruct to extract clauses and a fine-tuned Legal-Roberta-Large to label them. Results show ROUGE F1 0.95 ± 0.0036 for segmentation and weighted F1 0.85 for classification, supporting feasibility and accuracy.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/a-two-stage-architecture-for-nda-analysis-llm-based-segmentation-and-transformer-based-clause-classification/492906/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/a-two-stage-architecture-for-nda-analysis-llm-based-segmentation-and-transformer-based-clause-classification/492906.png","ImageObject",300,407,{"name":92,"@type":93},"WPS_1790064749","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-06","2026-10-01",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does the proposed architecture address in NDA analysis?","Question",{"text":113,"@type":114},"NDAs vary significantly in format, structure, and writing style, which makes manual segmentation and clause classification slow and prone to errors.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How is the two-stage architecture implemented?",{"text":118,"@type":114},"It first performs NDA segmentation with LLaMA-3.1-8B-Instruct to extract clauses, then classifies those clauses using a fine-tuned Legal-Roberta-Large.",{"name":120,"@type":111,"acceptedAnswer":121},"What performance metrics are reported for segmentation and classification?",{"text":122,"@type":114},"Segmentation achieves ROUGE F1 of 0.95 ± 0.0036, and clause classification reaches a weighted F1 of 0.85.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},492906,1791039933,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":19,"preview_urls":147},3985747859154,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","A Two-Stage Architecture for NDA Analysis: LLM-based Segmentation and Transformer-based Clause Classification  \nAna Begnini1, Matheus Vicente1, Leonardo Souza1  \n1Departamento de Computaa˜o-Instituto de Pesquisas Eldorado Campinas – SP – Brazil  \n{ana.begnini, matheus.rosado, [leonardo.souza](leonardo.souza}@eldorado.org.br)[}](leonardo.souza}@eldorado.org.br)[@eldorado.org.br](leonardo.souza}@eldorado.org.br)  \nAbstract. In business-to-business relations, it is common to establish NonDisclosure Agreements (NDAs). However, these documents exhibit significant variation in format, structure, and writing style, making manual analysis slow and error-prone. We propose an architecture based on LLMs to automate the segmentation and clauses classification within these contracts. We employed two models: LLaMA-3.1-8B-Instruct for NDA segmentation (clause extraction) and a fine-tuned Legal-Roberta-Large for clause classification. In the segmentation task, we achieved a ROUGE F1 of 0.95 ± 0.0036; for classification, we obtained a weighted F1 of 0.85, demonstrating the feasibility and precision of the approach.  \n1. Introduction  \nLarge Language Models (LLMs) are transforming legal workflows through fluent document generation and advanced contextual analysis [Taecharungroj 2023] . In the legal domain, these models are being employed in tasks such as document analysis, legal case information retrieval, and topic modeling. However, the inherent complexity of legal language, marked by domain-specific terms, ambiguity, and variation in structure, continues to pose significant challenges for natural language processing systems [Siino et al. 2025] .  \nOne practical scenario where these challenges are especially evident is the manual review of Non-Disclosure Agreements (NDAs) . Legal teams are often required to analyze NDAs submitted by various external parties, each with different clause 1 structures and writing styles. This lack of standardization complicates the use of rule-based systems, while the increasing volume and urgency of contract reviews raise the risk of human error and overlooked legal inconsistencies.  \nTo address this, we propose a two-stage architecture focused on automating key tasks in NDA analysis, namely NDA segmentation and classification. By combining a prompt-engineered large language model for NDA segmentation with a fine-tuned legal BERT classifier for clause labeling, the system reduces manual workload, ensures consistency in contract validation, and enhances legal reliability. While the current implementation targets segmentation and classification, the architecture is designed to be extensible, allowing future integration of clause correction and revision capabilities to further streamline legal review.  \n1In the legal context, a clause, which may comprise one or more sentences, refers to a declaration of intent that specifies the terms of an agreement, regulating or limiting the conditions established between the parties [Silva 2017] .  \n2. Related Work  \nIn this section, we organize related work according to the structure proposed by [Greco 2023], which divides language model applications in the legal domain into three main categories: Legal Domain Retrieval, Legal Document Review, and Legal Domain Prediction. These categories, in the same order as described, generally represent the execution pipeline of broader applications, particularly those implemented in corporate environments.  \n2.1. Legal Domain Retrieval  \nLegal domain retrieval involves systems that accurately locate legal information based on user queries. This is useful for tasks such as legal research, legal advice, and case preparation [Hambarde and Proen a 2021, Mahari 2021] . Term-based techniques, such as TF-IDF and BM25, are traditionally used, including in competitions such as COLIEE (Competition on Legal Information Extraction and Entailment)[J. Rabelo and Satoh 2021]. However, more recent embedding-based approaches, such as BERT and its variatio","cbCaip9JsExX0ClJ","https://ap.wps.com/l/cbCaip9JsExX0ClJ","pdf",512863,14,"English","# Abstract\n# 1. Introduction\n# 2. Related Work\n## 2.1. Legal Domain Retrieval\n## 2.2. Legal Document Review\n## 2.3. Legal Domain Prediction","[{\"question\":\"What problem does the proposed architecture address in NDA analysis?\",\"answer\":\"NDAs vary significantly in format, structure, and writing style, which makes manual segmentation and clause classification slow and prone to errors.\"},{\"question\":\"How is the two-stage architecture implemented?\",\"answer\":\"It first performs NDA segmentation with LLaMA-3.1-8B-Instruct to extract clauses, then classifies those clauses using a fine-tuned Legal-Roberta-Large.\"},{\"question\":\"What performance metrics are reported for segmentation and classification?\",\"answer\":\"Segmentation achieves ROUGE F1 of 0.95 ± 0.0036, and clause classification reaches a weighted F1 of 0.85.\"}]","A Two-Stage Architecture for NDA Analysis - LLM-based Segmentation and Transformer-based Clause Classification | PDF",1790872175,35,[148,152,156,160],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9171dd5acdec1b3444bfbfd3c5a196c4.webp",983,1389,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f1b54fdd0617c5c5cee56edce40de5e5.webp",982,1388,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/3a5d8ea7d6130b794be71e1dde9bf53d.webp",981,1386,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/180e120b95d185abca56ca87750dd83b.webp",980,1385]