Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.26.0
metadata
title: SQL Books RAG
emoji: ๐
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 6.6.0
app_file: app.py
pinned: false
๐ SQL Books RAG
A Retrieval-Augmented Generation (RAG) system that answers SQL questions using content from 5 SQL textbooks.
How It Works
- Retrieval โ Your question is embedded using
all-MiniLM-L6-v2and matched against a FAISS index of ~500-word chunks extracted from the books. - Generation โ The top-5 most relevant chunks are fed as context to
Llama 3.1-8Bvia the Groq API to produce a detailed, grounded answer.
Data Sources
| Book | Author |
|---|---|
| Practical SQL: A Beginner's Guide to Storytelling with Data | Anthony DeBarros |
| SQL for Data Scientists | Renee M. Teate |
| SQL for Data Analysis | Cathy Tanimura |
| The Art of SQL | Stรฉphane Faroult |
| Learning SQL: Generate, Manipulate, and Retrieve Data | Alan Beaulieu |
Tech Stack
- Embeddings:
sentence-transformers/all-MiniLM-L6-v2 - Vector Store: FAISS (IndexFlatL2)
- LLM:
Llama 3.1-8B-Instantvia Groq API (free tier) - UI: Gradio