Skip to main content

Generate ideal question-answer dataset for testing your LLM.

Project description

FiddleCube - Generate ideal question-answers for testing RAG

FiddleCube generates an ideal question-answer dataset for testing your LLM. Run tests on this dataset before pushing any prompt or RAG upgrades.
Jump to: Ensuring diversity and correctness

Quickstart

Install FiddleCube

pip3 install fiddlecube

Register

Run

fiddlecube register

Follow the steps to get an API key.

Usage

from fiddlecube import FiddleCube

fc = FiddleCube(api_key="<api-key>")
dataset = fc.generate(
    [
        "The cat did not want to be petted.",
        "The cat was not happy with the owner's behavior.",
    ],
    10,
)
dataset
{
   "results":[
      {
         "query":"Question: Why did the cat not want to be petted?",
         "contexts":[
            "The cat did not want to be petted."
         ],
         "answer":"The cat did not want to be petted because it was not in the mood for physical affection at that moment.",
         "score":0.8,
         "question_type":"SIMPLE"
      },
      {
         "query":"Was the cat pleased with the owner's actions?",
         "contexts":[
            "The cat was not happy with the owner's behavior."
         ],
         "answer":"No, the cat was not pleased with the owner's actions.",
         "score":0.8,
         "question_type":"NEGATIVE"
      }
   ],
   "status":"COMPLETED",
   "num_tokens_generated":44,
   "rate_limited":false
}

Ensuring diversity and correctness

  • The questions are spread across the vector embeddings to ensure completeness of testing.
  • The queries and responses are evaluated for correctness and context relevancy.
  • Citations to the database context are maintained for ease of testing and auditing.

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

fiddlecube-0.1.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

fiddlecube-0.1.2-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file fiddlecube-0.1.2.tar.gz.

File metadata

  • Download URL: fiddlecube-0.1.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.3.0

File hashes

Hashes for fiddlecube-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eb4f793a178cf056b3f6d2f2446f69513c84e3560a7a77373eef0d4835905c45
MD5 96ad6e2df1943d45b096277d19e8c98b
BLAKE2b-256 cb8957b219b9e2fb7162d05bcd2b0b1898c7f10c46903b1593a36b2fbd1e8130

See more details on using hashes here.

File details

Details for the file fiddlecube-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fiddlecube-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.3.0

File hashes

Hashes for fiddlecube-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec8c9460f575d4fa62646f449181d0294885dc37be3df042b7f5996a31c64746
MD5 976dd06b0ee8cb1ab8727faeb8f06946
BLAKE2b-256 1905dacc4b655f61085939bfdfc871f23f34291429922bc1a9769cb97d6e95fc

See more details on using hashes here.

Supported by

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