The application discloses a Text-to-
SQL intelligent agent coordination
system and method for perceiving potential intention of a user in a multi-round context. The
system comprises a
memory bank, a prompt strategy
pool, a strategy recommender, an
SQL generator, an
SQL refiner and a strategy optimizer. The
memory bank is used for storing
system running data. The prompt strategy
pool is used for storing prompt strategies. The strategy recommender is used for receiving
user information and strategy information of the prompt strategies, identifying the current potential intention of the user based on the
user information and the strategy information, and matching the optimal strategy from the prompt strategy
pool according to the potential intention to constrain the generation of an SQL
query statement. The SQL generator generates an SQL
query statement based on the current
natural language query of the user, the system running data and the optimal strategy. The SQL refiner is used for adjusting and iteratively updating the SQL
query statement. The strategy optimizer is used for updating the prompt strategies. The application increases
strategy selection before SQL generation, so that the SQL generator can generate an SQL statement meeting the user demand at one time with a higher probability, and the cost is reduced.