Example Use Case Tutorials

These end-to-end examples serve as tutorials for the usage of RapidFire AI’s API. They use publicly available datasets, models, and code.

For RAG and Context Engineering

We have one use case example each for an all-local model, all-OpenAI, and a hybrid workflow: FiQA RAG Q&A chatbot, SciFact RAG for scientific claim verification, and GSM8K few-shot/context engineering for math reasoning, respectively. This set will expand over time to more examples based on community inputs.

You can also check out RapidFire AI RAG on Google Colab instead of your own machine; it showcases a simplified FiQA RAG Q&A chatbot use case.

For Fine-Tuning and Post-Training

We have one use case example for each supported control flow from HuggingFace TRL: SFT, DPO, and GRPO. This set will expand over time to more examples based on community inputs. The SFT use case has multiple additional variations showcased, including a “lite” version with a fast SLM and multiple FSDP-based versions with larger models that are auto-partitioned across GPUs.

You can also check out RapidFire AI on Google Colab instead of your own machine; it showcases a simplified SFT use case.

Adaptive Search with Optuna

Instead of enumerating configs with grid or random search, you can hand config generation over to Optuna, which samples adaptively and prunes underperforming runs in flight, spending the freed resources on new, better-informed configs. See RFOptuna() on the Multi-Config Specification page. There is one example for each of the two modes.

Multimodal RAG

This example runs RAG over real-world PDFs, parsing text, table, and image elements, summarizing each into embeddable text, offloading the originals to storage, and indexing the summaries in Pinecone. It uses the MMDocIR evaluation dataset and needs the multimodal dependencies from rapidfireai init --multimodal. Also read the Multimodal RAG and Artifact Storage section of the RAG spec page.