A Leading US Legal Document Platform
How Matellio Built a Conversational AI Assistant on Amazon Bedrock to Help Visitors Find the Right Legal Document by Describing Their Situation in Plain English

The Impact

Zero

Login Required
Fully anonymous document search – no signup or personal information

Natural

Language Search
Visitors describe their situation instead of the exact legal term

Zero

Invented Documents
Every recommendation is grounded in a real, live catalog search

About the Customer

The customer operates an online platform offering a broad catalog of legal document templates spanning personal, business, and real estate needs, enabling visitors to find and complete legal forms without engaging an attorney for routine documentation.

REGION

United States

INDUSTRY

LegalTech

JUMP TO SECTION

Share this Article

case-study-dummy

How Matellio Built an AI-Powered Trademark Risk Analysis Engine on Amazon Bedrock – Replacing Manual Attorney Review with a Consistent, Scalable LLM-Driven Process

Executive Summary

Helping Visitors Find the Right Legal Document with AI

A leading US online legal document platform, offering a large catalog of legal templates across Personal, Business, and Real Estate categories, engaged Matellio to solve a specific discovery problem: visitors typically know their situation but not the exact legal term for the document they need, and both category browsing and name-based search assume they do. Matellio built a fully anonymous, conversational AI assistant that lets visitors describe their situation in their own words, asks clarifying questions only when needed, searches the platform’s live document catalog in real time, and recommends only real, existing documents — never an invented one. The assistant requires no login or signup, keeping the experience frictionless from the visitor’s first message through to the document link.

Customer Challenge

A Leading US LegalTech Company

Visitors typically arrive at the platform already knowing their situation, but not the correct legal terminology for it. Someone looking to rent out a spare room to a friend is looking for a Residential Lease Agreement, but a keyword search on that phrase would likely return nothing relevant. This mismatch between how people naturally describe their need and how the catalog is structured for search was a real source of visitor friction and lost conversions:

  • Category browsing assumes the visitor already knows which category their need falls under.
  • Name-based search assumes the visitor already knows the correct legal term for the document.
  • Visitors without either piece of knowledge had no clear path to the right document, beyond guessing or leaving the site.

Time-intensive and labor-dependent

Manual search and review created a throughput bottleneck that worsened as application volumes increased.

Subjective and inconsistent

Risk scoring depended on individual attorney judgment, with potential inconsistency across attorneys reviewing the same case.

Risk of incomplete assessments

Manual analysis created exposure to missed matches and gaps in conflict evaluation.

No path to efficiency

Adding volume meant adding attorney headcount — there was no structural improvement available within the existing process.

Without a scalable solution, the company faced longer turnaround times, rising operational costs per application, declining customer satisfaction, and a constrained ability to compete in a fast-growing LegalTech market.

Why AWS

Why AWS Was the Right Foundation

Matellio hosts the AI service’s production workload on AWS Bedrock AgentCore Runtime, running Anthropic’s Claude model through Amazon Bedrock as a managed, containerized service. Because the browser cannot call the AI service directly, all visitor traffic is relayed through the existing Laravel application, with AWS-side authentication handled through an EC2 instance IAM role rather than long-lived credentials stored in the application.

Delivery Approach

Matellio delivered the assistant as a new, lightweight AI service alongside the customer’s existing Laravel application, rather than a rebuild of the front-end experience. The existing Laravel application continues to serve as the single front door for all browser traffic, relaying chat requests to the AI service and streaming responses back byte-for-byte — allowing the new capability to be added without disrupting the platform’s existing architecture.

Partner Solution

The Conversational AI Solution We Built

The assistant has a short, natural-language conversation with the visitor, understands their situation, asks clarifying questions only when there isn’t enough detail to search yet, searches the real document catalog on their behalf, and recommends the right document with a direct link — entirely anonymous, with no login or signup required. The conversation continues naturally from there: the visitor can refine their request, ask follow-up questions, or ask a related general legal question.

How the System Works

At the core of the solution is a LangGraph-based AI agent hosted on Amazon Bedrock AgentCore Runtime. The agent orchestrates the complete screening pipeline:

1. Browser (React chat widget)

The visitor sends a message, tagged with a fresh, anonymous session ID generated for that page load.

2. Laravel front door

Receives the request, relays it to the AI service, and streams the reply back to the browser as it’s generated.

3. AI service (“the brain”)

Loads recent conversation context, sends it to the Claude language model, and reasons about what the visitor needs.

4. Document search tool

If enough detail is available, the model searches the real, live document catalog and gets back real candidate matches.

5. Model reply

The model writes a natural-language recommendation grounded only in the real search results – never an invented document.

6. Streaming response

The reply streams back through Laravel to the browser in real time, rendering as it’s generated.

7. Persistence

Both the visitor’s message and the assistant’s reply are saved to the database, so the next message in the same session has context.

Key Design Decisions

  • Fully anonymous, no login: Zero friction — a visitor can get a recommendation without creating an account or giving any personal information.
  • Fresh session ID on every page load, not stored long-term in the browser: Keeps the assistant stateless from the visitor’s perspective and avoids retaining identity across visits.
  • Conversation history stored in the database, not in memory: Survives a server restart or redeploy mid-conversation instead of silently losing context.
  • Only the most recent messages are ever fetched or re-sent, never the full history: Keeps every request small and fast regardless of how long a conversation runs.
  • Exactly one capability — searching the document catalog: Keeps the assistant narrowly scoped as a document-finder, not a general-purpose chatbot.
  • Never recommends a document that wasn’t returned by a real search: Prevents the model from inventing documents, names, or links that don’t actually exist in the catalog.
  • Brief, general answers to legal questions, always pointing to a licensed attorney for anything personal: Provides genuine help without giving personalized legal advice, which the assistant is not qualified or positioned to give.
  • Declines to answer questions unrelated to finding a document: Keeps the assistant on-scope rather than behaving like a general-knowledge chatbot.

Technology Stack

  • Chat widget React + Vite
  • AI service (“the brain”) Node.js + TypeScript (Express)
  • Data storage MySQL (existing database)
  • Language model Anthropic Claude — direct API locally, Amazon Bedrock in production
  • Production hosting (AI service) AWS Bedrock AgentCore Runtime (Docker container)
  • Front door / relay Laravel (existing application)
  • AWS authentication EC2 instance IAM role — no long-lived credentials stored anywhere

Results and Benefits

Business Impact & Results

Quantified usage and conversion metrics are not yet available for this solution (see internal note above). The following benefits are structural, grounded directly in the design of the solution rather than measured outcomes:

Frictionless discovery

Removing login and signup removes a barrier between the visitor and the right document, at the exact moment they need it.

Reduced dependency on exact terminology

Visitors can succeed without knowing the correct legal term for their situation, addressing the core mismatch between how people describe their needs and how the catalog was previously searchable.

Grounded recommendations

The assistant never surfaces a document that doesn’t exist in the real catalog, avoiding a credibility-damaging failure mode common to less constrained AI assistants.

Scoped, safe interaction

The assistant stays within document-finding and general legal information, declining personalized legal advice and directing visitors to a licensed attorney instead.

T.A.S.K Framework

Technology Stack

Recent Case Studies

case-study-dummy

How Matellio Built a Multilingual AI Chatbot on Amazon Bedrock to Automate HR Support Across 20+ Company Profiles and 18 Languages

case-study-dummy

How Matellio Built an AI-Powered Trademark Risk Analysis Engine on Amazon Bedrock – Replacing Manual Attorney Review with a Consistent, Scalable LLM-Driven Process

case-study-dummy

How Matellio Built a Conversational AI Assistant on Amazon Bedrock to Help Visitors Find the Right Legal Document by Describing Their Situation in Plain English

Build the impossible, together

Ready to scale smarter?

Let’s turn your next big idea into a scalable product, engineered for speed, reliability, and real-world impact.





    Consent Preferences