RFI RAG API

Retrieval-Augmented Generation System for RFI Building and Selection

📚 API Documentation

Access the interactive API documentation using the links below:

Swagger UI

Interactive API documentation with built-in testing capabilities

Open Swagger UI

ReDoc

Alternative documentation interface with a clean, responsive design

Open ReDoc

OpenAPI Specification

Download the OpenAPI specification in different formats

JSON Format YAML Format

🚀 Quick Start

Getting Started

Follow these steps to get started with the RFI RAG API:

  1. Setup Vector Store: Call POST /setup to initialize the vector database
  2. Ingest Documents: Call POST /ingest to process your knowledgebase
  3. Query the System: Use POST /query to ask questions
  4. Upload New Documents: Use POST /upload or the web interface

🔧 API Endpoints

POST /query

Query the RAG system with natural language questions

/query

POST /upload

Upload and process document files (PDF, DOCX, TXT)

/upload

GET /statistics

Get system statistics and document counts

/statistics

GET /folders

Get available folders in the knowledgebase

/folders

POST /setup

Initialize the vector store schema

/setup

POST /ingest

Ingest documents from the knowledgebase

/ingest

✨ Features

📄

Multi-format Support

PDF, DOCX, TXT, and MD files

🧠

Intelligent Chunking

Smart text segmentation for better retrieval

🔍

Vector Search

Semantic search using Weaviate database

🤖

LLM Integration

Contextual responses using OpenAI or Gemini

📁

Folder Organization

Filter queries by specific folders

🌐

Web Interface

Easy document upload and management

📖 Usage Examples

Query the System

curl -X POST "http://localhost:8000/query" \
     -H "Content-Type: application/json" \
     -d '{"question": "What are the electrical requirements?", "folder_filter": "electrical"}'

Upload a Document

curl -X POST "http://localhost:8000/upload" \
     -F "file=@document.pdf" \
     -F "folder=electrical"

Get Statistics

curl "http://localhost:8000/statistics"