Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zgi.cn/llms.txt

Use this file to discover all available pages before exploring further.

Function overview

ZGI database is not a simple “data storage” module, but a set of structured data capability base for business intelligence scenarios. It supports users to quickly generate data table structures starting from business documents, tables or explanatory materials, and connect subsequent data query, statistical analysis, complex calculations, log tracking, agent question and answer and other capabilities in series. The database function can be used as an independent data management tool or as the core data source in the agent workflow. For scenarios such as contract management, project ledgers, operating data statistics, business record analysis, rule management, etc., the database module can undertake a complete link from “structured modeling” to “natural language query”.
Core Value It’s not just about “storing data in”, but it’s about allowing these data to be stably checked, accurately calculated, clearly tracked, and finally returned to business personnel through natural language.
Database capabilities are particularly suitable for the following types of business problems:
  • Query single or multiple pieces of structured information
  • Filter data according to conditions and output details
  • Aggregate, group, sort, and perform statistical analysis on data
  • Support intelligent agents to conduct natural language question and answer
  • Do complex calculations with business rules, clause data, and project rule tables
  • Carry out log traces and troubleshooting of database operation processes

Overview of core competencies

Ability CategoryContains capabilitiesillustrate
Table structure designField definition, type setting, required mark, manual adjustmentSupports two methods of manual table creation and intelligent generation
Intelligent generation of table structureUpload business documents to automatically generate table structuresAutomatically identify fields from documents, forms, contracts and other materials
Data ImportStructured data batch writingSupports the import of 15 pieces of data at a time, and is continuing to be optimized.
Data QueryPrecise query, conditional filtering, fuzzy matchingSupports multiple query types to meet different business needs
Statistical AnalysisAggregation, grouping, sorting, multi-table joint queryComplex analysis and multidimensional statistics
Natural Language QueryNL2SQL automatic conversion and executionBusiness staff can ask questions in Chinese and get direct results.
Operation LogSQL execution records and operation trackingFull-link audit, supporting investigation and review
Intelligent linkageAs a workflow data source nodeDatabase + agent realize end-to-end business closed loop

Supported data types

data typeInstructions for useTypical scenario
textText type, storing string contentName, address, description, remarks
numericExact numeric typeAmount, rate, price
integerinteger typeQuantity, days, serial number
timestamptimestamp typeContract date, operation time
booleanBoolean typeWhether to enable and complete

Table structure design

Field definition

Each field contains the following information: storage field name, field description, data type, whether required. This design takes into account both technical executability and business understandability.

Single table and multiple table design

In a simple scenario, one table can carry complete data (employee ledger, equipment list, etc.). For complex scenarios, one database and multiple tables design is recommended:
  • Main table — carries core structured fields (such as contract number, amount, date)
  • Term Sheet — Contains original terms or explanatory content
  • Rule table — carries project-level or business-level rules and calculation standards
  • Details table — carries multiple records or change details
For scenarios such as contracts, rules, and business analysis, a multi-table design is usually more stable and more conducive to subsequent queries and complex calculations.

Intelligent generation of table structure

The user uploads a reference file and fills in the requirement description, and the system automatically identifies key fields based on the file content and business intent, and infers a reasonable table structure.

Supported input sources

  • Local file upload (DOC, DOCX, PDF, XLSX, XLS, PPTX, JPG)
  • Custom text description
  • Select reference files from the file management module

Generate content

The system automatically generates field names, field descriptions, data type recommendations, required field recommendations, and possible business primary key/identification fields.

Applicable scenarios

  • Not familiar with modeling and don’t know how to create a table
  • Already have business materials but no structured data design yet
  • Hope to quickly build a demo or verification solution
  • Want to convert document content into a queryable structured table
Usage Suggestions Intelligent generation is suitable for “starting”, but it is still recommended that the core field naming, field semantics, and field splitting methods be finalized by the business or implementation personnel.

Data import and maintenance

After the table structure is built, the business data is written into the table through the import capability of the database module itself. Currently, it supports importing 15 pieces of data at a time, and this capability is being continuously optimized.

Applicable scenarios

Initial ledger establishment, contract sample import, project rule data entry, tabular data rapid storage, and demo data preparation.
Recommendation process Design the table first → import in batches → verify the query to avoid finding unreasonable field design after one-time import.

Data query capabilities

Query typeillustrateExample
Precise queryLocate a single record by primary key or unique field”Contract information of Sunshine Company”
Conditional filteringFilter multiple records by conditions”All contracts expiring this month”
fuzzy matchingKeyword fuzzy search”Items containing ‘property‘“
aggregate statisticsSummarize, count, group, sort”Total annual rent for each building”
Multiple table joint queryCross-table related query”Contract Master Table + Term Sheet Joint Query”
Complex calculationsMulti-field operations and rule judgment”Liquidated damages = daily rent × number of overdue days × rate”

Natural language query (NL2SQL)

Business personnel can directly ask questions in Chinese, and the system automatically converts natural language into SQL and executes it.

Query example

User question: What is the property fee payment method for Sunshine Company?

→ System-generated SQL:
  SELECT payment_method FROM contracts WHERE company_name = 'Sunshine Company';
→ Natural language response:
  The property fee payment method for Sunshine Company is "quarterly prepayment."

conversion process

Understanding the problem

The system identifies query objects, query indicators and query types

Generate SQL

Automatically generate corresponding SQL statements based on the table structure

Execute query

Execute SQL in database and get raw results

Natural language reply

Convert query results into natural language answers that business people can understand

Complex business calculations

The database is not only suitable for “looking up data”, but can also provide structured support for complex business calculations. Together with the rules table and terms table, you can achieve:
  • Liquidated Penalty Calculation — Automatically calculated based on overdue days, daily rent and rate
  • Property fee calculation — Calculated based on multiple dimensions such as area, unit price, cycle, etc.
  • Deposit Return Judgment — Comprehensive judgment based on contract terms and actual performance.
  • Payment Cycle Alert — Automatically identify payment nodes that are about to expire

Operation logs and tracking

Dimensionsillustrate
Operating timeOperation timestamp accurate to seconds
Operation typeCreate tables, queries, update, delete, etc.
Execution statusSuccess/failure and error reasons
Operation sheetInvolved data table name
operating userThe account that performs the operation
Execute SQLThe actual executed SQL statement for easy troubleshooting
The log supports filtering by operation type, status, and time range, and is suitable for scenarios such as query error troubleshooting, prompt word optimization review, business data modification tracking, and abnormal location of agent results.

Linked to intelligent agent workflow

  • As a data source: Provide query objects, core fields, and statistical data, allowing agents to directly consume structured data
  • Statistical Analysis Link: In scenarios such as business analysis and contract statistics, it directly assumes the role of statistics and return results.
  • Complex calculation support: Provides core numerical fields and rule fields to provide a data basis for rule-driven business calculations
  • Natural language reply: The query results directly generate natural language answers, not just returning forms, but service business questions and answers

Typical business scenarios

sceneThe role of the databasecore competencies
Contract ManagementStores the main contract table + terms table, supporting natural language Q&AMulti-table query + NL2SQL
Project LedgerStructured management of project schedule, budget, person in charge, etc.Conditional filtering + aggregate statistics
Operational AnalysisMulti-dimensional data statistics and visualizationGroup statistics + complex calculations
Property ManagementLedger management of rent, property fees, deposits, etc.Rule calculation + early warning
HR ManagementStructured storage of employee information, attendance, and performancePrecise query + filter
Equipment AssetEquipment list, inspection records, maintenance informationConditional query + log tracking