Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return incorrect result for incorrect input #1225

Open
ssling0817 opened this issue Jun 11, 2024 · 2 comments
Open

Return incorrect result for incorrect input #1225

ssling0817 opened this issue Jun 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ssling0817
Copy link

System Info

pandasai version 2.1

馃悰 Describe the bug

The table has a column "reporter" which includes a name kevin. I input question which query kevib but it returns kevin's result. The prompt pandasai generated is wrong as it automatically changes my query to the value in the table. How to solve this issue?

@dosubot dosubot bot added the bug Something isn't working label Jun 11, 2024
Copy link

dosubot bot commented Jun 11, 2024

To prevent pandasai from automatically changing your query "kevib" to match the value "kevin" in the table, you can disable the error correction framework. This can be done by setting the use_error_correction_framework property to False.

Here is how you can do it:

# Assuming you have already created a SmartDatalake or SmartDataframe instance named `df`
df.use_error_correction_framework = False

This will prevent the automatic correction of your query terms [1].

To continue talking to Dosu, mention @dosu.

@ssling0817
Copy link
Author

ssling0817 commented Jun 11, 2024

I have already set it to false.

agent = Agent(connector, config={"llm": ollama_llm, "enable_cache": False, "custom_whitelisted_dependencies": ["calendar", "dateutil"], "use_error_correction_framework": False})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant