How leoxramadani/ragapidotnet works
LangVector is a document-grounded RAG API. Its main workflow accepts document uploads, extracts and chunks text, embeds and indexes it, then retrieves relevant chunks to generate cited answers. It also exposes document management and an evaluation workflow for retrieval, guardrails, and answer faithfulness. The source excerpts show most ingestion and retrieval calls; evaluation-controller routing and some question-controller details are supported by the source index, while other relationships are left out where evidence is limited.
Main entry points: RagService.cs RAG orchestration · IngestionService.cs Ingestion · EvaluationService.cs Evaluation · VectorStoreService.cs Vector store
Components 16
API endpoints
- Documents API
Controllers/DocumentsController.cs - Questions API
Controllers/QuestionsController.cs - Evaluation API
Controllers/EvaluationController.cs
Document ingestion
- Ingestion
Services/IngestionService.cs - Text extraction
Services/DocumentTextExtractor.cs - Text splitting
Services/RecursiveTextSplitter.cs
Question answering
- RAG orchestration
Services/RagService.cs - RAG prompts
Services/RagPrompts.cs
RAG evaluation
- Evaluation
Services/EvaluationService.cs
Models and integrations
- Embeddings
Services/EmbeddingService.cs - Vector store
Services/VectorStoreService.cs - API and domain models
Models/Models.cs - Service options
Options/Options.cs
Other components
- API client
- Qdrant
- OpenAI API
Connections 27
- API client → Documents API: uploads and manages
Controllers/DocumentsController.cs - API client → Questions API: asks questions
- API client → Evaluation API: submits evaluations
- Documents API → Ingestion: ingests uploads
Controllers/DocumentsController.cs - Documents API → Vector store: lists and deletes
Controllers/DocumentsController.cs - Ingestion → Text extraction: extracts text
Services/IngestionService.cs - Ingestion → Text splitting: splits text
Services/IngestionService.cs - Ingestion → Embeddings: embeds chunks
Services/IngestionService.cs - Ingestion → Vector store: writes chunks
Services/IngestionService.cs - Text extraction → API and domain models: returns extracted data
Services/DocumentTextExtractor.cs - Embeddings → OpenAI API: requests vectors
Services/EmbeddingService.cs - Vector store → Qdrant: reads and writes
Services/VectorStoreService.cs - Questions API → RAG orchestration: answers questions
Controllers/QuestionsController.cs - RAG orchestration → Vector store: checks and searches
Services/RagService.cs - RAG orchestration → Embeddings: embeds question
Services/RagService.cs - RAG orchestration → RAG prompts: builds prompt
Services/RagService.cs - RAG orchestration → OpenAI API: generates answer
Services/RagService.cs - Evaluation API → Evaluation: runs evaluation
Controllers/EvaluationController.cs - Evaluation → RAG orchestration: retrieves and generates
Services/EvaluationService.cs - Evaluation → OpenAI API: judges faithfulness
Services/EvaluationService.cs - Documents API → API and domain models: uses request and response
Controllers/DocumentsController.cs - RAG orchestration → API and domain models: returns answer data
Services/RagService.cs - Evaluation → API and domain models: returns report
Services/EvaluationService.cs - Embeddings → Service options: configures model
Services/EmbeddingService.cs - Vector store → Service options: configures collection
Services/VectorStoreService.cs - RAG orchestration → Service options: configures retrieval
Services/RagService.cs - Evaluation → Service options: configures judge
Services/EvaluationService.cs