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.

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.3.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fiddlecube-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9826ed4d2cf513cde661733029e040949a62ad2602364e26fa3f092b06e66397
MD5 d6f690126086f57cec4172bbbddba971
BLAKE2b-256 a93fa1a2eaae50180ddd7666cfee6dd34049b3054ca63ebdf15335a53bc89128

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fiddlecube-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ffc9da368b82ab4174890e0122638fa283ae788185cae78f7da91613a7a0759
MD5 bdccaa05eea03a17ba730a269a23a05e
BLAKE2b-256 9549ac98b5e919bf7ea461c593478b2583fb7df3a45754b5019ee0e400c5c44f

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