Skip to content

Added TA-SQL schema linking module#107

Open
fi5421 wants to merge 8 commits intoschema-linkingfrom
ta-sql_integration
Open

Added TA-SQL schema linking module#107
fi5421 wants to merge 8 commits intoschema-linkingfrom
ta-sql_integration

Conversation

@fi5421
Copy link
Collaborator

@fi5421 fi5421 commented Apr 24, 2025

Description

This PR corresponds to the following Task

Added TASL (schema linking module from TA-SQL) into schema_linking_utils. Currently, it only utilizes the question_id from dev.json to find all relevant details such as evidence, db_id. It gathers schema information mostly from the dev_tables.json file. I have tried to keep the tasl.py module as close to the original as possible right now, this includes some comments from the original code. Changes in the module were required to use our dataset structure.

Currently this does not yield good results but if we want to use it in the main pipeline we could pass everything as parameters in the function rather that it fetching from the dataset.

This PR also adds clients for gemini 2.5 pro preview and o4 (from the main branch)

The calling function is in utilities/schema_linking/schema_linking_utils
@fi5421 fi5421 added the enhancement New feature or request label Apr 24, 2025
@fi5421 fi5421 self-assigned this Apr 24, 2025
@AwaisKamran AwaisKamran requested a review from Copilot April 24, 2025 05:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new TA‐SQL schema linking module (TASL) and integrates it into the existing schema linking utilities, while also adding new client support for Gemini models.

  • Added the TASL module under server/utilities/schema_linking/tasl.py for schema linking based on dev.json and dev_tables.json.
  • Updated schema_linking_utils.py to include a new tasl function and integrated TASL usage.
  • Extended LLM_enums.py with additional model types to support new Gemini clients.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
server/utilities/schema_linking/tasl.py Added the TASL module with schema reconstruction and dummy SQL generation.
server/utilities/schema_linking/schema_linking_utils.py Introduced a new tasl function that instantiates TASL.
server/utilities/constants/LLM_enums.py Updated enum values with new Gemini model types.

fi5421 added 3 commits April 24, 2025 17:50
brought TASL prompt into the prompt factory
added fucntion in utility_functions for getting primary keys

udpated the branch with some prompt updates from the main branch
@fi5421
Copy link
Collaborator Author

fi5421 commented Apr 24, 2025

Updated the TASL schema linking dummy prompt to be used from the prompt factory.
The prompt uses column_meaning.json for descriptions in the schema.
It also needed a primary_keys dicts so created another function in utility_functions.py to get a primary key dict.
Dummy SQL requires target_question, evidence and database_name in the get_prompt_class function only.

resolved PR comments and resolved some issues with faulty merge
@fi5421 fi5421 requested a review from Mehak-Conrad April 25, 2025 12:12
@fi5421 fi5421 added the draft label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

draft enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants