I have a database in which I have connected an agent too. However, I have noticed that it sometimes gets confused between whether or not it should return a column ID or persons first name when asked “which person sold the most….?” Is there a way to tune/adjust the create_sql_agent from langchain.agents at which I can tell the agent to not return column ID but return first and last name based on questions structured like that?
I think the question may be related to this post but I am unsure how to include that/and structure that properly: https://github.com/langchain-ai/langchain/discussions/9591
System Info
langchain-openai==0.1.3
Python 3.11.7
Windows 11
Basic Model
from langchain_openai import ChatOpenAI
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
from langchain.agents import create_sql_agent
from langchain.sql_database import SQLDatabase
llm = ChatOpenAI(model_name="gpt-3.5-turbo-1106", temperature=0, openai_api_key=os.environ.get('OPENAI_API_KEY'))
toolkit = SQLDatabaseToolkit(db=db, llm=llm)
agent_executor = create_sql_agent(
llm=llm,
toolkit=toolkit,
verbose=False,
agent_type="openai-tools")
Nothing, unsure how to progress as I can not find examples.