Why Am I Getting Different Results from Claude 3.5 on AWS Versus Locally?

0
20
Asked By CuriousExplorer85 On

I've got a script that extracts tables from Excel files and sends them to Claude 3.5 via AWS Bedrock for classification, along with a prompt. After moving my script to AWS, I'm noticing that one specific table gets classified incorrectly, while all others classify correctly. The script, model, temperature, tokens, original file, and prompt all remain unchanged. However, when I run the same file locally, I get the right classifications consistently. It's puzzling because the incorrect classification remains the same on AWS every time I run it. I'm trying to understand why I'm seeing these discrepancies. Could it be that the way the prompts are handled is different on AWS? Or maybe there's an issue with how the table is processed on AWS compared to my local setup? I'm converting the tables to a DataFrame and then to a string representation, ensuring to maintain structure with the following code: table_str = df_to_process.to_markdown(index=False, tablefmt="pipe").

3 Answers

Answered By TechEnthusiast42 On

When you mentioned moving the script to AWS, are you using Lambda for that? If so, that might affect how your script handles data compared to local execution. It could also help to double-check which version of the Claude model you are using; Claude 3.5 is relatively old and may not function the same way across different platforms. Have you also considered how data types might differ when read in AWS versus locally?

Answered By DataDude90 On

Are you utilizing the InvokeModel or Converse API for your requests? The method you choose can impact performance and results. If you're unsure of the differences, that might also be something to explore.

Answered By SolutionSeeker12 On

I think I found the issue! I was using certain symbols in my prompt like "✓", "✗", and "→". When running in Lambda, those symbols were parsed correctly, but locally, they weren't. So my local script was actually incorrect but produced the right classification by chance!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.