Skip to content

Agent Generates Hallucinated Code and Deviates from Provided File Data #16

@Muhammad-Ahsan-Rasheed

Description

@Muhammad-Ahsan-Rasheed

The project is set up using the Ollama framework with the search and vector database functionalities disabled. The goal is to get responses strictly from the provided file (Large Dataset). However, after assigning the file to the Data Analysis agent, the agent generates code with made-up dataframes and deviates from the expected goal of analyzing the provided data file.

Even after providing clear and precise prompts, the agent continues to hallucinate, making up variables and data structures that do not exist in the context of the provided file.

Steps to Reproduce:

  1. Set up the project using Ollama, disabling search and vector database.
  2. Assign a data file to the Data Analysis agent.
  3. Provide a clear prompt expecting the analysis of the file's content.
  4. Observe the agent's behavior as it generates code involving made-up dataframes and unrelated data structures.

Expected Behavior:
The Data Analysis agent should strictly adhere to the provided file's data and perform analysis only on the file without hallucinating or creating made-up variables.

Actual Behavior:
The agent generates analysis code that includes made-up dataframes and variables that deviate from the provided file, despite clear prompts.

Suggested Fix:
Improve the prompt-to-code parsing so that the agent strictly focuses on the provided file’s content and refrains from creating any hallucinated or irrelevant dataframes/variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions