使用Python代理在本地模型上运行数据分析
Run data analysis with a Python agent on a local model
一位评论者表示LangChain的create_python_agent与Nous Hermes模型在数据分析方面表现相当不错.
做了什么
The thread is very thin: the original poster asked about using Llama 2 with LangChain to analyze a CSV, after finding LangChain’s pandas-capable Python agent worked well with OpenAI models but poorly with a quantized 7B Llama. In replies, the same user said to use LangChain’s create_python_agent instead of the pandas agent, and said it worked reasonably well with the nous-hermes-llama2 13B model.
效果如何
The only reported outcome is qualitative: the quantized 7B Llama gave disappointing results, while create_python_agent with Hermes/Nous Llama 2 13B worked reasonably well. The thread gives no example task, metrics, or failure details.
值得注意
The main catch is that the source does not include a workflow, prompt, or benchmark; it only names create_python_agent and the Nous Hermes Llama 2 13B model.
试试这个 Prompt
I have a dataset at [path to CSV or data file] and I want to understand [question, e.g. which products drive the most revenue by month]. Load the file, check for missing or odd values, then run the analysis by writing and executing Python code, showing me the code and results at each step. Finish with a short plain-language summary of the findings and one chart saved to [output folder]. Do not modify or delete the original data file.