How do you suggest the comparison takes place? I don;t think its that easy and may require another LLM to work out the changes?
How to detect changes in Non-disclosure Agreements saved as Word documents?
Hi,
my use case is processing changes to NDA documents. Amendments are made by either party and those changes need to be compared against previous similar changes and also a playbook.
How to detect changes in a Word document where the changes are made and annotated?
Once a changed section is detected, the original and the new changed section needs to be submitted to an LLM and it should respond with an acceptable change.
I think this latter stage requires a RAG solution. Are there any preferred models for the legal domain?
Thanks
2 answers
Sort by: Most helpful
-
-
Max Lacy 340 Reputation points
2024-11-22T19:26:05.8+00:00 Building a Searchable NDA Repository with Version Control and Azure Search
You're looking for ways to track changes in your Non-Disclosure Agreements (NDAs) and leverage AI for analysis and comparison with past changes. Here's how you can combine version control, information extraction, and a search system to build a process that allows you to search across all the changes made to your NDA documents over time.
- Version Control:
- Start by utilizing a version control system like the Track Changes or SharePoint versioning. This feature allows you to record every modification, including who made the change and when. You can then systematically review and either accept or reject these modifications. Upon approval start something like a Power Automate Flow or python script to compare the previous version to the latest approved version. Extract any changes and the relevant information you’d be looking to match existing to your existing data set.
- Structuring Data for Search:
- The extracted data needs to be organized in a format optimized for search. If you’re looking to match on Semantic meaning, you’ll want to create numeric representations of the changes using an embedding model.
- Interpret Search Results Using an LLM:
- You can use a System Prompt, original context and change context as the overall context for the Large Language Model. The system prompt would likely be something like, “You’re a research assistant tasked with interpreting changes in a NDA…you’ll be provided with excerpts from the original document, the updated document, a playbook, and similar changes from historic information… the similar changes are based on sematic meaning. Respond with an acceptable change based on the information provided in context.
You'd need to clearly define what an acceptable change is and do some prompt engineering, but this would get you started.