File size: 917 Bytes
b193600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: ResearchPilot API
emoji: 🔬
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
---

# ResearchPilot API

Production RAG system for ML research paper Q&A, powered by:
- **Retrieval**: Hybrid (Qdrant dense + BM25 sparse) with cross-encoder reranking
- **Generation**: Groq LLaMA-3.3-70B with streaming support
- **Embedding**: BAAI/bge-base-en-v1.5

## Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/health` | Health check + system status |
| POST | `/query` | Standard (non-streaming) RAG query |
| POST | `/query/stream` | Streaming SSE RAG query |
| POST | `/feedback` | Submit user feedback |
| GET | `/docs` | Swagger UI |

## Environment Variables Required

Set these in your Space **Settings → Repository Secrets**:

- `GROQ_API_KEY` — Groq API key for LLM generation
- `HF_API_KEY` — HuggingFace API key (for future model fallback)