— our projects

AI Service Integration

Internet Services

/

USA

USA

/

USA

USA

Our client is a US-based legal practice management system that helps thousands of law firms and individual attorneys streamline task and case management, documentation workflow, billing, time and expense tracking, reporting, and legal tools integration.

Web app

/

Java

Java

/

TypeScript

TypeScript

/

React

React

/

AWS

AWS

/

oAuth

oAuth

/

ai-agent-integration

overview

[01]

The Problem

Among its many features, this software system has invoice generation functionality. These invoices must comply with the Outside Counsel Guidelines – a document that specifies managing legal matters, billing, budgets, and other services that a law firm provides. Since the OCG is not standardized, its contents, including the guidelines for billing and invoicing, may vary from company to company.

This complicates many routine procedures for law firms, including invoice validation against the guidelines. The procedure for invoice validation that the client had in place was manual and time-consuming. Thus, the system needed a more efficient way to validate invoices.

[02]

The Solution

The system is high-scale, serving thousands of clients, each generating hundreds of different invoices daily and adhering to their own version of OCG. This makes a traditional algorithmic approach to invoice validation inefficient and impractical. To solve this challenge, the system needs more than just rule-based logic. It requires personalization, natural language understanding, and reasoning capabilities to accurately interpret and compare invoice content against the specific billing rules defined by each user’s OCG.

Thus, the client would benefit from a generative AI-based service that can quickly and accurately analyze any invoice against a company’s version of OCG and validate it.

[03]

How Did We Make It Work?

Considering the client’s request, our task was to create a service able to:

  • Process an OCG document and find the relevant billing guidelines that specify invoice formulation.
  • “Memorize” the detected billing guidelines as context for invoice analysis.
  • Process an invoice document taking into account the provided instructions and context.
  • Provide a summary of whether the invoice lines meet the billing guidelines.

Thus, the service we built consists of two main functional components:

  • Data preprocessing component. It uses LLM to extract only relevant information from the entire OCG file. This saves costs and processing effort for the next step. Also, every invoice gets broken down into separate invoice lines here, so that it can be further analyzed line by line, as our R&D revealed that line-by-line processing increases accuracy.
  • Invoice analysis component. This component also relies on LLM, but its task is to check data from the invoice document against the instructions extracted from the OCG document, reveal inconsistencies, present them to the user, and indicate the underlying norms from the OCG.

We completed this task in three steps:

  • Deployed Microsoft Azure OpenAI service instance with GPT-4.1 LLM endpoint through the Azure AI Foundry platform.
  • Using prompt engineering techniques (chain-of-thought prompting, few-shot learning), сreate a generative AI-based service specializing in the users’ OCGs, billing practices, and invoicing rules.
  • Automate the invoice validation process by integrating the AI service with the client’s invoice generation software, so that a team member could launch the validation of a freshly generated invoice with just one click.

[04]

The Result

As a result, we helped the client create a quick, easy-to-implement, and efficient solution for automating a routine and time-consuming task, leveraging generative AI technology as a sound alternative when an algorithmic approach is not relevant. Due to this automation, the client’s average workflow now saves up to 15% of users’ work time and prevents man-made mistakes, which is critical for legal environments.

ai-agent-integration illustration

Have a project?
Let’s build it.

Leave your contacts and get a free consultation from Axon’s Manager.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.