Skip to content

SqlAgent

PropertyPatternTypeDeprecatedDefinitionTitle/Description
- implementationNoconstNo-SqlAgent
- clientNoReference[SqlClient]NoIn SqlClientOverview of SqlClient components
- apuNoReference[APU]NoIn APUThe APU is the main interface for the Agent to interact with the LLM.
The APU provides a set of capabilities that encapsulate LLM functionality and creates a clear separation between business logic and the underlying LLM implementation.

To learn more, check out our blog article APU: What is it and how does it work?.
- descriptionNostringNo-Description
- system_promptNostringNo-System Prompt
- user_promptNostringNo-User Prompt
- clarification_promptNostringNo-Clarification Prompt
- response_promptNostringNo-Response Prompt
- error_promptNostringNo-Error Prompt
- num_retriesNointegerNo-Num Retries

1. Property implementation

Typeconst
RequiredNo

Description: SqlAgent

Specific value: "SqlAgent"

2. Property client

TypeReference[SqlClient]
RequiredNo
Default{"implementation": "SqlClient"}
Defined inSqlClient

Description: Overview of SqlClient components

3. Property apu

TypeReference[APU]
RequiredNo
Default{"implementation": "APU"}
Defined inAPU

Description: The APU is the main interface for the Agent to interact with the LLM. The APU provides a set of capabilities that encapsulate LLM functionality and creates a clear separation between business logic and the underlying LLM implementation.

To learn more, check out our blog article APU: What is it and how does it work?.

4. Property description

Title: Description

Typestring
RequiredNo
Default"An agent for interacting with data. Can respond to queries provided in natural language."

5. Property system_prompt

Title: System Prompt

Typestring
RequiredNo
Default"\n You are a helpful assistant that is a sql expert and helps a user query a {{ protocol }} database and analyse the response.\n \n Here is the database schema:\n {{ metadata }}\n \n Use your as needed tools to investigate the database with the goal of providing the user with the query that they need.\n \n Think carefully.\n "

6. Property user_prompt

Title: User Prompt

Typestring
RequiredNo
Default"{{ message }}"

7. Property clarification_prompt

Title: Clarification Prompt

Typestring
RequiredNo
Default"What clarifying information do you need? Phrase your response as an explicit question or several questions."

8. Property response_prompt

Title: Response Prompt

Typestring
RequiredNo
Default"What is your response? Be explicit and concise."

9. Property error_prompt

Title: Error Prompt

Typestring
RequiredNo
Default"An error occurred executing the query \"{{ query }}\": {{ error }}"

10. Property num_retries

Title: Num Retries

Typeinteger
RequiredNo
Default3