Skip to main content

Local RAG framework for building intelligent knowledge bases

Project description

SolveDesk AI

Intelligent knowledge base powered by embeddings, vector search and Retrieval-Augmented Generation (RAG).

Overview

SolveDesk AI is a lightweight open-source framework for building local intelligent knowledge bases. The project provides a command-line interface for creating vector databases, importing documents, generating embeddings, performing semantic search, and integrating with local Large Language Models (LLMs).

Inspired by frameworks such as Laravel and Django, SolveDesk AI simplifies the process of building Retrieval-Augmented Generation (RAG) systems by providing ready-to-use commands and a modular architecture.

The framework can be used both as a production-ready knowledge base solution and as an educational platform for learning modern AI technologies, vector databases, embeddings, and semantic retrieval.


Features

  • Local knowledge base creation
  • Semantic document search
  • Retrieval-Augmented Generation (RAG)
  • Vector database management
  • Embedding generation
  • Local LLM integration through Ollama
  • Data synchronization from APIs
  • CSV, JSON and XLSX import support
  • Embedding quality analysis
  • Document chunking
  • FastAPI integration
  • Command-line interface

Architecture

Documents / API
       │
       ▼
Embedding Model
       │
       ▼
    ChromaDB
       │
       ▼
Semantic Search
       │
       ▼
      LLM
    Ollama
       │
       ▼
 Generated Response

Technologies

Technology Purpose
Python 3.11 Application runtime
FastAPI REST API
ChromaDB Vector database
silver-retriever-base-v1 Embedding model
Sentence Transformers Embedding generation
Ollama Local LLM integration
Matplotlib Data visualization
Typer Command-line interface

Installation

Install solvedesk:

venv\Scripts\activate 
(venv) pip install solvedesk-ai

Configure local LLM:

solvedesk llm init

CLI Commands

Project Configuration

(venv) C:\path\to\project> solvedesk conf init

[INFO] SolveDesk AI - Project Generator

[INPUT] Project name: Test123
[INPUT] Project description [Local RAG knowledge base]:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] Configuration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[DETAILS] Name        : Test123
[DETAILS] Description : Local RAG knowledge base
[DETAILS] Template    : https://github.com/studiocyfrowe/solvedesk-ai

[CONFIRM] Continue project creation? [y/N]: y

[STATUS] Downloading template...

[STATUS] Project created successfully

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] Project information
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[DETAILS] Location : C:\path\to\project\Test123
[DETAILS] Name     : Test123
[DETAILS] Description : Local RAG knowledge base

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[INFO] Next steps:

cd Test123
solvedesk db init
solvedesk llm init
solvedesk run:app

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[STATUS] Happy coding!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Initialize project environment.

Database

Initialize vector database:

(venv) C:\path\to\project> solvedesk db init

[STATUS] Downloading embedding model...
[STATUS] Model downloaded: utils\models\silver-retriever-base-v1
[STATUS] Plik .env already exists - downloading model has been skipped
[STATUS] Created databases directory: utils\databases
[STATUS] Created vector database: utils\databases\default-db
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[SUCCESS] SolveDesk vector DB initialized
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Create vector database and download embedding model.

(venv) C:\path\to\project> solvedesk db init --chroma-dir test12345

[CONFIRM] Download embedding model (ipipan/silver-retriever-v1)? [y/N]: n
[STATUS] Plik .env already exists - downloading model has been skipped

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[STATUS] Created databases directory: utils\databases
[STATUS] Created vector database: utils\databases\test12345
[STATUS] Vector Database is ready!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[NEXT STEP] Create new collection: solvedesk db new <collection-name>

Display available collections.

(venv) C:\path\to\project> solvedesk db list

test_col | id=235c239e-421b-4b09-95d2-8a81bbafffd3 | documents=0 | metadata={'hnsw:space': 'cosine'}
sd-collection-8780 | id=d857b0a3-27cc-4a67-8463-4d4d075b00dd | documents=0 | metadata={'hnsw:space': 'cosine'}

Create new collection by default

(venv) C:\path\to\project> solvedesk db new
[STATUS] Created new collection: sd-collection-2132

or custom name

(venv) C:\path\to\project> solvedesk db new --collection-name test-collection
[STATUS] Created new collection: test-collection

Delete single collection.

(venv) C:\path\to\project> solvedesk db delete test123
[STATUS] Collection not found: test123

(venv) C:\path\to\project> solvedesk db delete sd-collection-2132
[STATUS] Collection deleted: sd-collection-2132

Display collection details.

(venv) C:\path\to\project> solvedesk db details test-col123

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COLLECTION DETAILS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Name: test-col123
ID: 4f9a8b8a-9ac9-48be-8f5a-9fe1e20d4551
[STATUS] Documents (count): 0
[STATUS] Metadata: {'hnsw:space': 'cosine'}

[STATUS] No documents.

Switch database

(venv) C:\path\to\project> solvedesk db checkout test
Switched to database: test
CHROMA_DIR=utils\databases\test

Data Synchronization

solvedesk sync api

Import documents from external API.

solvedesk sync file

Import documents from CSV, JSON or XLSX files.

Data Analysis

solvedesk data revision

Generate reports containing:

  • cosine similarity statistics
  • cluster distribution
  • token statistics
  • PCA visualization

Chunking

solvedesk data chunk

Split large documents into smaller chunks suitable for RAG systems.

LLM Configuration

solvedesk llm init

Configure Ollama host and model.

Run Application

solvedesk run:app

Start FastAPI server.


Supported Data Structures

FAQ

{
  "question": "How to reset password?",
  "answer": "Use reset password page."
}

Knowledge Base

{
  "name": "VPN Connection",
  "question": "Cannot connect to VPN",
  "answer": "Verify credentials and VPN client configuration."
}

Example Workflow

solvedesk conf init
solvedesk db init
solvedesk sync file
solvedesk data revision
solvedesk llm init
solvedesk run:app

Project Goals

  • Build local intelligent knowledge bases
  • Simplify RAG implementation
  • Support AI experimentation
  • Provide full control over data
  • Enable local LLM deployments
  • Offer educational value for learning AI technologies

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solvedesk_ai-0.2.9.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solvedesk_ai-0.2.9-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file solvedesk_ai-0.2.9.tar.gz.

File metadata

  • Download URL: solvedesk_ai-0.2.9.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for solvedesk_ai-0.2.9.tar.gz
Algorithm Hash digest
SHA256 804814e170c5b94ce0df837151023726b83820ea365173c4af861f27f7abfd1a
MD5 8d0c76fd84b8564e1597d34891c661df
BLAKE2b-256 5583fd5ce84c7c92af22f3094aa7c317246765c95bffdd44e53570c4478a22f1

See more details on using hashes here.

File details

Details for the file solvedesk_ai-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: solvedesk_ai-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for solvedesk_ai-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c41cee424d75e743201685f11e792429ab313206a75a68935a9d93eb58725fd5
MD5 520ccec626c160334c907d65e4a1a105
BLAKE2b-256 be98a0bb5e0c2c0da3b918d84b788d7d47deea401a8ca662c24a5f65b368cca5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page