Loading repository data…
Loading repository data…
Muhomorik / repository
AI-powered Q&A over investment fund factsheets (PRIIP/KID documents). Full-stack RAG pipeline with semantic search, natural language answers with source citations, and near-zero hosting costs on Azure free tiers.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
[!NOTE] Microsoft is sunsetting Semantic Kernel in favor of the new Microsoft Agent Framework. Development continues at KanelBulleKapital using the Agent Framework.
A tool that analyzes investment fund factsheets (PRIIP/KID documents), generates relevant questions, and provides answers to common investor queries about fund basics, risk profiles, costs, performance scenarios, and investment terms.
| Feature | Description |
|---|---|
| Semantic Search | Vector embeddings for accurate document retrieval (RAG over PDF factsheets) |
| Function Calling | Structured fund data queries (performance, ownership, categories) via Semantic Kernel plugins |
| Hybrid Answers | LLM autonomously combines RAG + function calling for comprehensive responses |
| Natural Language Q&A | Ask questions, get answers with source citations |
| Low Cost | Free-tier cloud services (OpenAI, Azure SQL, Cosmos DB) |
| Local Processing | Generate embeddings with LM Studio or Ollama |
| Flexible Storage | In-memory (default) or Azure Cosmos DB vector search |
Try it live: Fund Insights
⚠️ Demo Notice: This site runs on free tier resources and may experience downtime when limits are reached. Currently processing 15 of 68 SEB funds.
❄️ Cold Start: The backend runs on Azure App Service free tier — expect ~30s cold start after 1 hour of inactivity.
Supported Languages: All PDF files are in Swedish, but questions can be asked in any language. The AI will respond in the language of your question.
Example PDF: SEB Emerging Marketsfond C USD - Lux.pdf
IMPORTANT: Before implementing any changes, consult Status.md
Instructions for AI assistants:
A low-cost hobby project that enables semantic Q&A over PDF documents. Upload PDFs, generate embeddings locally, and ask questions in natural language.
Key Features:
flowchart LR
subgraph PdfTextExtractor ["PdfTextExtractor (extraction)"]
PDF[PDF Files] --> PTE[PdfTextExtractor]
PTE -->|native| PDFPIG[PdfPig]
PTE -.->|OCR| LMS[LM Studio / OpenAI]
PTE --> TXT[Text Files]
end
subgraph Preprocessor ["Preprocessor (embedding)"]
TXT --> PRE[Preprocessor]
PRE --> EMB[embeddings.json]
PRE -.->|local| LOCAL[Ollama / LM Studio]
PRE -.->|cloud| OAI_EMB[OpenAI Embeddings]
end
subgraph YieldRaccoon ["YieldRaccoon (data collection)"]
YR[YieldRaccoon] -->|WebView2| FP[Fund Provider]
YR --> DB[(SQLite\nFundProfile, FundHistoryRecord,\nCountry, Sector,\nFundCountryAllocation, FundSectorAllocation)]
YR -.->|DualWrite| API
end
subgraph Runtime ["Backend + Frontend (retrieval & generation)"]
FE[Frontend] --> API[Backend API]
EMB -->|default| API
COSMOS[(Cosmos DB)] -.->|optional| API
AZSQL[(Azure SQL)] -.->|optional| API
API -->|RAG + Function Calling| OAI[OpenAI API]
API -.->|LLM alt| GROQ[Groq API]
end
| Component | Tech Stack | Description |
|---|---|---|
| PdfTextExtractor | .NET 9, PdfPig, LM Studio, OpenAI | PDF text extraction library with native + OCR support |
| Preprocessor | .NET 9, Semantic Kernel | Read pre-extracted text files, generate embeddings (file or Cosmos DB) |
| Backend | ASP.NET Core 9, Semantic Kernel 1.68, Azure SQL | RAG over PDF documents + function calling over structured fund data (FundDataPlugin) |
| Frontend | Next.js 16, React 19, TypeScript, shadcn/ui | Chat interface with dark/light theme |
| YieldRaccoon | .NET 9, WPF, EF Core, Rx.NET, WebView2 | Fund data crawler with cloud sync, data/statistics export, and privacy filter |
| Requirement | Version | Notes |
|---|---|---|
| .NET SDK | 9.0+ | Download |
| Node.js | 18+ | Download |
| LM Studio or Ollama | Latest | For local embedding generation |
| OpenAI API Key | - | Get key (required) |
| Groq API Key | - | Get free key (optional alternative) |
Configuration: See Configuration & Secrets Guide for complete setup instructions.
cd PdfTextExtractor
dotnet run --project PdfTextExtractor.Wpf
# Use the WPF GUI to extract text files from your PDFs
See PdfTextExtractor README for CLI and API usage.
cd Preprocessor/Preprocessor
# Ensure text files from step 1 are in ./pdfs folder alongside the PDFs
dotnet run
cd backend/Backend.API
dotnet user-secrets set "BackendOptions:OpenAIApiKey" "your-key"
dotnet user-secrets set "BackendOptions:LlmProvider" "OpenAI"
cp ../../Preprocessor/Preprocessor/bin/Debug/net9.0/output.json Data/embeddings.json
dotnet run
Optional: Add Azure SQL for structured fund queries (
AzureSqlConnectionString), or use Groq as a free LLM alternative. See Backend README.
cd frontend
npm install && cp .env.example .env.local
npm run dev
.
├── Preprocessor/ # Embedding generation from pre-extracted text
├── backend/ # ASP.NET Core API
│ ├── Backend.API/ # Main API project
│ └── Backend.Tests/ # Unit tests
├── frontend/ # Next.js web app
├── PdfTextExtractor/ # PDF extraction library (native + OCR)
│ ├── PdfTextExtractor.Core/ # Core library (DDD, extractors, events)
│ ├── PdfTextExtractor.Wpf/ # WPF desktop application
│ └── PdfTextExtractor.Core.Tests/ # NUnit tests
├── YieldRaccoon/ # Fund price crawler (WPF desktop)
│ ├── YieldRaccoon.Domain/ # Business logic, entities, value objects
│ ├── YieldRaccoon.Application/ # Use-case orchestration, interfaces
│ ├── YieldRaccoon.Infrastructure/ # EF Core, event stores, services
│ └── YieldRaccoon.Wpf/ # WPF UI with WebView2
├── docs/ # Guides
│ ├── AZURE-DEPLOYMENT.md
│ └── SECRETS-MANAGEMENT.md
└── azure-setup.sh # Azure deployment script
Deploy to Azure with near-zero cost (~$0.03/month):
| Resource | Tier | Cost |
|---|---|---|
| Azure App Service | F1 Free | $0 |
| Azure Static Web Apps | Free | $0 |
| Application Insights | Free (5GB) | $0 |
| Azure Key Vault | Standard | ~$0.03 |
| Azure Cosmos DB | Free tier (1000 RU/s) | $0 |
| Azure SQL | Basic (optional) | ~$5/month |
| OpenAI Embeddings + LLM | Pay-per-use | ~$0.003 |
| Groq LLM | Free tier (optional) | $0 |
# 1. Create Azure resources (backend + frontend)
./azure-setup.sh
# 2. Add secrets to GitHub (from script output)
# - AZURE_WEBAPP_PUBLISH_PROFILE
# - AZURE_STATIC_WEB_APPS_API_TOKEN
# 3. Add variable to GitHub
# - NEXT_PUBLIC_API_URL
# 4. Push to main - triggers automatic deployment
git push origin main
| Workflow | Purpose |
|---|---|
deploy-backend.yml | Deploy backend to Azure App Service |
deploy-frontend.yml | Deploy frontend to Azure Static Web Apps |
pr-checks.yml | Run tests and checks on pull requests |
See Azure Deployment Guide for complete documentation.
| Document | Description |
|---|---|
| Configuration & Secrets | Environment variables, API keys, settings |
| Azure Deployment | Production deployment guide |
| Backend API | API endpoints and configuration |
| Frontend | Development and testing |
| Preprocessor | Embedding generation and providers |
| PdfTextExtractor | PDF extraction library (native + OCR) |
| YieldRaccoon | Fund price crawler desktop app |
| Project Status | Implementation progress |
| Layer | Technologies |
|---|---|
| Preprocessor | .NET 9, Semantic Kernel, Ollama/LM Studio/OpenAI |
| Backend | ASP.NET Core 9, Semantic Kernel 1.68, OpenAI, Azure SQL, Cosmos DB |
| Frontend | Next.js 16, TypeScript, Tailwind CSS, shadcn/ui |
| PdfTextExtractor | .NET 9, PdfPig, LM Studio, OpenAI, Rx.NET, WPF |
| YieldRaccoon | .NET 9, WPF, EF Core, Rx.NET, WebView2, DevExpress MVVM, Autofac |
| Infrastructure | Azure App Service, Static Web Apps, Key Vault, Application Insights, Cosmos DB |
This is a hobby project for learning Semantic Kernel and AI integration.