Skip to main content

RagBuilder is a toolkit designed to help you create optimal Production-ready Retrieval-Augmented Generation (RAG) pipeline for your data

Project description

RagBuilder

RagBuilder is a toolkit designed to help you create optimal Production-ready Retrieval-Augmented Generation (RAG) pipeline for your data. Ragbuilder iterates through all possibile combinations of RAG parameters (Eg: chunking strategy: semantic, character etc.; chunk size 1000, 2000 etc.), and evaluates them against a test data set, and provides a dashboard for reviewing what parameter values work best for your source data. RagBuilder also includes several pre-defined state-of-the-art RAG templates that have shown strong performance across various other datasets.

Table of Contents

Features

  • Pre-defined RAG Templates: Use state-of-the-art templates that have demonstrated strong performance across various datasets.
  • Custom RAG Configurations: Create configurations from granular parameters like chunking strategy, chunking size, embedding models, retriever types etc.
  • Evaluation Dataset Options: Choose to generate a synthetic test dataset or provide your own.
  • Automatic Reuse: Automatically re-uses previously generated synthetic test data when applicable.
  • Easy-to-use Interface: Intuitive UI to guide you through setting up, configuring, and reviewing your RAG configurations.

Installation

Install using pip:

pip install ragbuilder

Set your OpenAI API key

Make sure your OpenAI API key is available by setting it as an environment variable. In MacOS and Linux, this is the command:

export OPENAI_API_KEY=XXXXX

and on Windows it is

set OPENAI_API_KEY=XXXXX

Quickstart Guide

Now, run ragbuilder on your command line:

ragbuilder

This will start the Ragbuilder Flask app and open the browser. If the browser window doesn't open automatically, go to http://localhost:8001/ in your browser to access the RagBuilder dashboard.

  1. Click New Project to start building your RAG.
  2. Description: Describe your use-case. Let's specify "Q&A Chatbot" as the description for our demo.
  3. Source Data: Specify the path to your source data. This could be a URL, local directory or local file path. For the sake of our demo, let's specify the URL: https://lilianweng.github.io/posts/2023-06-23-agent/
  4. Select Ragbuilder options:
    • Use Pre-defined RAG Templates - When selected, this'll include pre-defined RAG configuration templates that have demonstrated strong performance across various datasets and related use-cases. These templates will be evaluated against your data, providing you with performance metrics for each pre-defined configuration.
    • Create Custom RAG Configurations - When selected, this'll generate multiple RAG configurations based on detailed parameters like chunking strategy, chunking size, embedding model, retriever type etc. This option may yield hundreds or even thousands of unique configurations to compare, offering a comprehensive performance analysis tailored to your dataset. [Note]: This may take several minutes to complete.
  5. Next, in order to tailor your RAG configurations, you can unselect any specific options you wish to exclude (For eg: Unselecting "Chunking Strategy: Character" will exclude all RAG configurations that have the CharacterTextSplitter). For best results, you may want to leave all settings unchanged. But for our Quickstart demo, we will unselect everything except the below:
    • Chunking strategy: Markdown
    • Embedding model: text-embedding-3-large
    • Retriever: Vector DB - Similarity Search
    • Top k: 5
    • LLM: GPT-3.5 Turbo
  6. Next, in Evaluation dataset options, you have the option to:
    • Use Existing Synthetic Test Data: If synthetic test data was previously generated for your dataset, this option will appear alongside the path of the existing test data.
    • Generate Synthetic Test Data from My Dataset: Create a new synthetic test dataset based on your existing data.
    • Provide a Manually Created Test Dataset: Use your own test dataset file (CSV format with "question" and "ground_truth" columns). For our demo, let's go ahead and create a synthetic test data by selecting the Generate Synthetic Test Data** option.
  7. Before running the tool, let's review all your selections:
  8. Review all the selections and click Confirm
  9. After processing we should see the dashboard with the results.

License

This project is licensed under the Apache License - see the LICENSE file for details.


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

ragbuilder-0.0.2.tar.gz (117.3 kB view details)

Uploaded Source

Built Distribution

ragbuilder-0.0.2-py3-none-any.whl (67.4 kB view details)

Uploaded Python 3

File details

Details for the file ragbuilder-0.0.2.tar.gz.

File metadata

  • Download URL: ragbuilder-0.0.2.tar.gz
  • Upload date:
  • Size: 117.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for ragbuilder-0.0.2.tar.gz
Algorithm Hash digest
SHA256 aae84a2005a6c2d3b17aa6ce7d778bfacfc8dcb9e45c1128ff2c1b4865b78543
MD5 d45aa429c51868236f5e4a80ba6faee9
BLAKE2b-256 6a877bf41bf1cebd837ff20e7bc6e67800dbc8ac3fbe993ab30c324711fec017

See more details on using hashes here.

File details

Details for the file ragbuilder-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ragbuilder-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 67.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for ragbuilder-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26c9d7a7fd74c649f6d88a7635eabe0b8e72e1e72b0d1739c83ec2527f34de39
MD5 66b74a8361d92f07c2e876c1bf2a7b56
BLAKE2b-256 d7935fc7343daa2f504ce1ad459ef215c6f5400333292e91af74de5ac527fef5

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