microsoft / TaskWeaver

A code-first agent framework for seamlessly planning and executing data analytics tasks.
https://microsoft.github.io/TaskWeaver/
MIT License
5.37k stars 688 forks source link

uploaded file can not be found #443

Open liam1985 opened 6 days ago

liam1985 commented 6 days ago

Describe the bug I try to upload an excel to calcuate its line number. The file uploaded is not found, when the code generated by the code generator is executed. I added print statements within code in order to trace the problem, and I found the file is saved in the path "/data/opensource/TaskWeaver/project/workspace/sessions/20241119-110543-c97f547c/cwd/unfold_users_sft_answer_0.xlsx". But the output from the planner believe the excel is under the path "files/unfold_users_sft_answer_0.xlsx".

Screenshots Image Image Image

Environment Information (please complete the following information):

liqul commented 6 days ago

Image Image

I was trying to reproduce your issue, but the agent seemed work as expected. Could you try again to see if the agent always haullucinate a wrong file path? In the prompt, the agent is asked to load a file given its name as we have put it under the current working directory. The LLM is responsible to generate the right code to load the file. But from your screenshots, the LLM didn't read the file from CWD, but got a wrong file path instead.