CGIAR/fecb-rag
0
FECB RAG Search App
A RAG (Retrieval-Augmented Generation) application that lets you search and query a collection of PDF documents using semantic AI search, powered by Claude (Anthropic).
Project Structure
FECB/
├── app.py # Gradio web interface
├── ingest.py # PDF ingestion & FAISS index builder
├── requirements.txt
├── pdfs/ # Drop your PDF files here
├── faiss_index/ # Generated by ingest.py (do not edit)
└── metadata.json # Generated by ingest.pySetup
1. Install dependencies
pip install -r requirements.txt2. Add your PDFs
Copy your PDF files into the pdfs/ folder (subdirectories are supported).
3. Build the vector index
python ingest.pyOptions:
--pdf-dir Path to PDF folder (default: pdfs)
--index-dir Where to save the FAISS index (default: faiss_index)
--chunk-size Characters per chunk (default: 800)
--chunk-overlap Overlap between chunks (default: 100)4. Set your Anthropic API key
export ANTHROPIC_API_KEY=sk-ant-...5. Run the app
python app.pyOpen http://localhost:7860 in your browser.
Configuration
All settings can be overridden with environment variables:
