FsColbert 0.9.3.16

There is a newer version of this package available.
See the version list below for details.
dotnet add package FsColbert --version 0.9.3.16
                    
NuGet\Install-Package FsColbert -Version 0.9.3.16
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FsColbert" Version="0.9.3.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FsColbert" Version="0.9.3.16" />
                    
Directory.Packages.props
<PackageReference Include="FsColbert" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FsColbert --version 0.9.3.16
                    
#r "nuget: FsColbert, 0.9.3.16"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FsColbert@0.9.3.16
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FsColbert&version=0.9.3.16
                    
Install as a Cake Addin
#tool nuget:?package=FsColbert&version=0.9.3.16
                    
Install as a Cake Tool

FsColbert

FsColbert is a small F#/.NET library for mobile-friendly ColBERT-style retrieval. It is built for later use from a .NET MAUI app such as FsKame.

The first implementation uses:

  • lightonai/mxbai-edge-colbert-v0-32m-onnx INT8 ONNX model
  • Hugging Face byte-level BPE tokenization via Microsoft.ML.Tokenizers
  • ONNX Runtime inference via Microsoft.ML.OnnxRuntime
  • ColBERT late-interaction MaxSim scoring
  • FsKame-like text chunking defaults: 1800 characters with 250 overlap
  • TF-IDF inverted-index candidate prefiltering before dense scoring
  • binary persistence for local on-device indexes

Basic Flow

open System.Net.Http
open FsColbert

async {
    use http = new HttpClient()

    let! files =
        ModelCatalog.ensureDownloadedAsync
            http
            "/path/to/appdata/FsColbert/Models/mxbai-edge-colbert"
            ModelCatalog.mxbaiEdgeColbertInt8

    use encoder = OnnxColbertEncoder.Load files

    let source =
        SourceDocuments.fromFsKamePdf
            "pdf-id"
            "Handbook.pdf"
            "/path/to/Handbook.pdf"
            "PDF text extracted by FsKame/PdfPig"
            true

    let! index =
        IndexBuilder.createWithDefaults
            encoder
            [ source ]
            (Some(fun progress -> printfn "%A" progress))

    let! hits =
        Search.queryWithDefaults
            encoder
            index
            "What does the handbook say about local indexing?"

    let context = SearchHits.renderContext 900 hits
    return context
}

FsKame Integration Notes

FsKame already has the right lifecycle:

  1. PdfLibrary copies PDFs into app data.
  2. KnowledgeSources.readPdfText extracts text with PdfPig.
  3. SourceAgent loads chunks and ranks them for each final transcript.

The clean integration path is to keep FsKame's PDF extraction, then replace KnowledgeSources.loadChunks / KnowledgeSources.rank with an FsColbert-backed state:

  • Map each selected PdfDocumentSource to SourceDocument.
  • Build or load a persisted ColbertIndex when sources change.
  • On transcript finalization, call Search.queryWithDefaults.
  • Map SearchHit.reference back into FsKame's existing SourceChunk record for OracleAgent.

The library intentionally does not reference FsKame, MAUI UI types, or PdfPig. That keeps it portable across Android, iOS, Mac Catalyst, and test projects.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.3.22 61 9/17/2026
0.9.3.21 672 6/18/2026
0.9.3.20 129 6/16/2026
0.9.3.17 144 5/31/2026
0.9.3.16 120 5/31/2026
0.9.3.4 111 5/7/2026