Guide

RAG Setup

Build a simple retrieval pipeline that embeds documents, indexes vectors, and injects top-k context into CLEX chat completions.

1. Chunk documents and create embeddings for each chunk.

2. Store vectors in your preferred database with metadata.

3. At query time, embed the user prompt and fetch top-k chunks.

4. Compose a grounded prompt and stream final response from a chat model.

Back to Docs