Skip to content

Commit

Permalink
sql agent tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Dec 31, 2024
1 parent c8f2cd9 commit 4fa237d
Show file tree
Hide file tree
Showing 5 changed files with 712 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ai_data_science_team/agents/data_cleaning_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def recommend_cleaning_steps(state: GraphState):
}

def create_data_cleaner_code(state: GraphState):
if bypass_recommended_steps:
print("---DATA CLEANING AGENT----")
print(" * CREATE DATA CLEANER CODE")

data_cleaning_prompt = PromptTemplate(
Expand Down
2 changes: 2 additions & 0 deletions ai_data_science_team/agents/data_wrangling_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def recommend_wrangling_steps(state: GraphState):


def create_data_wrangler_code(state: GraphState):
if bypass_recommended_steps:
print("---DATA WRANGLING AGENT----")
print(" * CREATE DATA WRANGLER CODE")

data_wrangling_prompt = PromptTemplate(
Expand Down
2 changes: 2 additions & 0 deletions ai_data_science_team/agents/feature_engineering_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def human_review(state: GraphState) -> Command[Literal["recommend_feature_engine
)

def create_feature_engineering_code(state: GraphState):
if bypass_recommended_steps:
print("---FEATURE ENGINEERING AGENT----")
print(" * CREATE FEATURE ENGINEERING CODE")

feature_engineering_prompt = PromptTemplate(
Expand Down
3 changes: 2 additions & 1 deletion ai_data_science_team/agents/sql_database_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def recommend_sql_steps(state: GraphState):
}

def create_sql_query_code(state: GraphState):

if bypass_recommended_steps:
print("---SQL DATABASE AGENT---")
print(" * CREATE SQL QUERY CODE")

# Prompt to get the SQL code from the LLM
Expand Down
704 changes: 704 additions & 0 deletions examples/sql_database_agent.ipynb

Large diffs are not rendered by default.

0 comments on commit 4fa237d

Please sign in to comment.