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

API Key

Get the API key here.

Usage

Generate the Dataset

from fiddlecube import FiddleCube

fc = FiddleCube(api_key="<api-key>")
dataset = fc.generate(
    [
        "Wheat is mainly grown in the midlands and highlands of Ethiopia.",
        "Wheat covers most of the country's agricultural land next to teff, corn and sorghum and in the 2009/10 crop season 1.69 million hectares were covered by wheat crops",
        "46.42 million quintals of production was obtained and the average yield was 26.75 quintals per hectare.",
        "Bread wheat (Triticum aestivum L) and durum wheat (Triticum turgidum var durum L) are the types of wheat that are mainly produced in our country, and durum wheat is one of the native wheat crops.",
        "Ethiopia is known to be the primary source of durum wheat and a source of its biodiversity.",
        "Durum wheat is grown in high and medium altitude areas and clay and light soils, and its industrial demand is increasing from time to time.",
    ], # data chunks
    3, # number of rows to generate
)

Diagnose your data generated

from fiddlecube import FiddleCube
fc = FiddleCube(api_key="<api-key>")
result = fc.diagnose(
    [{
        "query": "Can you explain supply and demand with an example?",
        "answer": "Supply and demand is a fundamental economic principle. For instance, consider concert tickets. If a popular band announces a show, demand for tickets is high. Initially, supply is limited, so prices are high. As the concert date approaches, if tickets remain unsold, prices might drop to increase demand. Conversely, if demand outstrips supply, prices may rise further.",
        "prompt": "Explain the concept of supply and demand in economics using a real-world example. Your answer should be between 50-75 words",
        "context": [
            "The evolution of the music industry, much like any other industry, is a story of innovation, disruption, and adaptation. From the early days of sound recording to the streaming age, how we consume and engage with music have transformed profoundly, often reflecting broader societal shifts in technology, culture, and economy. The invention of the phonograph by Thomas Edison in 1877 marked the beginning of a new era for music. Before this, music was primarily experienced live, at concerts, dance halls, or in homes. The phonograph allowed sound to be captured, stored, and replayed, giving birth to the recorded music industry. Initially, these recordings were made on wax cylinders. However, by the 20th century, flat disc records made of shellac began to dominate, paving the way for what would be commonly known as vinyl records."
        ]
    }]
)

Ideal QnA datasets for testing, eval and training LLMs

Testing, evaluation or training LLMs requires an ideal QnA dataset aka the golden dataset.

This dataset needs to be diverse, covering a wide range of queries with accurate responses.

Creating such a dataset takes significant manual effort.

As the prompt or RAG contexts are updated, which is nearly all the time for early applications, the dataset needs to be updated to match.

FiddleCube generates ideal QnA from vector embeddings

  • The questions cover the entire RAG knowledge corpus.
  • Complex reasoning, safety alignment and 5 other question types are generated.
  • Filtered for correctness, context relevance and style.
  • Auto-updated with prompt and RAG updates.

Roadmap

  • Question-answers, complex reasoning from RAG
  • Multi-turn conversations
  • Evaluation Setup - Integrate metrics
  • CI setup - Run as part of CI/CD pipeline
  • Diagnose failures - step-by-step analysis of failed queries

More Questions?

Book a demo
Contact us at founders@fiddlecube.ai for any feature requests, feedback or questions.

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

Uploaded Source

Built Distribution

fiddlecube-0.1.9-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fiddlecube-0.1.9.tar.gz
  • Upload date:
  • Size: 3.4 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.9.tar.gz
Algorithm Hash digest
SHA256 0415bee8265cda2bc1c52a2883840fc45ffdc15068946e3baa39a771db549749
MD5 4e8f211cb643db427302759d9b23bb0b
BLAKE2b-256 6a40138c8ffcbf88fe8993221e637c5b2cb695452c23fd1e731feb78e3f3a0a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fiddlecube-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 052237bdc38a2656bcdfa4a4973d68447d9e225183dbb5af8f960eb2479d7353
MD5 1f33c21a4f185e609f927a9034c94276
BLAKE2b-256 3d398d76e36f0183699fbaf6786ca06d87d7d63b05bd5d9f589b9b1353733edf

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