Code Monkey home page Code Monkey logo

Comments (8)

typpo avatar typpo commented on June 12, 2024 1

Thanks, very helpful! It looks like Claude v2 may be returning a different format from expected. The client-side error occurs because the score value is null.

I'll handle the client side error so it doesn't crash the page, but this will also require an update to the Bedrock provider code.

from promptfoo.

typpo avatar typpo commented on June 12, 2024 1

One potentially temporary workaround is to add a transform directive to your test cases to unpack the nested completion value in the Claude response. That would look something like this:

defaultTest:
  options:
    transform: JSON.parse(output).completion

from promptfoo.

typpo avatar typpo commented on June 12, 2024 1

from promptfoo.

typpo avatar typpo commented on June 12, 2024

Are you able to share the contents of ~/.promptfoo/output/latest.json? That will help me troubleshoot, as I don't have access to the claude-v2 model on bedrock.

from promptfoo.

sahellebusch avatar sahellebusch commented on June 12, 2024

Sure!
latest.json

from promptfoo.

sahellebusch avatar sahellebusch commented on June 12, 2024

Thanks a lot @typpo!

from promptfoo.

sahellebusch avatar sahellebusch commented on June 12, 2024

Unfortunately, the transform didn't work.

    │ [FAIL] SyntaxError: Unexpected token o in JSON                     │ [FAIL] SyntaxError: Unexpected token o in JSON                     │
│                                                                    │ at position 1                                                      │ at position 1                                                      │
│                                                                    │                                                                    │                                                                    │
│                                                                    │ SyntaxError: Unexpected token o in JSON at position 1              │ SyntaxError: Unexpected token o in JSON at position 1              │
│                                                                    │ m                                                                  │ m                                                                  │
│                                                                    │     at JSON.parse (<anonymous>)                                    │     at JSON.parse (<anonymous>)                                    │
│                                                                    │     at eval (eval at transformOutput (/Users/sean.hellebu          │     at eval (eval at transformOutput (/Users/sean.hellebu          │
│                                                                    │ sch/.npm/_npx/81bbc6515d992ace/node_modules/promp...               │ sch/.npm/_npx/81bbc6515d992ace/node_modules/promp...

from promptfoo.

typpo avatar typpo commented on June 12, 2024

Sorry, it's been a while and I still don't have access to Claude 2.1 on Bedrock. However, I think I noticed the issue in code (a030796). The fix should be out in 0.43.1, and as a temporarily workaround I believe you can disable the cache (promptfoo eval --no-cache)

from promptfoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.