This is a minimal demonstration of a Retrieval-Augmented Generation (RAG) API using FastAPI.
-
Install dependencies:
pip install -r requirements.txt
-
Run the FastAPI app:
uvicorn spectral_rag_demo:app --reload
-
Open your browser at http://127.0.0.1:8000/docs to access the interactive API docs.
Send a POST request to /rag with a JSON body:
{
"query": "spectral methods",
"top_k": 2
}The response will include retrieved documents and a generated answer (concatenation of retrieved docs).