Legal document review · Production

Unlocking enhanced legal document review with Lexbe and Amazon Bedrock

The problem

Legal professionals must analyze massive sets of case documents per matter; keyword searches return unwieldy result sets and fail to surface hidden evidence connections, making manual review time-consuming, error-prone, and costly.

First attempt

The initial system iteration achieved only a 5% Recall Rate, far below production requirements, and traditional eDiscovery techniques could not surface hidden relationships or produce findings-of-fact reports.

Workflow diagram · grounded in source
1
User submits legal query
trigger
“User access: A user accesses the frontend application through a web browser”
2
Document text extraction
integration
“Legal documents are stored in an Amazon Simple Storage Service (Amazon S3) bucket, and Apache Tika extracts text from these documents. The extracted text is stored as individual text files in a separate S3 bucket. This bucket is used as …”
3
Embedding generation
ai_action
“The extracted text is processed using Titan Text v2 to generate embeddings. Lexbe experimented with multiple embedding models—including Amazon Titan and Cohere—and tested configurations with varying token sizes (for example, 512 compared…”
4
Semantic retrieval via RAG
ai_action
“Amazon Bedrock Knowledge Bases retrieves relevant data from the vector database for a given query”
5
LLM response generation
ai_action
“The Amazon Bedrock Sonnet 3.5 large language model (LLM) processes the retrieved data to generate a coherent and accurate response”
6
Report delivered to user
output
“The final response is returned to the user using the frontend application through CloudFront”
Reported outcome

After multiple iterations of collaboration with Amazon, Lexbe Pilot reached up to 90% Recall Rate, enabling polished findings-of-fact reports with source hyperlinks and deep automated inference across large multilingual document sets.

Reported metrics
Recall Rate - iteration 1 (January 2024)5%
Recall Rate - iteration 2 (April 2024)36%
Recall Rate - iteration 3 (June 2024)60%
Recall Rate - iteration 4 (August 2024)66%
Show all 6 reported metrics
Recall Rate - iteration 1 (January 2024)5%
Recall Rate - iteration 2 (April 2024)36%
Recall Rate - iteration 3 (June 2024)60%
Recall Rate - iteration 4 (August 2024)66%
Recall Rate - iteration 5 (December 2024)up to 90%
Processing cost advantagesignificant cost advantage
Reported stack
Amazon BedrockAmazon Bedrock Knowledge BasesAmazon OpenSearchAWS FargateAmazon CloudFrontApache TikaTitan Text v2Amazon Bedrock Sonnet 3.5Amazon ECSLexbe Pilot
Source
https://aws.amazon.com/blogs/machine-learning/unlocking-enhanced-legal-document-review-with-lexbe-and-amazon-bedrock?tag=soumet-20
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

After multiple iterations of collaboration with Amazon, Lexbe Pilot reached up to 90% Recall Rate, enabling polished findings-of-fact reports with source hyperlinks and deep automated inference across large multilingu…

What tools did this team use?

Amazon Bedrock, Amazon Bedrock Knowledge Bases, Amazon OpenSearch, AWS Fargate, Amazon CloudFront, Apache Tika, Titan Text v2, Amazon Bedrock Sonnet 3.5, Amazon ECS, Lexbe Pilot.

What results were reported?

Recall Rate - iteration 1 (January 2024): 5%; Recall Rate - iteration 2 (April 2024): 36%; Recall Rate - iteration 3 (June 2024): 60%; Recall Rate - iteration 4 (August 2024): 66% (source-reported, not independently verified).

What failed first in this deployment?

The initial system iteration achieved only a 5% Recall Rate, far below production requirements, and traditional eDiscovery techniques could not surface hidden relationships or produce findings-of-fact reports.

How is this legal document review AI workflow structured?

User submits legal query → Document text extraction → Embedding generation → Semantic retrieval via RAG → LLM response generation → Report delivered to user.