App template. Starter kit.
What It Is
A LlamaIndex-powered chat application that can answer questions about your documents. Upload PDFs, chat with them, get answers with source citations.
Why I Built It
RAG (Retrieval Augmented Generation) was the hot thing in late 2023. Wanted to understand it by building something practical.
Features
- Document upload (PDF, TXT)
- Vector embedding and storage
- Chat interface
- Source citations
- OpenAI integration
Stack: Python, LlamaIndex, OpenAI, Streamlit
Key Learnings
1. RAG is powerful but not magic
Retrieval quality determines answer quality. Garbage chunks = garbage answers. Preprocessing matters.
2. Chunk size is an art
Too small: no context. Too big: irrelevant info. Experimented a lot to find the sweet spot.
3. Citations build trust
Showing where answers come from makes users trust the system more, even if the answer is the same.
4. LlamaIndex simplifies a lot
What would be hundreds of lines of code becomes a few function calls. Good abstractions matter.
Agent Quick Start
# My App
Chat with your documents using RAG.
## Features
- Document upload
- Vector embeddings
- Conversational QA
- Source citations
## Stack
Python, LlamaIndex, OpenAI, Streamlit
## Setup
pip install -r requirements.txt
export OPENAI_API_KEY=...
streamlit run app.py
## Links
- Repo: https://github.com/sergiopesch/my-app