Customer Stories

Making Access To Healthcare Data Easier and Faster with Specialized AI

Industry
Healthcare
Partners
Foundation model
End products
End products
Applications
Database access for non-technical users
90%+

Reduction in response time

1 minute

Time for an AI agent to get the correct answer

1

High-performance AI Agent

Clinigence

Challenge

  • Non-technical users struggled to interact with the company's healthcare database because it required analysts skilled in SQL; 
  • This requirement dramatically slowed down direct data access, analysis and decision-making;
  • The client's database had very confusing naming structures requiring analysts with strong SQL skills and intimate knowledge of the database schema and its contents. 

Solution

  • Integration of LLM with LangChain for natural language to SQL translation (i.e. text-to-code);
  • Data analytics and ETL (extract, transform, load); 
  • Data engineering for database enhancement with descriptive metadata;
  • Training of AI Agent on clients’s database: 3 tables with 100+ columns, with 20 sample natural language queries and SQL pairings;
  • Utilization of a vector database for successful query caching.

Results

  • Over 90% reduction in response time, enhancing efficiency and user experience
  • Achieved a 1-minute query response time with the AI agent for faster access to data
  • Developed 1 high-performance Database AI Agent customized for streamlined data queries

Summary

This healthcare technology company focuses on enhancing clinical and financial performance by offering various tools and services designed to optimize healthcare workflows and outcomes. 

They encountered challenges with their data management systems. The database required SQL knowledge, preventing direct access for non-technical users and slowing down decision-making.

To address this, they reached out to our team to develop an AI agent that supports natural language querying of their databases. We used advanced AI technologies and, within just eight weeks,  developed a solution that offers immediate data retrieval and analysis without the need for programming skills. 

This dramatically accelerated access to data, with query responses in under a minute — a 90%+ improvement. This has sped up their operational workflows and showcased the effectiveness of AI-driven solutions in healthcare technology. 

Slow, Inefficient Data Access in Dynamic Healthcare Settings

Our client faced challenges due to the complexity of their data management systems. Their two-fold issue centered around data accessibility for non-technical users and the inefficiencies of manual data processing. Other issues included a database with confusing naming structures, which led to incorrect data output.

Our client’s customers often needed to get certain information pertaining to critical medical data (e.g., to link medical claims to the providers). Prior to our automated solution this routine data access involved multiple steps:

  1. Non-technical users/customers would have to file a support ticket.
  2. Analysts first needed to manually process these requests and then make SQL queries before formulating a response to the customer.

The client had two main problems with this kind of workflow both for customers and their staff: 

  • Inaccessible data for non-technical users 
  • Manual data processing by staff that is slow and error-prone

Inaccessible data for non-technical users:

Non-technical customers found it difficult to interact with the client’s database and access medical or provider data. To do that, they needed to know how to make queries in SQL and have access to the client’s database. So, the client would have to provide additional users, which would:

  • Be costly in terms of time to set up
  • Introduce additional security risks.

The only way for customers to get the information was to email our client and open a ticket with a request for particular data. Afterwards, they had to wait for the reply, which could take a long time.

Manual data processing that is slow and error-prone:

Upon receiving the query analysts would have to manually process them. To address the query this way could take minutes or even hours and was very inefficient. Analysts were spending on average 10 to 15+ minutes per query to retrieve and present the data, and send the reply.

This process was slow, taking time from the customer’s request to the analyst’s response. 

The existing system's inefficiencies clearly required a more automated solution. The client’s goal was to reduce analyst time to answer basic questions their customers may have from the data. They recognized that without Generative AI and customized solutions, streamlining their workflow was unachievable. So they reached out to us and sought a solution that could simplify interactions with their complex database, reducing both time and errors in data processing.

Customizing AI for Non-Technical Users From Natural Language to SQL

To address the client’s challenges, we needed to develop a Database Agent that could answer questions using natural language and query internal databases using SQL. That way, this single AI Agent can accelerate and streamline the entire customer service workflow.

To bridge this gap between non-technical users and complex data interactions, we took several steps:

1. Integrate LangChain with LLM for natural language-to-SQL conversion:

  • This integration lets users interact with the database through conversational queries instead of SQL functions.

Our customized Database AI agent uses the LangChain framework to create a series of LLM calls that convert text to SQL. This enables dynamic and accurate data queries.

Natural language query → SQL → Natural language response

  • Non-technical users interact with a web app to submit queries in natural language. 
  • Our Database AI agent goes through multiple thought-processing steps to derive the correct SQL code for each query. 
  • It then translates the natural language into SQL, retrieves the relevant data, and delivers the results back to the client in natural language.

Here is a more in-depth overview of the technologies we used to enable these processes:

ReAct Agent - LangChain: 

  • Streamlines natural language processing tasks.

The ReAct Agent, as part of the LangChain framework, effectively "translates" back and forth between human language and database queries, converting user input into SQL and vice versa. LangChain provides the essential tools and framework, while the ReAct Agent specifically handles these translations.

Retrieval Augmented Generation (RAG) System:

  • Supports the AI agent in pulling relevant data more accurately.

RAG improves the performance of AI models by blending generated responses with information retrieved from a database. This process enhances the AI's responses, making them more accurate and contextually relevant. 

RAG achieves this by first finding suitable information in a database and then incorporating this data into the AI's natural language responses, allowing it to provide more detailed and informed answers.

2. Analyze Data:

  • We analyzed information about medical providers, medical claims, and personal information.

We gained an understanding of the tables and their structures, analyzed potential questions that the client provided, and investigated what good answers might look like.

3. Perform ETL (Extract, Transform, Load) and Data Engineering on the Client’s Database:

  • We created descriptive metadata for database tables by renaming and removing unnecessary columns for clearer data interaction. 

We encountered some issues when building the AI Agent, like data misinterpretations, due to confusing database naming structures. 

For example, queries about hospital stay lengths for certain conditions could mistakenly pull data from the wrong column when multiple columns had similar names. We performed data engineering to resolve that problem.

This process streamlined data structures, making access and understanding of data through detailed table descriptions much easier. 

4. Provide AI Agent With Sample Queries and SQL Statement Pairs:

  • We trained the AI agent to process queries accurately and efficiently using the client's database.

To train our AI Agent, we used the client's specific data on medical claims and providers from a database containing 3 tables with 100+ columns.

The client also provided 20 pre-defined example questions to test the speed at which the AI agent could get the correct answer. This training ensured the AI Agent could handle real-user queries effectively and accurately.

5. Utilize Vector Database for Data Caching:

  • We enhanced the speed and accuracy of query responses by using a vector database to cache successful queries.

We cached data to improve speed, accuracy, and overall user experience. For this, we used a well-known closed-source vector database service that is stable (no outages) and secure.

Dramatic Reduction in Response Times Enhances Healthcare Decision-Making

By tailoring our solutions to each specific challenge, we provided the client with a system that simplifies data interaction, reduces response times, and minimizes the likelihood of errors. We achieved the client's objective of boosting efficiency and enhancing accessibility in their data processes.

With the implementation of our custom AI agent, non-technical users can now easily make natural language queries through a user-friendly web app. The AI agent conducts several thought-processing steps to convert natural language into SQL accurately. After retrieving the necessary data, it directly responds in natural language to the user. 

This new method cuts down the query response time to about 1 minute — a major improvement over the previous system where inquiries could take 15 minutes or hours to be addressed. This 90%+ reduction in response time speeds up decision-making and enhances user experience and productivity.

We developed and successfully deployed this solution in just eight weeks. For potential clients, this would mean reducing the number of analysts or allowing them to allocate their time to more strategic tasks.

The success of this solution showcases the capability to revolutionize data processing practices across similar sectors. It can be a valuable tool for any organization looking to enhance its data management systems, and we are already using it to demo Database AI to other clients.

Industry
Healthcare
Foundation Model
Product Types
Applications
Database access for non-technical users

Ready to develop your own Generative AI model?