Skip to main content

Robot Framework library for testing LLM-powered applications

Project description

RoboAssay

A Robot Framework keyword library for testing LLM-powered applications.

RoboAssay provides assertion-style keywords that validate LLM responses using Claude as an AI judge. It does not call your application's LLM — that is the responsibility of the test author. You call your LLM, capture the response string, and pass it to RoboAssay, which forwards it to Claude for semantic evaluation against a rubric.

Full documentation →

Installation

pip install robotframework-roboassay

Or install from source:

pip install -e .

Setup

Set your Anthropic API key as an environment variable:

export ANTHROPIC_API_KEY=your-api-key-here

Quick Start

*** Settings ***
Library    RoboAssay

*** Variables ***
${RESPONSE}    Our refund policy allows returns within 30 days of purchase with a full refund.

*** Test Cases ***
Test Response Is Relevant
    Response Should Be Relevant To    ${RESPONSE}    refund policy

Test Response Answers The Question
    Response Should Answer Question    ${RESPONSE}    What is your refund policy?

Keyword Categories

Category Module Keywords
Relevance relevance.py Response Should Be Relevant To, Response Should Answer Question, Response Should Address All Parts
Groundedness groundedness.py Response Should Be Grounded In, Response Should Not Hallucinate, Response Should Not Contradict
Safety safety.py Response Should Refuse, Response Should Not Leak, Response Should Not Contain Harmful Content, Response Should Not Be Wrongly Refused
Persona & Tone persona.py Response Tone Should Match, Response Should Stay In Persona, Response Language Should Be
Instruction Following instruction_following.py Response Should Follow Format, Response Should Respect Topic Boundary, Response Should Comply With
Consistency consistency.py Response Should Not Contradict Itself, Conversation Should Be Consistent, Last Response Should Reference
Regression regression.py Response Should Match Baseline Semantically, Save Response As Baseline, Response Behavior Should Not Have Changed

Multi-Turn Testing

*** Test Cases ***
Test Conversation Consistency
    ${conv}=    Start Conversation
    ${conv}=    Add User Turn     ${conv}    What is your name?
    ${conv}=    Add Assistant Turn    ${conv}    My name is Alex.
    ${conv}=    Add User Turn     ${conv}    What did you say your name was?
    ${conv}=    Add Assistant Turn    ${conv}    My name is Alex, as I mentioned before.
    Conversation Should Be Consistent    ${conv}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_roboassay-1.0.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_roboassay-1.0.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_roboassay-1.0.0.tar.gz.

File metadata

  • Download URL: robotframework_roboassay-1.0.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robotframework_roboassay-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9b06d66a7cc906398a625c6c41deef6d7411d722cfe5771c6787cc62d233ce4b
MD5 db0114a0e6cbd85fa7d779452a80b41c
BLAKE2b-256 58f0c2e45dbdd6f81d83d10a7be2938de5c8139e35eb04d02c96fe6500659740

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_roboassay-1.0.0.tar.gz:

Publisher: publish.yml on xleetsuperhax/RoboAssay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robotframework_roboassay-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_roboassay-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33586daf2a00330f4c9d7eddeb841f08ef75641531537d110a260ec926e8dcab
MD5 f92f2f82ba3562c53d6154ad266ed40a
BLAKE2b-256 9a0762ada6476aefbc60b5affdbab4811a584cfb5942dab05417575653a446f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_roboassay-1.0.0-py3-none-any.whl:

Publisher: publish.yml on xleetsuperhax/RoboAssay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page