You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But, I think that I can make it more optimized by changing some paramters, and especially prompt template: Here is the prompt template being used by default:
display(Markdown(gpt4_agent.agent.llm_chain.prompt.template))
----------------------
You are working with {num_dfs} pandas dataframes in Python named df1, df2, etc. You should use the tools below to answer the question posed of you:
python_repl_ast: A Python shell. Use this to execute python commands. Input should be a valid python command. When using this tool, sometimes output is abbreviated - make sure it does not look abbreviated before using it in your answer.
Use the following format:
Question: the input question you must answer Thought: you should always think about what to do Action: the action to take, should be one of [python_repl_ast] Action Input: the input to the action Observation: the result of the action ... (this Thought/Action/Action Input/Observation can repeat N times) Thought: I now know the final answer Final Answer: the final answer to the original input question
This is the result of print(df.head()) for each dataframe: {dfs_head}
Begin! Question: {input} {agent_scratchpad}
How can I change the prompt template?
Thanks for any help
The text was updated successfully, but these errors were encountered:
template = """We are scraping data from a Vehicle Damage Estimating Software. First input is Vehicle Make Model Year, Type, and respective Part and Operation.
Then we have to choose from possible options to reach that specific part. I will provide you with received Options, you have to tell me which to choose,
So we can reach to respective part info
Just output single option, and not folllowing sequence.
Begin! Question: {input} {agent_scratchpad}"""
gpt4_agent = create_pandas_dataframe_agent(
ChatOpenAI(temperature=0,
openai_api_key=OPENAI_API_KEY,
model_name = 'gpt-4'),
[sub_listing_df,company_df], verbose=True,
chain_type_kwargs={
'prompt': PromptTemplate(template=template,input_variables=['input','agent_scratchpad'])
}
)
Hi ,
Thanks for veery helping notebooks
Hope all of you are doing great.
I am developing a chatbot/question-answer agent using GPT-4 on pandas dataframe in langchain. I am able to make it work with following code:
But, I think that I can make it more optimized by changing some paramters, and especially prompt template: Here is the prompt template being used by default:
How can I change the prompt template?
Thanks for any help
The text was updated successfully, but these errors were encountered: