Build Intelligent Applications with SmartRAG
The most powerful .NET library for document processing and AI-powered conversations. Upload your documents and chat with them using artificial intelligence.
// Add SmartRAG to your project
services.UseSmartRag(configuration,
storageProvider: StorageProvider.InMemory,
aiProvider: AIProvider.Gemini
);
// Upload and process documents
var document = await documentService
.UploadDocumentAsync(fileStream, fileName, contentType, "user123");
// Chat with your documents using AI
var answer = await documentSearchService
.GenerateRagAnswerAsync("What is this document about?", maxResults: 5);
Get Started in Minutes
Follow these simple steps to upload documents and chat with them using AI
Install Package
Add SmartRAG NuGet package to your project
Configure Services
Set up AI and storage providers in your startup
Start Building
Upload documents and chat with them using AI
// Program.cs
services.UseSmartRag(configuration,
storageProvider: StorageProvider.InMemory,
aiProvider: AIProvider.Gemini
);
// Or with custom options
services.AddSmartRag(configuration, options =>
{
options.AIProvider = AIProvider.Anthropic;
options.StorageProvider = StorageProvider.Qdrant;
options.MaxChunkSize = 1000;
options.ChunkOverlap = 200;
});
// Upload and process document
var document = await documentService
.UploadDocumentAsync(fileStream, fileName, contentType, "user123");
// Document is automatically processed, chunked, and indexed
// Ready for AI-powered conversations
// Ask questions about your documents
var ragResponse = await documentSearchService
.GenerateRagAnswerAsync("What are the main topics discussed?", maxResults: 5);
// Get AI-generated answer based on document content
Console.WriteLine(ragResponse.Answer);
// Or search for specific information
var results = await documentSearchService
.SearchDocumentsAsync("machine learning algorithms", maxResults: 3);
Key Features
Powerful capabilities for building intelligent applications
AI-Powered
Integrate with leading AI providers for powerful embeddings and intelligent processing.
Multi-Format Support
Process Word, PDF, Excel, and text documents with automatic format detection.
Enhanced Semantic Search
Hybrid scoring (80% semantic + 20% keyword) with context awareness and intelligent ranking.
Flexible Storage
Multiple storage backends for flexible deployment options.
Easy Integration
Simple setup with dependency injection. Get started in minutes.
Smart Query Intent
Automatically routes queries to chat or document search based on intent detection.
Documentation
Everything you need to build with SmartRAG
Ready to Build Something Amazing?
Join thousands of developers using SmartRAG to chat with their documents using AI