How vasiliskou/rag-explorer-eu-law works
This Colab-oriented app lets users configure a retrieval-augmented chat over a sample of Multi-EURLEX EU legal documents. Its workflow loads and chunks documents, builds a selectable embedding/vector-search and LLM configuration, then serves conversational answers through Gradio. The single Python file contains the runtime; unsampled sections are represented only where the README documents capabilities, and those links use the README as evidence.
Main entry points: rag_explorer_–_chat_with_eu_law.py Chain builder
Components 16
Legal document ingest
- Multi-EURLEX dataset
- Dataset loading
rag_explorer_–_chat_with_eu_law.py - Legal documents
rag_explorer_–_chat_with_eu_law.py - Document chunking
rag_explorer_–_chat_with_eu_law.py
RAG pipeline
- Chain builder
rag_explorer_–_chat_with_eu_law.py - Embedding selection
rag_explorer_–_chat_with_eu_law.py - FAISS / Chroma
rag_explorer_–_chat_with_eu_law.py - Semantic retriever
rag_explorer_–_chat_with_eu_law.py - LLM selection
rag_explorer_–_chat_with_eu_law.py - Conversation memory
rag_explorer_–_chat_with_eu_law.py - Conversational RAG chain
rag_explorer_–_chat_with_eu_law.py
Chat interface
- Gradio interface
rag_explorer_–_chat_with_eu_law.py - Chat handlers
rag_explorer_–_chat_with_eu_law.py
External providers
- Embedding providers
- OpenAI / Gemini
Other components
- Legal questioner
Connections 21
- Legal questioner → Gradio interface: asks question
README.md - Gradio interface → Chat handlers: dispatches input
README.md - Multi-EURLEX dataset → Dataset loading: provides records
rag_explorer_–_chat_with_eu_law.py - Dataset loading → Legal documents: wraps entries
rag_explorer_–_chat_with_eu_law.py - Legal documents → Document chunking: splits text
rag_explorer_–_chat_with_eu_law.py - Chat handlers → Chain builder: configures chain
rag_explorer_–_chat_with_eu_law.py - Chain builder → Embedding selection: selects model
rag_explorer_–_chat_with_eu_law.py - Embedding selection → Embedding providers: requests vectors
rag_explorer_–_chat_with_eu_law.py - Chain builder → FAISS / Chroma: indexes chunks
rag_explorer_–_chat_with_eu_law.py - Document chunking → FAISS / Chroma: supplies chunks
rag_explorer_–_chat_with_eu_law.py - Chain builder → Semantic retriever: creates retriever
rag_explorer_–_chat_with_eu_law.py - FAISS / Chroma → Semantic retriever: backs search
rag_explorer_–_chat_with_eu_law.py - Chain builder → LLM selection: selects backend
rag_explorer_–_chat_with_eu_law.py - LLM selection → OpenAI / Gemini: generates answers
rag_explorer_–_chat_with_eu_law.py - Chain builder → Conversation memory: creates memory
rag_explorer_–_chat_with_eu_law.py - Chain builder → Conversational RAG chain: assembles chain
rag_explorer_–_chat_with_eu_law.py - Chat handlers → Conversational RAG chain: invokes chain
rag_explorer_–_chat_with_eu_law.py - Conversational RAG chain → Semantic retriever: retrieves context
rag_explorer_–_chat_with_eu_law.py - Conversational RAG chain → OpenAI / Gemini: produces answer
- Conversational RAG chain → Conversation memory: tracks dialogue
rag_explorer_–_chat_with_eu_law.py - Conversational RAG chain → Chat handlers: returns answer
rag_explorer_–_chat_with_eu_law.py