The relationship extraction option in the AI agent retrieves additional metadata about connections between tables, such as foreign keys, which may not be evident from column names or descriptions alone. This capability enables the agent to construct accurate SQL queries with correct JOIN conditions, reducing errors caused by ambiguous or unclear column names.
This option is particularly useful in the following cases:
•When queries involve joining multiple tables where join columns have ambiguous names.
•When column descriptions in the metadata catalog (CDGC) are insufficient or incomplete, making it difficult for the large language model (LLM) to correctly identify relationships.
•When tables with similar names or structures exist across different schemas, which lead to incorrect joins.
By enabling relationship extraction, users gain greater accuracy in SQL query generation and more consistent results. However, this comes at the cost of longer execution times due to the need to fetch and process additional metadata.
Therefore, it is recommended to keep this option disabled by default and enable it only for complex scenarios that require precise understanding of table relationships.