Member-only story

2024–11–21 Retrieval-Augmented Generation (RAG) with BuildShip

Girff
6 min readNov 21, 2024

--

Retrieval-Augmented Generation (RAG) is a powerful method that combines document retrieval with text generation, enhancing the quality and relevance of generated content. In a typical RAG setup, documents are chunked into small subsections, and similarity searches are performed over those sections to find the most relevant information.

Starter Templates

To help you get started with RAG, we provide two starter templates. These templates serve as a foundation, and you can customize and extend them as per your requirements.

You can access the RAG using Meilisearch templates from this Remix link(opens in a new tab).

Template 1: Add Document Chunk to Meilisearch

This template allows you to upload a file, which is then processed and stored in BuildShip storage. The steps involved are:

  1. File Upload: Upload a file via the file upload trigger to the path /add-document-chunks using the POST method.
  2. Document Creation: The uploaded file is stored in the files collection in BuildShip storage with metadata, including size, mimeType, encoding, and originalName.
  3. File Storage: The file buffer is saved to BuildShip storage under uploads/${file.id}.
  4. Document Update: The document in the files collection is updated with the download URL of the stored file.

--

--

No responses yet