Skip to main content

Single-turn Question Answering Technology

Overview

AskTable is an intelligent conversational AI data assistant capable of handling complex data queries and providing personalized answers. This document details the complete process of AskTable when processing a single user conversation, including the functions and interaction methods of each module.

Architecture Explanation

The following is the technical architecture diagram for a single conversation in AskTable:

at_database_query_via_natural_language

AskTable combines traditional databases with modern AI large language models (LLMs), achieving intelligent, accurate, and personalized data retrieval and analysis.

The entire system is divided into three core modules: Meta Brain, Meta Retrieval, and Data Retrieval.

  1. AskTable Meta Brain: Building a Metadata Graph

    Meta Brain is the core module of AskTable, acting as the knowledge base for the entire data system. It stores all metadata and necessary keyword data in the database, including database names, table names, field names, and their comments. It automatically constructs a comprehensive database metadata graph driven entirely by AI. This enables AskTable to understand the data structures in different database systems (such as MySQL, Oracle, TiDB, etc.) and efficiently and accurately generate corresponding SQL query statements when needed.

    Meta Brain also serves as the storage and computing center for various related/similarity searches such as embedding. All queries are processed here for searching and computation, thus finding the most relevant data tables, fields, and data values that match the user's intent. The combination of vector search and graph database technology allows Meta Brain to quickly locate target data within large-scale data, improving query efficiency.

  2. AskTable Meta Retrieval: Entity Recognition and Metadata Retrieval

    When a user initiates a query, the system first enters the Meta Retrieval module. Here, the question undergoes natural language processing to extract key entities or relationships, such as place names, users, etc. This step uses entity recognition technology to enable the system to identify and understand the core content of the user's query.

    Next, the system calls an embedding model to convert the extracted entities into vector representations. These vector representations are queried in Meta Brain to find the most relevant database fields and tables. Semantic retrieval using vectors enables the system to efficiently match complex data structures, ensuring the accuracy of the query and the ability to recognize colloquial expressions.

    At the same time, the system also uses built-in search algorithms optimized for Meta Data and Short Value structures to match real entity names from Meta Brain, thereby avoiding the issue of missing values during subsequent SQL generation.

    Additionally, Meta Retrieval is responsible for managing query permissions. Based on the user's role and permissions, the system filters out data that does not meet the access requirements. This process is also implemented through the permission filtering technology of the embedding model.

  3. AskTable Data Retrieval: Intelligent Learning and Dynamic Error Correction

    The Data Retrieval module is responsible for executing the generated SQL queries and retrieving the data. Unlike traditional database queries, AskTable adds intelligent learning and error correction mechanisms during this process. When the query results do not match expectations, the system uses AI models to dynamically adjust or rewrite the SQL to optimize the query results. This dynamic error correction mechanism significantly improves response accuracy in complex query scenarios. Additionally, AskTable continuously optimizes the generation of SQL in different database dialects and table structures through reinforcement learning and training based on user feedback, further enhancing query accuracy.

    Before data querying, the system will perform additional permission verification. Each row of data will be filtered again according to the permission rules before being returned to the user, ensuring data compliance and security. Through this rigorous multi-layer filtering, AskTable not only guarantees data security but also greatly reduces data redundancy.

Technical Complexity and Advantages

The technical architecture of AskTable demonstrates the potential for deep integration between modern database management and AI technologies. By utilizing technologies such as vector retrieval, RAG, Agent, dynamic permission management, and dynamic SQL rewriting, the system achieves intelligence and flexibility that traditional applications cannot match.

Efficient Metadata Management

The metadata management in Meta Brain enables the system to easily adapt to various different database structures and intelligently match relevant data according to the user's intent during queries.

Intelligent Query Optimization

Through the embedding representation of LLMs and dynamic learning, the system can intelligently optimize and locate user queries, providing precise and relevant query results.

Complex Permission Control

By combining multi-layer permission filtering with embedding models, the system ensures data security and compliance in large-scale data access scenarios.

This architecture enables AskTable to demonstrate high efficiency and accuracy when handling complex queries and personalized responses.

For more questions, please visit our official website AskTable Website to contact us for detailed information.