Skip to content

Multiple token amount fields confusing Claude #8

@shootinputin007

Description

@shootinputin007

Claude hallucinates wrong amounts and decimal spaces even though the Tenderly object contains precise amounts under assets_changed object.

However, the Tenderly object also contains other data containing the amounts without added decimals- specifically, the decoded inputs and outputs for various function calls. It could be that Claude looks at these amounts without decimals and includes them in the explanation with arbitrarily chosen decimals, while ignoring the assets_changed object with correct decimals.

Example transaction:

Proposed solutions:

  1. Augmenting the system prompt to be more specific about
    where to look for the transfer amounts by directing it to the
    assets_changed object specifically;
  2. Alternatively, add a) a Python parser that will update the amounts without decimals present in decoded inputs and outputs of function calls, to ones that are present in assets_changed object; or, b) a Python function that will automatically map the token address with decimals used and apply them to the amounts in decoded function inputs and outputs.
  3. Since the hallucinations are likely caused by too many data fields that are similar, if possible, it could be helpful to condense the data further.

Note: Switching to better model doesn't necessarily solve the problem

Frequency: High
Severity: High

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions