Back Back

How camelAI Maps Your Database for Better Queries

In the world of data analysis, understanding your database structure is crucial. We've developed a way to map your database, which allows our AI to function as your in-house data analyst. This blog post will explain how we do it and why it matters.

The Challenge of Database Schemas

Database schemas can be intricate, messy, and massive. Each organization's database is unique. Without a proper understanding of your schema, the accuracy of AI-generated queries can be surprisingly low. Our internal evaluations show that simply pasting a schema into a general-purpose AI chat (like Claude or ChatGPT) results in only about 30% query accuracy.

By mapping your database, we saw a boost in query accuracy to as high as 80% in our in-house evaluations (performance on your database may be different). Let's dive into how we achieve this.

Our Three-Step Mapping Process

Step 1: Learning the Basics

We start by gathering fundamental information about your dataset. This involves:

  • Asking you, the user, basic questions about what your dataset represents
  • Querying your database to obtain the schema

Step 2: LLM-led Exploration of Your Dataset

Once we have the basics, we use LLMs to gain a deeper understanding:

  • The LLM writes multiple queries and analyzes the results, flagging good queries and discarding bad ones
  • This iterative process helps us identify which tables and fields are most relevant and how they interconnect

Step 3: Creating the Map

After we have a solid understanding of your database structure:

  • We compose a description of your database
  • We list all the meaningful queries we've discovered

This final product serves as our "map" of your database, which camelAI uses to navigate your data efficiently.

How camelAI Uses the Map

When you ask camelAI to create a report or answer a question, it doesn't start from scratch. Instead, it refers to the map to construct the most effective query possible. This is why our accuracy rates are so high compared to general-purpose AI solutions.

Continuous Learning and Improvement

One of the most powerful features of camelAI is its ability to learn from your feedback.

If you notice that a query isn't right, you can thumbs-down the result and tell us what went wrong. We save your input and use it to update the map of your database. This means that if you tell us how to calculate Monthly Active Users, you only need to tell us once.

Safety and Security: Protecting Your Data

At camelAI, we take privacy and security very seriously. Your data is not used for training and can be deleted at any time.

Key Security Measures

  • Data Storage: Your data is securely stored on AWS infrastructure, with strict access controls in place.
  • Temporary Caching: We only pull data during active chat sessions and database mapping, and it's cached for just 5 minutes before deletion.
  • Encryption: All app connections, including API keys and tokens, are encrypted both in transit and at rest.
  • No Unauthorized Access: We never access your accounts without your explicit request or outside of chat sessions.
  • User Control: You have full control over your data, including the ability to delete conversation history, database maps, reports, and connections at any time.

Compliance and Certifications

We're committed to maintaining the highest standards of security. camelAI is CASA certified and is actively pursuing SOC 2 Type 1 and Type 2 certifications.

For a comprehensive overview of our security measures, including how we prevent data leaks, manage app connections, and protect against vulnerabilities, please visit our Security FAQ page. This resource is regularly updated to provide you with the most current information about how we safeguard your data.

Illiana Reed