aws AWS Big Data Blog ·

AWS Blog Demonstrates Contract Compliance Search with Amazon OpenSearch

blogdataaiawsengineer
announcement

This AWS Big Data Blog post showcases how to build a contract compliance search system using Amazon OpenSearch Service. The system addresses challenges in legal and compliance auditing by employing AI-powered semantic search and semantic highlighting. It retrieves contracts based on meaning, not just keywords, and pinpoints specific relevant clauses, significantly reducing review time. The solution is deployed using AWS CloudFormation stacks and leverages Amazon Bedrock for embeddings and Amazon SageMaker for semantic highlighting.

  • Semantic Search and Highlighting in Amazon OpenSearch
  • Solution Architecture for Contract Compliance Search
  • Semantic Highlighting Model Deployment
  • Problems with Traditional Keyword Search in Contract Auditing
  • Implementation and Prerequisites
Features (3)
  • Semantic Search and Highlighting in Amazon OpenSearch

    Amazon OpenSearch Service offers semantic search to retrieve contracts based on meaning and semantic highlighting to pinpoint exact relevant clauses, addressing both discovery gaps and review latency.

  • Solution Architecture for Contract Compliance Search

    The solution uses a two-stage pipeline: contracts are uploaded to Amazon S3, processed by Amazon OpenSearch Ingestion (OSI) to generate embeddings via Amazon Bedrock's Titan Text Embeddings V2, and then queried through OpenSearch for semantic search. Semantic highlighting is performed by a model hosted on Amazon SageMaker.

  • Semantic Highlighting Model Deployment

    A dedicated model, opensearch-semantic-highlighter-v1, is deployed to an Amazon SageMaker AI GPU endpoint and registered with OpenSearch's ML Commons plugin. This enables the system to score sentence relevance using cross-encoder inference.

Notes (2)
  • Problems with Traditional Keyword Search in Contract Auditing

    Traditional keyword search in contract repositories for compliance obligations leads to a discovery gap, missing semantically equivalent clauses, and review latency due to manual scanning of lengthy documents.

  • Implementation and Prerequisites

    The solution is deployed using two AWS CloudFormation stacks, requiring specific AWS permissions, Amazon Bedrock model access, and familiarity with CloudFormation. Deployment is estimated to take 35 minutes with a modest cost for a demo.

Read the original announcement →

https://aws.amazon.com/blogs/big-data/build-a-contract-compliance-search-system-with-amazon-opensearch/

Related releases