- Next.js (App Router)
- React
- TypeScript
- Tailwind CSS
- Lightweight local UI components
- Python
- FastAPI
- Pydantic (request/response models)
- SQLAlchemy (ORM)
- Alembic (migrations; likely added later)
- PostgreSQL
- pgvector (vector column + similarity search)
- Embeddings provider: OpenAI embeddings (
text-embedding-3-small) - Chunking: server-side utilities to split text into retrieval-friendly segments
- Retrieval: pgvector similarity search (cosine similarity, top-K, optional source filtering)
- Modes: retrieval-only chunk inspection and grounded answer generation
- Grounding format: answer + sources (retrieved chunk references)
- Docker Compose (PostgreSQL + pgvector, backend, frontend)
- Makefile or npm scripts (optional convenience; add later if useful)
- Provider-agnostic design to support:
- Local embeddings/LLMs (e.g., via Ollama) as a future extension
- Python has the strongest ecosystem for embeddings, chunking, and evaluation tooling
- FastAPI is lightweight, fast to iterate on, and encourages typed, well-defined APIs
- Clear separation between web/API concerns and RAG domain logic keeps the project reviewable