How to detect changes in Non-disclosure Agreements saved as Word documents?

Rakesh Patel 0 Reputation points
2024-11-21T14:15:07.05+00:00

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

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,786 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,971 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rakesh Patel 0 Reputation points
    2024-11-22T15:28:20.6166667+00:00

    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?

    0 comments No comments

  2. 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.

    1. 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.
    1. 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.
    1. 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.