lex-rag-builder

Construct RAG pipelines for Brazilian legal documents with vector stores.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/fbmoulin/lex-intelligentia-skills --skill lex-rag-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lex-rag-builder
Source: https://github.com/fbmoulin/lex-intelligentia-skills/tree/main/skills/automacao/lex-rag-builder
Command: npx skills add https://github.com/fbmoulin/lex-intelligentia-skills --skill lex-rag-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges of building effective Retrieval-Augmented Generation (RAG) systems specifically for Brazilian legal documents, ensuring accuracy and relevance in AI-driven legal research and knowledge management.

Core Features & Use Cases

  • Specialized Chunking: Implements strategies for parsing legal documents like court decisions and legislation.
  • Vector Store Configuration: Provides examples for Qdrant and Supabase pgvector.
  • Embedding Model Selection: Recommends and ranks embedding models suitable for Portuguese legal text.
  • Query Reformulation: Enhances search recall with legal-specific term expansion.
  • RAG Evaluation: Outlines metrics for assessing RAG quality in a legal context.
  • Use Case: You need to build a knowledge base for an AI assistant that can answer questions about Brazilian civil law using a collection of court rulings and statutes. This skill will guide you through setting up the data ingestion, vector storage, and retrieval process.

Quick Start

Use the lex-rag-builder skill to set up a Qdrant vector store for Brazilian legal documents.

Frequently Asked Questions about lex-rag-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline for Brazilian legal documents?

Building a RAG pipeline for Brazilian legal documents requires specialized chunking for court decisions, embedding strategies for legal terminology, and vector store configuration. This skill guides you through data ingestion and retrieval optimization for jurisprudence and legislation.

What is the best way to chunk legal texts for semantic search?

Chunking legal texts for semantic search requires implementing parsing strategies specifically designed for legal document structures like court decisions and legislation, ensuring context is preserved during embedding and retrieval.

Does the lex-rag-builder skill work with Supabase pgvector and Qdrant?

Yes, this skill works with Supabase pgvector and Qdrant, providing specific configuration examples for setting up vector stores to manage and retrieve your legal text embeddings.

How do I optimize embeddings for Portuguese legal terminology?

Optimizing embeddings for Portuguese legal terminology involves selecting recommended and ranked embedding models tailored for Portuguese legal text, ensuring accurate semantic search across jurisprudence and doctrine.

Can I improve legal query recall using query reformulation?

Yes, you can improve legal query recall using query reformulation by applying legal-specific term expansion, which enhances search recall by capturing diverse legal phrasing across your documents.

What metrics are used for RAG evaluation in a legal context?

RAG evaluation in a legal context uses specific metrics outlined to assess retrieval quality and accuracy, ensuring the system correctly surfaces relevant statutes and court rulings for your queries.