MVP implementation of a chat interface with automatic groundedness evaluation for PDF-based Q&A.
- Upload PDF documents
- Chat with AI about the PDF content
- Automatic groundedness evaluation of responses
- Improve responses based on evaluation feedback
- Install dependencies:
pip install -r requirements.txt- Create
.envfile:
cp .env.example .env- Add your Anthropic API key to
.env:
ANTHROPIC_API_KEY=your_actual_api_key_here
- Run the application:
python app.py- Open browser to
http://localhost:5000
- Upload a PDF using the upload button
- Ask questions about the PDF content
- View automatic groundedness evaluation in the right panel
- Click "Improve Response" to get a better grounded answer
- Backend: Flask (Python)
- Frontend: Vanilla JavaScript, HTML, CSS
- AI: Anthropic Claude API
- PDF Processing: pypdf