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

Results in tabular format are truncated #390

Open Haxeebraja opened 3 months ago

Haxeebraja commented 3 months ago

When results are printed in tabular format they get truncated from the middle with dots. Possibly pd.set_option('display.max_rows', 500) is not set. TaskWeaver imports pandas library every time a question is asked. How can I configure it to print atleast 100 rows in output?

liqul commented 3 months ago

This is intentional to shorten the output of the code, which is submitted to the LLM in the prompt. A too long display of the output my overwhelm the context window. But if you really want to change the display settings, you can find them here.

Haxeebraja commented 3 months ago

I am using llama3.1 70B and Code Executor imports pandas library in code on each prompt. So it is not using options executor.py as library is being initialized each time. Is there any other way to set this option? Or simply prompt the LLM to stop importing library at runtime with each prompt.

liqul commented 2 months ago

I believe it is already in the prompt asking the model not to re-import the lib every time. However, this is not a reliable way of achieving this.